3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'a' => 1, 'b' => 2 ]; class A { public $a = 1; public $b = 2; } $a = new A(); $t0 = microtime(TRUE); for ($i = 0; $i < 500; ++$i) { $s = $array['a'] . $array['b']; } $t1 = microtime(TRUE); echo ($t1 - $t0) . "seconds\n"; for ($i = 0; $i < 500; ++$i) { $s = $a->a . $a->b; } $t2 = microtime(TRUE); echo ($t2 - $t1) . "seconds\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.0030.01515.02
7.3.120.0070.01314.92
7.3.110.0110.00014.89
7.3.100.0070.00714.72
7.3.90.0100.00714.79
7.3.80.0030.01014.94
7.3.70.0040.01214.66
7.3.60.0040.00814.73
7.3.50.0060.00314.81
7.3.40.0060.01014.80
7.3.30.0090.00614.69
7.3.20.0060.00616.52
7.3.10.0070.00716.68
7.3.00.0090.00016.58
7.2.250.0070.01415.06
7.2.240.0030.01315.29
7.2.230.0160.00015.04
7.2.220.0120.00615.03
7.2.210.0000.01515.32
7.2.200.0100.00714.98
7.2.190.0070.01014.97
7.2.180.0060.00614.84
7.2.170.0030.01115.09
7.2.160.0070.00714.71
7.2.150.0070.01016.87
7.2.140.0110.00416.92
7.2.130.0110.00416.62
7.2.120.0070.01116.71
7.2.110.0070.00717.02
7.2.100.0060.00616.94
7.2.90.0030.01016.72
7.2.80.0030.01217.09
7.2.70.0000.01917.11
7.2.60.0000.01516.91
7.2.50.0040.01217.06
7.2.40.0070.00716.76
7.2.30.0040.01116.83
7.2.20.0100.00316.99
7.2.10.0030.01317.09
7.2.00.0050.00918.20
7.1.330.0060.00915.98
7.1.320.0110.00315.79
7.1.310.0070.00715.80
7.1.300.0030.01015.46
7.1.290.0110.00415.67
7.1.280.0070.00715.45
7.1.270.0040.00815.49
7.1.260.0040.01115.73
7.1.250.0070.01015.65
7.1.70.0130.00017.21
7.1.60.0050.00517.32
7.1.50.0110.01116.63
7.1.00.0070.07322.36
7.0.200.0040.00716.97
7.0.140.0070.07022.21
7.0.120.0100.06722.13
7.0.60.0070.04020.08
7.0.50.0030.07717.86
7.0.40.0070.08017.79
7.0.30.0100.08317.75
7.0.20.0030.04317.71
7.0.10.0030.07717.75
7.0.00.0030.07017.73
5.6.280.0030.07021.04
5.6.210.0100.05020.61
5.6.200.0000.04718.29
5.6.190.0070.08318.28
5.6.180.0170.07018.14
5.6.170.0170.06318.15
5.6.160.0070.05718.15
5.6.150.0100.07718.28
5.6.140.0070.06718.11
5.6.130.0130.07718.15
5.6.120.0030.08018.19
5.6.110.0100.08018.17
5.6.100.0070.08318.13
5.6.90.0070.06718.23
5.6.80.0030.06317.68
5.6.70.0070.04017.54
5.6.60.0030.04017.68
5.6.50.0130.07317.57
5.6.40.0030.08017.54
5.6.30.0100.06717.48
5.6.20.0030.07317.53
5.6.10.0030.08017.60
5.6.00.0030.08317.63
5.5.350.0400.06320.40
5.5.340.0030.08717.97
5.5.330.0130.07317.98
5.5.320.0100.04718.02
5.5.310.0000.09017.98
5.5.300.0100.07317.98
5.5.290.0100.08018.09
5.5.280.0030.08717.91
5.5.270.0100.07718.02
5.5.260.0070.08317.94
5.5.250.0100.08317.88
5.5.240.0100.06717.43
5.5.230.0000.04317.46
5.5.220.0070.05717.32
5.5.210.0170.07017.29
5.5.200.0130.04017.37
5.5.190.0070.06017.43
5.5.180.0130.06317.36
5.5.160.0000.05017.33
5.5.150.0100.07717.30
5.5.140.0130.06017.39
5.5.130.0100.05717.29
5.5.120.0000.08317.30
5.5.110.0170.07017.29
5.5.100.0100.04317.21
5.5.90.0000.08317.23
5.5.80.0070.08017.27
5.5.70.0100.07717.22
5.5.60.0030.06717.32
5.5.50.0130.06717.22
5.5.40.0130.07017.16
5.5.30.0030.08317.22
5.5.20.0130.07317.25
5.5.10.0100.06317.19
5.5.00.0100.07317.18
5.4.450.0000.09019.31
5.4.440.0130.06019.37
5.4.430.0100.07719.36
5.4.420.0030.07319.38
5.4.410.0070.08019.18
5.4.400.0000.05718.88
5.4.390.0070.08019.27
5.4.380.0130.06719.13
5.4.370.0070.08019.04
5.4.360.0070.07318.98
5.4.350.0070.07319.04
5.4.340.0100.07318.95
5.4.320.0070.08019.02
5.4.310.0100.07319.09
5.4.300.0100.07319.26
5.4.290.0100.07719.02
5.4.280.0100.06719.12
5.4.270.0030.08019.09
5.4.260.0100.05719.05
5.4.250.0030.07319.11
5.4.240.0170.06318.94
5.4.230.0100.05019.11
5.4.220.0100.06019.01
5.4.210.0070.07719.26
5.4.200.0000.04719.00
5.4.190.0070.08018.93
5.4.180.0070.08019.00
5.4.170.0100.04719.08
5.4.160.0100.07719.25
5.4.150.0070.05719.05
5.4.140.0130.06716.41
5.4.130.0100.07316.59
5.4.120.0030.05716.38
5.4.110.0070.05016.45
5.4.100.0000.04716.35
5.4.90.0070.06016.57
5.4.80.0030.03716.41
5.4.70.0030.06016.47
5.4.60.0000.07716.29
5.4.50.0130.03016.29
5.4.40.0070.07016.51
5.4.30.0100.06716.26
5.4.20.0000.07716.20
5.4.10.0070.05716.33
5.4.00.0030.03716.01
5.3.290.0100.07714.75
5.3.280.0070.08014.59
5.3.270.0100.04314.39
5.3.260.0130.05014.46
5.3.250.0030.04314.54
5.3.240.0030.08014.57
5.3.230.0070.07314.52
5.3.220.0100.06714.52
5.3.210.0070.05014.53
5.3.200.0070.07314.48
5.3.190.0100.06314.34
5.3.180.0030.04314.50
5.3.170.0030.08014.39
5.3.160.0030.05014.50
5.3.150.0030.08014.46
5.3.140.0030.05314.52
5.3.130.0070.07014.46
5.3.120.0100.06014.54
5.3.110.0070.06014.48
5.3.100.0000.04313.95
5.3.90.0030.04313.80
5.3.80.0030.05014.00
5.3.70.0100.03013.77
5.3.60.0070.07013.96
5.3.50.0030.05013.89
5.3.40.0030.08313.92
5.3.30.0070.04313.85
5.3.20.0070.07013.66
5.3.10.0070.04713.61
5.3.00.0070.03713.60
5.2.170.0100.03311.09
5.2.160.0000.06010.97
5.2.150.0070.05310.98
5.2.140.0030.04311.12
5.2.130.0130.05011.10
5.2.120.0070.05711.08
5.2.110.0170.02311.02
5.2.100.0030.03011.08
5.2.90.0030.05711.03
5.2.80.0130.03011.11
5.2.70.0030.06311.06
5.2.60.0030.06010.97
5.2.50.0030.03010.99
5.2.40.0030.05310.97
5.2.30.0000.04010.79
5.2.20.0070.03310.94
5.2.10.0030.06010.89
5.2.00.0030.05010.63
5.1.60.0030.0539.97
5.1.50.0030.0309.97
5.1.40.0030.0509.97
5.1.30.0070.03310.34
5.1.20.0030.03710.27
5.1.10.0000.0379.90
5.1.00.0000.03710.14
5.0.50.0070.0338.63
5.0.40.0000.0238.63
5.0.30.0070.0278.63
5.0.20.0030.0238.63
5.0.10.0000.0338.63
5.0.00.0000.0378.63
4.4.90.0000.0378.63
4.4.80.0030.0178.63
4.4.70.0000.0408.63
4.4.60.0030.0338.63
4.4.50.0030.0378.63
4.4.40.0030.0438.63
4.4.30.0030.0338.63
4.4.20.0000.0238.63
4.4.10.0070.0338.63
4.4.00.0000.0338.63
4.3.110.0000.0178.63
4.3.100.0030.0338.63
4.3.90.0030.0178.63
4.3.80.0030.0508.63
4.3.70.0030.0308.63
4.3.60.0030.0208.63
4.3.50.0070.0138.63
4.3.40.0100.0438.63
4.3.30.0070.0338.63
4.3.20.0000.0378.63
4.3.10.0030.0308.63
4.3.00.0030.0308.63

preferences:
36.5 ms | 404 KiB | 6 Q