3v4l.org

run code in 300+ PHP versions simultaneously
<?php class T { public $te1; public $te2; } $tCollection = []; for($i=0;$i<10;$i++) { $tCollection[] = (new T)->te1 = random(); } var_dump([]);
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7
Fatal error: Cannot use temporary expression in write context in /in/qh0T1 on line 11
Process exited with code 255.

preferences:
161.58 ms | 1387 KiB | 36 Q