- var_dump: documentation ( source)
<?php
class Test {
public static function hello()
{
static $my;
var_dump($my);
if ($my) {
$my = '2';
} else {
$my = '1';
}
var_dump($my);
}
}
class Test2 extends Test {
}
Test::hello();
Test::hello();
Test2::hello();