3v4l.org

run code in 500+ PHP versions simultaneously
<?php $x = []; $x[] = 1; $x[] += 2; $x[] ??= 3; $x[] *= 4; $x[] **= 5; $x[] |= 6; print_r($x); ?>
Output for 8.2.0 - 8.2.35, 8.3.0 - 8.3.36, 8.4.1 - 8.4.4
Fatal error: Cannot use [] for reading in /in/0WDiL on line 6

preferences:
14.86 ms | 1159 KiB | 5 Q