- var_dump: documentation ( source)
<?php
class A {
public static function f1(){
self::$f2 = static::f2();
}
protected static function f2() {
var_dump(static::class); // returns B on the local machine and on the remote server
$f3 = function () {
var_dump(static::class); // returns B on the local machine and returns A on the remote server
$data = static::f4();
};
}
}
class B extends A{}
self::$B = B::instance();