3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $a = 5; private $b = 10; private $c = 15; private $d = 20; } $s = microtime(true); for ($i = 0; $i < 1000000; $i++) { new A(); } var_dump(microtime(true) - $s); $instance = new A(); $s = microtime(true); for ($i = 0; $i < 1000000; $i++) { clone $instance; } var_dump(microtime(true) - $s);

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.0160.24314.86
7.3.120.0100.26214.47
7.3.110.0030.25915.02
7.3.100.0070.16614.58
7.3.90.0070.21215.08
7.3.80.0070.15414.68
7.3.70.0070.14614.83
7.3.60.0030.15614.88
7.3.50.0030.14914.88
7.3.40.0030.18914.53
7.3.30.0070.14714.69
7.3.20.0000.21516.41
7.3.10.0000.19916.44
7.3.00.0030.15116.70
7.2.250.0100.16815.00
7.2.240.0070.26915.13
7.2.230.0070.22114.71
7.2.220.0030.15515.12
7.2.210.0100.14415.34
7.2.200.0030.14915.11
7.2.190.0000.14914.89
7.2.180.0070.16914.97
7.2.170.0000.17315.04
7.2.00.0100.12619.30
7.1.330.0100.32715.84
7.1.320.0070.28815.68
7.1.310.0100.26015.66
7.1.300.0070.26115.84
7.1.290.0100.27815.61
7.1.280.0070.26815.91
7.1.270.0070.28615.71
7.1.260.0070.25015.54
7.1.70.0030.16117.04
7.1.60.0030.20419.61
7.1.50.0070.19516.95
7.1.00.0070.26022.28
7.0.200.0070.19716.57
7.0.140.0070.21721.99
7.0.110.0070.21719.89
7.0.100.0100.19720.03
7.0.90.0100.20020.02
7.0.80.0070.20019.84
7.0.70.0100.17019.84
7.0.60.0100.21319.88
7.0.50.0100.22020.27
7.0.40.0030.22020.26
7.0.30.0100.21320.16
7.0.20.0100.23720.25
7.0.10.0100.21020.06
7.0.00.0170.20719.95
5.6.280.0100.36321.02
5.6.260.0130.33720.53
5.6.250.0070.28020.62
5.6.240.0130.31020.50
5.6.230.0130.29320.63
5.6.220.0100.33020.47
5.6.210.0070.28720.59
5.6.200.0000.34721.15
5.6.190.0100.32721.29
5.6.180.0170.31321.14
5.6.170.0070.33721.18
5.6.160.0070.32320.95
5.6.150.0130.33020.96
5.6.140.0030.33721.28
5.6.130.0170.34320.95
5.6.120.0130.31320.94
5.6.110.0030.34021.25
5.6.100.0100.33721.12
5.6.90.0070.33021.03
5.6.80.0100.33320.56
5.6.70.0030.30720.59
5.6.60.0130.32720.50
5.6.50.0070.34720.57
5.6.40.0030.33020.62
5.6.30.0100.32020.61
5.6.20.0100.34320.54
5.6.10.0070.32320.61
5.6.00.0100.32020.33
5.5.380.0100.30320.51
5.5.370.0170.29320.23
5.5.360.0170.30020.28
5.5.350.0100.36020.39
5.5.340.0030.32020.72
5.5.330.0070.31320.95
5.5.320.0070.32720.81
5.5.310.0070.33720.90
5.5.300.0100.32320.94
5.5.290.0070.34720.70
5.5.280.0000.34320.95
5.5.270.0070.33020.93
5.5.260.0100.32720.77
5.5.250.0070.33320.64
5.5.240.0170.32020.27
5.5.230.0170.31720.08
5.5.220.0100.32020.27
5.5.210.0070.31720.12
5.5.200.0170.31020.34
5.5.190.0070.30320.36
5.5.180.0070.34020.25
5.5.160.0200.33320.11
5.5.150.0100.33720.04
5.5.140.0070.34720.33
5.5.130.0030.31720.21
5.5.120.0070.33020.27
5.5.110.0030.39720.24
5.5.100.0100.35719.98
5.5.90.0000.35320.10
5.5.80.0130.30720.14
5.5.70.0100.34720.04
5.5.60.0100.26020.03
5.5.50.0130.26020.02
5.5.40.0070.28020.00
5.5.30.0000.27319.98
5.5.20.0100.30019.98
5.5.10.0100.31020.14
5.5.00.0030.28720.14
5.4.450.0170.31019.33
5.4.440.0130.34319.51
5.4.430.0030.34319.46
5.4.420.0100.29319.63
5.4.410.0200.35019.44
5.4.400.0200.31019.23
5.4.390.0070.32019.14
5.4.380.0170.31019.19
5.4.370.0100.27719.09
5.4.360.0070.30719.02
5.4.350.0070.33019.02
5.4.340.0130.31019.32
5.4.320.0030.32719.24
5.4.310.0100.32019.01
5.4.300.0100.31319.22
5.4.290.0030.33019.07
5.4.280.0000.32719.01
5.4.270.0070.33319.16
5.4.260.0170.31319.06
5.4.250.0030.34719.18
5.4.240.0070.31319.00
5.4.230.0070.34019.17
5.4.220.0030.28719.15
5.4.210.0030.31319.22
5.4.200.0000.28019.22
5.4.190.0030.27319.13
5.4.180.0030.29019.08
5.4.170.0070.25019.15
5.4.160.0070.25719.16
5.4.150.0070.29719.16
5.4.140.0130.31016.58
5.4.130.0130.27316.45
5.4.120.0000.32016.47
5.4.110.0100.29316.46
5.4.100.0130.29016.54
5.4.90.0070.30316.31
5.4.80.0030.30016.45
5.4.70.0100.32716.54
5.4.60.0030.28016.45
5.4.50.0030.31716.48
5.4.40.0130.29316.58
5.4.30.0100.30716.33
5.4.20.0100.32016.54
5.4.10.0030.30316.38
5.4.00.0070.31015.91
5.3.290.0100.54014.67
5.3.280.0100.55014.68
5.3.270.0030.50314.61
5.3.260.0030.49714.60
5.3.250.0700.39014.59
5.3.240.0000.52314.55
5.3.230.0100.56014.60
5.3.220.0100.58314.64
5.3.210.0030.58714.54
5.3.200.0100.57014.57
5.3.190.0000.55714.64
5.3.180.0070.57714.70
5.3.170.0070.56014.59
5.3.160.0100.58314.64
5.3.150.0100.56714.55
5.3.140.0070.56714.56
5.3.130.0070.56014.54
5.3.120.0100.57014.55
5.3.110.0070.57314.57
5.3.100.0000.54714.14
5.3.90.0130.56314.14
5.3.80.0170.58014.02
5.3.70.0170.56014.00
5.3.60.0030.65014.13
5.3.50.0030.57013.97
5.3.40.0030.58713.96
5.3.30.0030.53314.00
5.3.20.0070.56313.64
5.3.10.0000.56313.79
5.3.00.0070.56013.64
5.2.170.0030.59312.23
5.2.160.0100.57012.23
5.2.150.0030.57712.23
5.2.140.0030.58012.23
5.2.130.0070.56712.23
5.2.120.0070.59012.23
5.2.110.0070.55312.23
5.2.100.0070.55712.23
5.2.90.0100.56312.23
5.2.80.0000.54712.23
5.2.70.0070.59712.23
5.2.60.0070.57012.23
5.2.50.0130.57712.23
5.2.40.0100.58012.23
5.2.30.0100.57012.23
5.2.20.0030.57312.23
5.2.10.0030.57012.23
5.2.00.0030.62312.23
5.1.60.0600.437253.67
5.1.50.0730.450253.77
5.1.40.0700.437253.65
5.1.30.0670.453254.14
5.1.20.0800.430254.23
5.1.10.1070.433254.09
5.1.00.0730.430253.90
5.0.50.0730.540252.95
5.0.40.0630.533252.87
5.0.30.0700.663252.83
5.0.20.0600.543252.78
5.0.10.0700.530252.98
5.0.00.0500.550252.76
4.4.90.0030.02012.23
4.4.80.0000.03312.23
4.4.70.0030.03712.23
4.4.60.0030.03312.23
4.4.50.0030.03312.23
4.4.40.0000.05312.23
4.4.30.0070.03012.23
4.4.20.0030.03712.23
4.4.10.0100.03012.23
4.4.00.0000.05312.23
4.3.110.0000.04012.23
4.3.100.0030.02712.23
4.3.90.0030.03312.23
4.3.80.0030.05312.23
4.3.70.0000.03312.23
4.3.60.0030.03312.23
4.3.50.0070.02312.23
4.3.40.0030.05312.23
4.3.30.0030.03312.23
4.3.20.0000.03712.23
4.3.10.0030.03312.23
4.3.00.0000.03312.23

preferences:
36.3 ms | 401 KiB | 5 Q