- 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.
<?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");