3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //Source: https://bugs.php.net/bug.php?id=67709 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/p9m7p on line 12
Process exited with code 255.