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); reset($aHash); $key = array_keys($aHash); $size = sizeOf($key); for ($i=0; $i<$size; $i++) $tmp[] = $aHash[$key[$i]];
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Fatal error: Uncaught TypeError: array_fill(): Argument #1 ($start_index) must be of type int, float given in /in/0ZEDS:12 Stack trace: #0 /in/0ZEDS(12): array_fill(1.0E+23, 100, 'aaaaaaaaaaaaaaa...') #1 {main} thrown in /in/0ZEDS on line 12
Process exited with code 255.
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: array_fill() expects parameter 1 to be int, float given in /in/0ZEDS on line 12 Warning: reset() expects parameter 1 to be array, null given in /in/0ZEDS on line 14 Warning: array_keys() expects parameter 1 to be array, null given in /in/0ZEDS on line 15 Warning: sizeof(): Parameter must be an array or an object that implements Countable in /in/0ZEDS on line 16
Output for 7.2.0 - 7.2.33
Warning: array_fill() expects parameter 1 to be integer, float given in /in/0ZEDS on line 12 Warning: reset() expects parameter 1 to be array, null given in /in/0ZEDS on line 14 Warning: array_keys() expects parameter 1 to be array, null given in /in/0ZEDS on line 15 Warning: sizeof(): Parameter must be an array or an object that implements Countable in /in/0ZEDS on line 16
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33
Warning: array_fill() expects parameter 1 to be integer, float given in /in/0ZEDS on line 12 Warning: reset() expects parameter 1 to be array, null given in /in/0ZEDS on line 14 Warning: array_keys() expects parameter 1 to be array, null given in /in/0ZEDS on line 15
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28

preferences:
233.87 ms | 403 KiB | 352 Q