3v4l.org

run code in 300+ PHP versions simultaneously
<?php function &test() { static $a = 0; return $a; } print(++test()); print(++test()); print(++test());
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.25, 7.2.0 - 7.2.15, 7.3.0 - 7.3.2, 8.1.11
Fatal error: Can't use function return value in write context in /in/lCOIR on line 8
Process exited with code 255.

preferences:
253.24 ms | 1396 KiB | 212 Q