3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class foo { public $tableModel = 'bar'; public function run() { call_user_func([$this->tableModel, 'run']); } } class bar { public function run() { echo "pass"; } } $foo = new Foo; $foo->run();
Output for 7.0.0 - 7.2.0
Deprecated: Non-static method bar::run() should not be called statically in /in/oKu38 on line 9 pass
Output for 5.4.1 - 5.6.28
Strict Standards: call_user_func() expects parameter 1 to be a valid callback, non-static method bar::run() should not be called statically in /in/oKu38 on line 9 pass
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/oKu38 on line 9
Process exited with code 255.