3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = [ #ints 0,1,2,-1,-2, #floats 0.0,0.1,0.2,1.0,1.1,2.0,2.1, -0.1,-0.2,-1.0,-1.1,-2.0,-2.1, #strings "", "a", "0","@","NULL", #bool true, false, #array [], ["a"],[[]], #object new stdClass, #null NULL,"\0", function(){}, ]; foreach($test as $k => $v){ if(is_scalar($v)){ $j = $k + 97; ${$j} = new stdClass; ${$j}->${$j} = $v; $test[] = ${$j}; } } print_r($test);

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)
8.3.60.0080.00816.36
8.3.50.0100.01021.16
8.3.40.0070.00719.02
8.3.30.0110.00318.51
8.3.20.0040.00420.20
8.3.10.0080.00023.66
8.3.00.0040.00423.66
8.2.180.0160.00616.63
8.2.170.0110.00718.96
8.2.160.0070.01022.96
8.2.150.0080.00025.66
8.2.140.0050.00324.66
8.2.130.0030.00519.77
8.2.120.0050.00326.35
8.2.110.0060.00322.26
8.2.100.0080.00417.93
8.2.90.0040.00419.21
8.2.80.0080.00018.05
8.2.70.0060.00317.63
8.2.60.0050.00518.04
8.2.50.0030.00618.07
8.2.40.0080.00022.30
8.2.30.0040.00420.66
8.2.20.0070.00017.84
8.2.10.0070.00018.01
8.2.00.0000.00718.20
8.1.280.0150.00325.92
8.1.270.0000.00723.88
8.1.260.0100.00028.09
8.1.250.0080.00028.09
8.1.240.0060.00323.89
8.1.230.0030.00719.16
8.1.220.0030.00517.74
8.1.210.0100.00018.77
8.1.200.0000.00817.48
8.1.190.0000.00817.11
8.1.180.0040.00418.10
8.1.170.0000.00818.51
8.1.160.0040.00420.84
8.1.150.0000.00718.84
8.1.140.0000.00819.45
8.1.130.0000.00717.57
8.1.120.0000.00717.55
8.1.110.0000.00717.37
8.1.100.0040.00417.43
8.1.90.0030.00417.49
8.1.80.0030.00517.51
8.1.70.0080.00017.37
8.1.60.0080.00017.62
8.1.50.0040.00717.53
8.1.40.0030.00517.44
8.1.30.0000.00917.71
8.1.20.0070.00017.56
8.1.10.0040.00417.45
8.1.00.0080.00017.59
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0030.00318.45
8.0.270.0070.00017.21
8.0.260.0000.00917.26
8.0.250.0000.00717.00
8.0.240.0000.00816.92
8.0.230.0000.00716.91
8.0.220.0030.00316.86
8.0.210.0050.00216.85
8.0.200.0060.00316.91
8.0.190.0020.00517.02
8.0.180.0000.00917.04
8.0.170.0000.00816.99
8.0.160.0070.00016.86
8.0.150.0000.00716.75
8.0.140.0030.00316.88
8.0.130.0030.00313.33
8.0.120.0030.00516.80
8.0.110.0050.00216.99
8.0.100.0030.00316.99
8.0.90.0040.00417.02
8.0.80.0090.00616.93
8.0.70.0040.00416.86
8.0.60.0050.00216.91
8.0.50.0050.00316.96
8.0.30.0070.01017.28
8.0.20.0090.01017.40
8.0.10.0080.00017.11
8.0.00.0090.00816.78
7.4.330.0000.00516.84
7.4.320.0000.00616.55
7.4.300.0060.00016.43
7.4.290.0040.00416.44
7.4.280.0040.00516.66
7.4.270.0030.00316.58
7.4.260.0100.00016.40
7.4.250.0000.00716.51
7.4.240.0030.00416.47
7.4.230.0000.00716.32
7.4.220.0200.00716.65
7.4.210.0060.00916.65
7.4.200.0040.00416.44
7.4.160.0100.00716.46
7.4.150.0140.00317.40
7.4.140.0130.00817.86
7.4.130.0160.00316.56
7.4.120.0110.00716.68
7.4.110.0050.01216.54
7.4.100.0060.01616.50
7.4.90.0100.00716.52
7.4.80.0130.01019.39
7.4.70.0080.00816.56
7.4.60.0180.00416.43
7.4.50.0080.00416.68
7.4.40.0140.00416.41
7.4.30.0090.01316.62
7.4.00.0070.01114.88
7.3.330.0050.00013.39
7.3.320.0030.00313.43
7.3.310.0070.00016.55
7.3.300.0070.00016.49
7.3.290.0100.01116.44
7.3.280.0100.00816.41
7.3.270.0120.00617.40
7.3.260.0100.00716.60
7.3.240.0080.00816.57
7.3.230.0110.01216.64
7.3.210.0030.01416.38
7.3.200.0100.01319.39
7.3.190.0120.00616.52
7.3.180.0090.00616.40
7.3.170.0070.01016.66
7.3.160.0110.00616.68
7.3.120.0070.00714.89
7.3.110.0000.01514.73
7.3.100.0090.00015.04
7.3.90.0030.01014.91
7.3.80.0040.00914.66
7.3.70.0040.00714.69
7.3.60.0110.00414.63
7.3.50.0100.00314.98
7.3.40.0030.00914.94
7.3.30.0030.01014.72
7.3.20.0030.00716.72
7.3.10.0060.00916.65
7.3.00.0100.00716.52
7.2.330.0110.00816.73
7.2.320.0060.01216.84
7.2.310.0070.01016.85
7.2.300.0000.01716.71
7.2.290.0060.01516.43
7.2.240.0080.00814.86
7.2.230.0070.00715.07
7.2.220.0040.01114.90
7.2.210.0100.00014.95
7.2.200.0070.01015.03
7.2.190.0070.00315.18
7.2.180.0030.01215.02
7.2.170.0000.01114.81
7.2.160.0040.00415.09
7.2.150.0000.01516.79
7.2.140.0090.00617.18
7.2.130.0040.00717.04
7.2.120.0070.00716.98
7.2.110.0000.01216.80
7.2.100.0060.01016.95
7.2.90.0030.01316.63
7.2.80.0000.00817.16
7.2.70.0070.01016.61
7.2.60.0070.00616.82
7.2.50.0000.01117.01
7.2.40.0070.00717.03
7.2.30.0030.01016.85
7.2.20.0030.01217.17
7.2.10.0080.00816.78
7.2.00.0070.00918.26
7.1.330.0000.00715.77
7.1.320.0030.00615.79
7.1.310.0000.01615.90
7.1.300.0030.01015.66
7.1.290.0100.00315.98
7.1.280.0070.00715.98
7.1.270.0030.01015.80
7.1.260.0000.01715.87
7.1.250.0030.00915.85
7.1.200.0030.00315.46
7.1.100.0040.00817.94
7.1.70.0060.00616.93
7.1.60.0100.01319.27
7.1.50.0170.00316.69
7.1.00.0000.07722.54
7.0.200.0000.00916.80
7.0.60.0030.09021.73
7.0.50.0100.04317.92
7.0.40.0170.07719.97
7.0.30.0170.04720.26
7.0.20.0270.08320.23
7.0.10.0100.08320.24
7.0.00.0070.04320.07
5.6.280.0000.03321.11
5.6.210.0100.04020.74
5.6.200.0030.06718.18
5.6.190.0130.05020.61
5.6.180.0330.03720.48
5.6.170.0200.05320.40
5.6.160.0100.08020.59
5.6.150.0070.04318.23
5.6.140.0000.06318.14
5.6.130.0070.08018.16
5.6.120.0070.03721.13
5.6.110.0130.03720.99
5.6.100.0030.05020.96
5.6.90.0130.07020.98
5.6.80.0030.08020.41
5.5.350.0070.08320.43
5.5.340.0100.07718.04
5.5.330.0030.04320.28
5.5.320.0430.05020.51
5.5.310.0300.07720.34
5.5.300.0000.05718.04
5.5.290.0070.08318.02
5.5.280.0030.04720.77
5.5.270.0070.03720.87
5.5.260.0100.07320.77
5.5.250.0100.06320.80
5.5.240.0070.08020.08

preferences:
50.33 ms | 401 KiB | 5 Q