3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Initial Configuration global $aHash; $i = 0; $tmp = ''; while($i < 10000) { $tmp .= 'a'; ++$i; } $aHash = array_fill(100000000000000000000000, 100, $tmp); unset($i, $tmp); var_dump($aHash);
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught TypeError: array_fill(): Argument #1 ($start_index) must be of type int, float given in /in/uTDtN:11 Stack trace: #0 /in/uTDtN(11): array_fill(1.0E+23, 100, 'aaaaaaaaaaaaaaa...') #1 {main} thrown in /in/uTDtN on line 11
Process exited with code 255.
Output for 7.3.12 - 7.3.33, 7.4.0 - 7.4.33
Warning: array_fill() expects parameter 1 to be int, float given in /in/uTDtN on line 11 NULL
Output for 7.0.20, 7.1.5 - 7.1.10, 7.2.0 - 7.2.33
Warning: array_fill() expects parameter 1 to be integer, float given in /in/uTDtN on line 11 NULL

preferences:
145.62 ms | 402 KiB | 148 Q