3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test { public static $_desc = "Test\n"; public function __description() { if (isset($this)) { echo "dynamic\n"; //static::__description(); } else { echo "static\n"; //return static::$_desc; } } } $test = new Test(); echo $test->__description(); echo Test::__description();
based on Mr01Y
Output for 7.0.0 - 7.2.0
dynamic Deprecated: Non-static method Test::__description() should not be called statically in /in/5L1bm on line 21 static
Output for 5.3.17 - 5.6.28
dynamic Strict Standards: Non-static method Test::__description() should not be called statically in /in/5L1bm on line 21 static