3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo{ static function hello(){ echo "Hello World!"; } } class Bar{ public $message = array( 'foo' => Foo::hello() ); } $Bar = new Bar(); echo $bar->message['foo']; ?>
Output for 5.3.0 - 5.4.31
Parse error: syntax error, unexpected '(', expecting ')' in /in/JW9cg on line 11
Process exited with code 255.