3v4l.org

run code in 300+ PHP versions simultaneously
<?php // spl $SplFixedArray = new SplFixedArray(1024 * 1024); // array(); for ($i = 0; $i < 1024 * 1024; ++$i) $SplFixedArray[$i] = 0; echo 'SplFixedArray: '.memory_get_peak_usage();
Output for 8.3.0 - 8.3.6
SplFixedArray: 17164576
Output for 8.2.0 - 8.2.18
SplFixedArray: 17164560
Output for 8.1.4 - 8.1.28
SplFixedArray: 17164872
Output for 8.1.0 - 8.1.3
SplFixedArray: 17164856
Output for 8.0.17 - 8.0.30
SplFixedArray: 17164408
Output for 8.0.0 - 8.0.16
SplFixedArray: 17164392
Output for 7.4.0 - 7.4.33
SplFixedArray: 17164712
Output for 7.3.16 - 7.3.33
SplFixedArray: 17164616
Output for 7.2.29 - 7.2.33
SplFixedArray: 17160640
Output for 7.2.0 - 7.2.6
SplFixedArray: 17160680
Output for 7.1.0, 7.1.7 - 7.1.20
SplFixedArray: 17124008
Output for 7.1.5 - 7.1.6
SplFixedArray: 17124176
Output for 7.0.0 - 7.0.20
SplFixedArray: 17124040
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
SplFixedArray: 58938624

preferences:
147.23 ms | 402 KiB | 183 Q