3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php (function ($a, $b) { var_dump($this); var_dump($a, $b); })->bindto(new stdclass, null)("a", "b");
based on fvh3X
Output for 7.0.0 - 7.2.0
object(stdClass)#2 (0) { } string(1) "a" string(1) "b"
Output for 5.4.11 - 5.6.28
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /in/E66tF on line 6
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/E66tF on line 6
Process exited with code 255.