3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Init: ".memory_get_usage() . PHP_EOL . PHP_EOL; $test = $test2 = array(); $i = 0; while ($i++ < 100000) { $test[] = $i; $test2[] = $i; } // test loop 1 echo "Test 1: ".memory_get_usage() . PHP_EOL; foreach ($test as $k => $v) { unset($test[$k]); } echo memory_get_usage() . PHP_EOL . PHP_EOL; // test loop 2 echo "Test 2: ".memory_get_usage() . PHP_EOL; foreach ($test2 as $k => &$v) { unset($test2[$k]); } echo memory_get_usage() . PHP_EOL . PHP_EOL;

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.450.3930.10352.26
5.4.440.3600.07752.29
5.4.430.5170.10752.18
5.4.420.3630.08052.49
5.4.410.3400.08352.02
5.4.400.2870.08051.76
5.4.390.2300.08751.82
5.4.380.3230.08352.17
5.4.370.3670.07752.18
5.4.360.3530.07352.17
5.4.350.3630.10352.00
5.4.340.3700.10351.86
5.4.320.3630.08351.73
5.4.310.3330.08352.15
5.4.300.3330.07051.82
5.4.290.3330.06751.73
5.4.280.3370.08752.00
5.4.270.3870.07351.99
5.4.260.3770.08351.98
5.4.250.4230.08051.86
5.4.240.3430.07352.01
5.4.230.3230.08051.99
5.4.220.3300.07351.81
5.4.210.3500.07751.72
5.4.200.3100.08351.74
5.4.190.3600.08051.95
5.4.180.3230.08051.85
5.4.170.3470.06352.05
5.4.160.3600.07051.80
5.4.150.3700.09351.98
5.4.140.3800.10049.53
5.4.130.3570.08049.14
5.4.120.3330.08349.52
5.4.110.3570.06749.20
5.4.100.3270.07749.40
5.4.90.3370.08349.42
5.4.80.3800.09049.02
5.4.70.3570.08349.25
5.4.60.3400.07749.38
5.4.50.3600.08049.25
5.4.40.3470.08049.18
5.4.30.3530.08049.11
5.4.20.3570.08349.29
5.4.10.3830.08349.16
5.4.00.4070.08348.69
5.3.290.3500.08046.98
5.3.280.3730.10346.89
5.3.270.3530.08046.89
5.3.260.3770.10046.84
5.3.250.3670.07046.84
5.3.240.3530.07047.04
5.3.230.3730.08046.79
5.3.220.3730.10346.72
5.3.210.3330.08746.80
5.3.200.3470.07346.81
5.3.190.3730.07746.89
5.3.180.3500.06346.85
5.3.170.4530.06746.84
5.3.160.3630.08046.77
5.3.150.3400.08046.87
5.3.140.3070.08747.00
5.3.130.3700.07746.89
5.3.120.3830.07746.89
5.3.110.3600.07346.87
5.3.100.4200.08746.23
5.3.90.4200.08046.23
5.3.80.4270.08746.29
5.3.70.3930.10046.29
5.3.60.4300.08046.14
5.3.50.4100.07746.09
5.3.40.3500.07046.11
5.3.30.3770.08046.28
5.3.20.3570.08745.89
5.3.10.3370.07745.91
5.3.00.3570.08745.91

preferences:
31.34 ms | 401 KiB | 5 Q