3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cache = array('Blah\Blah\Blah', 'src/Blah/Blah/Blag.php'); $startList = microtime(true); for ($i = 0; $i < 1000; $i++) { list($class, $file) = $cache; } $endList = microtime(true); $startEach = microtime(true); for ($i = 0; $i < 1000; $i++) { $class = $cache[0]; $file = $cache[1]; } $endEach = microtime(true); $startAr = microtime(true); for ($i = 0; $i < 1000; $i++) { $class = reset($cache); $file = end($cache); } $endAr = microtime(true); $listDiff = $endList - $startList; $eachDiff = $endEach - $startEach; $arDiff = $endAr - $startAr; echo 'List diff: ' . $listDiff . "\n"; echo 'Each diff: ' . $eachDiff . "\n"; echo 'Ar diff: ' . $arDiff . "\n";

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)
7.4.00.0000.01915.14
7.3.120.0040.01514.90
7.3.110.0060.00614.80
7.3.100.0030.01014.73
7.3.90.0040.00814.84
7.3.80.0030.01015.05
7.3.70.0030.01014.87
7.3.60.0040.01214.88
7.3.50.0090.00014.67
7.3.40.0030.00614.97
7.3.30.0000.01414.62
7.3.20.0030.01016.67
7.3.10.0100.00616.66
7.3.00.0060.00916.55
7.2.250.0060.01315.31
7.2.240.0100.00715.06
7.2.230.0040.01115.09
7.2.220.0030.01214.91
7.2.210.0120.00615.13
7.2.200.0070.01015.06
7.2.190.0150.00015.13
7.2.180.0120.00314.84
7.2.170.0110.00415.12
7.2.00.0000.01319.56
7.1.330.0110.00415.88
7.1.320.0060.00915.97
7.1.310.0090.00615.81
7.1.300.0080.00415.91
7.1.290.0040.00815.58
7.1.280.0060.00915.91
7.1.270.0100.00715.88
7.1.260.0030.01215.76
7.1.70.0000.00817.22
7.1.60.0040.01119.40
7.1.50.0070.01417.08
7.1.00.0100.07022.36
7.0.200.0030.00616.64
7.0.140.0100.06722.01
7.0.60.0130.07720.07
7.0.50.0030.05717.89
7.0.40.0030.05320.06
7.0.30.0400.04320.04
7.0.20.0170.04020.00
7.0.10.0100.04020.12
7.0.00.0030.08020.20
5.6.280.0000.07721.13
5.6.210.0070.05320.57
5.6.200.0000.05318.22
5.6.190.0100.06320.41
5.6.180.0300.03720.41
5.6.170.0370.04720.50
5.6.160.0170.06720.50
5.6.150.0130.07718.22
5.6.140.0100.07318.20
5.6.130.0000.07018.21
5.6.120.0100.07021.02
5.6.110.0100.07020.98
5.6.100.0070.04020.89
5.6.90.0030.09720.97
5.6.80.0000.04320.43
5.5.350.0030.03020.38
5.5.340.0030.08717.98
5.5.330.0130.07720.06
5.5.320.0000.09020.50
5.5.310.0370.06720.21
5.5.300.0070.08017.86
5.5.290.0030.06317.92
5.5.280.0030.08720.91
5.5.270.0170.06720.77
5.5.260.0100.08320.88
5.5.250.0000.04320.60
5.5.240.3600.03720.36
5.4.450.0130.04719.57
5.4.440.0300.04319.27
5.4.430.0470.04719.42
5.4.420.0230.04719.46
5.4.410.0430.04719.08
5.4.400.0330.03318.92
5.4.390.0770.04019.16
5.4.380.0200.07018.62
5.4.370.0230.06718.55
5.4.360.0370.05318.66
5.4.350.0000.07318.54
5.4.340.0070.06018.66
5.4.320.0050.03812.46
5.4.310.0130.03712.46
5.4.300.0120.04712.46
5.4.290.0070.05512.46
5.4.280.0060.05412.36
5.4.270.0080.03712.36
5.4.260.0080.03612.36
5.4.250.0110.03612.36
5.4.240.0050.03712.36
5.4.230.0020.04112.35
5.4.220.0050.03612.35
5.4.210.0040.03712.35
5.4.200.0040.03912.35
5.4.190.0070.03412.35
5.4.180.0060.03512.35
5.4.170.0060.03912.36
5.4.160.0040.04012.36
5.4.150.0070.03512.35
5.4.140.0050.03812.04
5.4.130.0070.03512.02
5.4.120.0060.03511.98
5.4.110.0070.03511.98
5.4.100.0040.03811.98
5.4.90.0040.04011.97
5.4.80.0050.03811.98
5.4.70.0030.03711.97
5.4.60.0060.03511.97
5.4.50.0060.04411.97
5.4.40.0070.03711.96
5.4.30.0090.03711.96
5.4.20.0080.03311.96
5.4.10.0060.03511.96
5.4.00.0070.03611.45
5.3.290.0050.04112.80
5.3.280.0040.03912.71
5.3.270.0080.03712.73
5.3.260.0060.03912.72
5.3.250.0120.03012.72
5.3.240.0040.03912.72
5.3.230.0040.04212.71
5.3.220.0080.03912.68
5.3.210.0070.03812.68
5.3.200.0080.03612.68
5.3.190.0040.04912.68
5.3.180.0080.03612.67
5.3.170.0060.03712.67
5.3.160.0070.03812.67
5.3.150.0070.03612.67
5.3.140.0050.03812.66
5.3.130.0050.04412.66
5.3.120.0090.03612.66
5.3.110.0060.04812.66
5.3.100.0070.03812.12
5.3.90.0070.04612.08
5.3.80.0100.03412.07
5.3.70.0070.03712.08
5.3.60.0050.03712.06
5.3.50.0080.03512.00
5.3.40.0090.04012.00
5.3.30.0080.03511.96
5.3.20.0070.03611.74
5.3.10.0070.04611.71
5.3.00.0090.04711.70
5.2.170.0060.0399.20
5.2.160.0080.0359.20
5.2.150.0060.0399.20
5.2.140.0080.0369.20
5.2.130.0080.0349.16
5.2.120.0080.0349.16
5.2.110.0090.0499.16
5.2.100.0050.0499.16
5.2.90.0080.0419.15
5.2.80.0070.0349.15
5.2.70.0030.0339.15
5.2.60.0070.0299.10
5.2.50.0060.0309.07
5.2.40.0040.0299.05
5.2.30.0060.0359.02
5.2.20.0070.0329.01
5.2.10.0070.0288.96
5.2.00.0070.0398.82
5.1.60.0110.0268.11
5.1.50.0050.0298.11
5.1.40.0070.0288.09
5.1.30.0070.0248.44
5.1.20.0050.0268.46
5.1.10.0070.0288.19
5.1.00.0050.0258.18
5.0.50.0070.0196.67
5.0.40.0060.0186.53
5.0.30.0040.0336.34
5.0.20.0030.0236.31
5.0.10.0060.0196.29
5.0.00.0040.0316.27
4.4.90.0030.0174.78
4.4.80.0020.0184.75
4.4.70.0040.0214.75
4.4.60.0030.0204.75
4.4.50.0030.0174.77
4.4.40.0040.0254.71
4.4.30.0010.0184.76
4.4.20.0050.0144.85
4.4.10.0030.0164.84
4.4.00.0030.0254.76
4.3.110.0030.0174.67
4.3.100.0040.0204.66
4.3.90.0050.0144.64
4.3.80.0030.0264.59
4.3.70.0040.0164.63
4.3.60.0030.0164.63
4.3.50.0030.0174.63
4.3.40.0030.0254.54
4.3.30.0010.0193.35
4.3.20.0000.0193.34
4.3.10.0040.0163.29
4.3.00.0130.01715.91

preferences:
44.62 ms | 400 KiB | 5 Q