/virtual/uft/public_html/unlimited-fairytales.com/PhpSamples/Php01/php01-syntax02-class.php

string(23) "$staticProperty's value"
staticMethod() called
MyClass's staticMethod2 called
MyClass's staticMethod2 called
__construct($p1) called. $p1 is Foo
instanceMethod() called. $instanseProperty=Foo
__construct($p1) called. $p1 is Bar
instanceMethod() called. $instanseProperty=Bar
__construct($p1) called. $p1 is Baz
Overrided method! instanceMethod() called. $instanseProperty=Baz
object(Php01\Classes\MyClass)#2 (1) {
  ["instanceProperty":protected]=>
  string(3) "Foo"
}
object(Php01\Classes\MyClass)#3 (1) {
  ["instanceProperty":protected]=>
  string(3) "Bar"
}
object(Php01\Classes\MyClass2)#4 (1) {
  ["instanceProperty":protected]=>
  string(3) "Baz"
}
staticメソッドはインタンスからも呼び出せる。staticメソッドもオーバーライドの概念がある
$a->staticMethod() : staticMethod() called
MyClass's staticMethod2 called
MyClass's staticMethod2 called
$c->staticMethod() : Overrided static method! staticMethod() called
MyClass2's staticMethod2 called
MyClass's staticMethod2 called