3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class MyClass { function testing() { static $f = "hello world"; } } $obj = new MyClass; var_dump($obj); echo $testing(); ?>
Output for 7.0.0 - 7.2.6
object(MyClass)#1 (0) { } Notice: Undefined variable: testing in /in/5cj3l on line 12 Fatal error: Uncaught Error: Function name must be a string in /in/5cj3l:12 Stack trace: #0 {main} thrown in /in/5cj3l on line 12
Process exited with code 255.
Output for 5.0.4 - 5.6.28
object(MyClass)#1 (0) { } Notice: Undefined variable: testing in /in/5cj3l on line 12 Fatal error: Function name must be a string in /in/5cj3l on line 12
Process exited with code 255.
Output for 5.0.0 - 5.0.3
object(MyClass)#1 (0) { } Notice: Undefined variable: testing in /in/5cj3l on line 12 Fatal error: Function name must be a string in /in/5cj3l on line 12
Process exited with code 255.
Output for 4.4.5 - 4.4.9
object(myclass)(0) { } Notice: Undefined variable: testing in /in/5cj3l on line 12 Fatal error: Call to undefined function: () in /in/5cj3l on line 12
Process exited with code 255.
Output for 4.3.2 - 4.4.4
object(myclass)(0) { } Notice: Undefined variable: testing in /in/5cj3l on line 12 Fatal error: Call to undefined function: () in /in/5cj3l on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1
object(myclass)(0) { } Notice: Undefined variable: testing in /in/5cj3l on line 12 Fatal error: Call to undefined function: () in /in/5cj3l on line 12