3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $arr = array("test"); function bar($str) { echo (self::{$arr[0]})($str); } static function test($var) { echo "Testing: $var\n"; } } (new Foo)->bar("bla");
Output for 5.5.24 - 5.5.31, 5.6.8 - 5.6.17, 7.0.0 - 7.0.2
Parse error: syntax error, unexpected ')', expecting '(' in /in/6OatW on line 7
Process exited with code 255.

preferences:
163.53 ms | 1399 KiB | 28 Q