3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function __construct(){ echo 'hi'; } } $t = new Test(); var_dump($t->__construct()); var_dump($t->__construct(...)());
Output for 8.1.0 - 8.1.9
hihiNULL hiNULL
Output for 8.0.1 - 8.0.22
Parse error: syntax error, unexpected token ")" in /in/hqi3M on line 11
Process exited with code 255.
Output for 7.4.0 - 7.4.30
Parse error: syntax error, unexpected ')' in /in/hqi3M on line 11
Process exited with code 255.

preferences:
183.45 ms | 1399 KiB | 68 Q