3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $a = 5; private $b = 10; private $c = 15; private $d = 20; } $instances = []; $s = microtime(true); for ($i = 0; $i < 1000000; $i++) { $instances[] = new A(); } var_dump(microtime(true) - $s); $instances = []; $instance = new A(); $s = microtime(true); for ($i = 0; $i < 1000000; $i++) { $instances[] = 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.3.10.0590.04972.62
7.3.00.0940.02772.53
7.2.130.0960.04572.75
7.2.120.1090.03772.49
7.2.110.1220.07172.77
7.2.100.1350.03472.77
7.2.90.1640.05772.56
7.2.80.1340.05272.82
7.2.70.1080.02548.65
7.2.60.1450.05472.68
7.2.50.0410.00312.05
7.2.40.1870.04072.33
7.2.30.1690.06372.77
7.2.20.1710.04472.86
7.2.10.1540.05172.81
7.2.00.1410.05473.94
7.1.250.0770.07071.68
7.1.70.0070.04173.04
7.1.60.0300.06973.06
7.1.50.0200.06073.23
7.1.00.0130.12778.38
7.0.201.3840.05072.00
7.0.140.0170.11777.99
7.0.60.0230.13776.02
7.0.50.0200.08773.89
7.0.40.0330.07337.85
7.0.30.0730.12737.84
7.0.20.1100.11737.86
7.0.10.0200.13737.84
7.0.00.0230.14337.73
5.6.280.0370.14783.29
5.6.210.0400.15781.80
5.6.200.0300.14379.28
5.6.190.0070.11781.54
5.6.180.0570.13781.62
5.6.170.0370.10081.47
5.6.160.0370.13781.48
5.6.150.0170.16779.27
5.6.140.0370.15079.14
5.6.130.0130.10379.31
5.6.120.0300.16082.15
5.6.110.0370.08082.14
5.6.100.0370.13782.19
5.6.90.0400.14782.19
5.6.80.0400.13781.54
5.5.350.6300.12081.84
5.5.340.0430.13779.40
5.5.330.0300.13381.65
5.5.320.0500.14381.59
5.5.310.0600.15781.71
5.5.300.0230.18079.43
5.5.290.0370.10779.42
5.5.280.0200.14082.35
5.5.270.0370.15782.18
5.5.260.0470.15082.32
5.5.250.0330.15382.16
5.5.240.0500.15781.43
5.4.450.0570.15080.60
5.4.440.0500.15080.98
5.4.430.0530.09780.83
5.4.420.0500.15080.80
5.4.410.0430.13080.68
5.4.400.0530.13080.48
5.4.390.0600.11380.27
5.4.380.0430.11380.34
5.4.370.0470.11780.27
5.4.360.0530.10080.38
5.4.350.0670.13080.39
5.4.340.0330.11780.70
5.4.320.0370.16380.39
5.4.310.0500.15080.60
5.4.300.0570.15080.23
5.4.290.0500.14780.47
5.4.280.0400.16380.70
5.4.270.0700.09780.69
5.4.260.0600.14780.46
5.4.250.0430.10780.58
5.4.240.0600.08780.48
5.4.230.0370.11080.48
5.4.220.0630.12380.38
5.4.210.0500.10080.36
5.4.200.0470.13780.62
5.4.190.0600.13780.38
5.4.180.0570.14380.24
5.4.170.0570.13780.59
5.4.160.0700.13080.49
5.4.150.0570.15380.43
5.4.140.0530.13377.75
5.4.130.0330.15077.80
5.4.120.0630.12777.83
5.4.110.0500.14077.70
5.4.100.0530.13377.98
5.4.90.0670.14777.83
5.4.80.0570.14377.90
5.4.70.0500.13777.81
5.4.60.0570.14077.86
5.4.50.0500.12077.89
5.4.40.0600.08777.82
5.4.30.0400.16077.80
5.4.20.0470.10777.60
5.4.10.0570.14077.69
5.4.00.0400.10777.22
5.3.290.0200.03714.67
5.3.280.0170.04014.49
5.3.270.0270.06714.60
5.3.260.0230.06314.66
5.3.250.0300.07014.66
5.3.240.0300.06714.57
5.3.230.0230.04314.52
5.3.220.0300.06314.62
5.3.210.0330.07014.55
5.3.200.0270.06714.47
5.3.190.0270.06314.64
5.3.180.0300.03014.48
5.3.170.0430.03314.46
5.3.160.0200.05014.48
5.3.150.0300.04014.54
5.3.140.0200.04014.61
5.3.130.0270.06014.56
5.3.120.0300.04014.46
5.3.110.0370.05714.69
5.3.100.0330.05014.01
5.3.90.0200.06714.13
5.3.80.0270.04714.02
5.3.70.0230.05313.94
5.3.60.0300.06714.08
5.3.50.0270.03713.86
5.3.40.0230.04713.96
5.3.30.0300.06014.02
5.3.20.0230.07013.59
5.3.10.0430.04713.56
5.3.00.0230.04313.69
5.2.170.0270.02313.28
5.2.160.0170.04013.28
5.2.150.0230.06013.28
5.2.140.0270.05313.28
5.2.130.0230.04013.28
5.2.120.0170.06313.28
5.2.110.0330.04713.28
5.2.100.0170.03313.28
5.2.90.0270.06013.28
5.2.80.0200.06313.28
5.2.70.0230.05713.28
5.2.60.0300.05313.28
5.2.50.0200.04013.28
5.2.40.0130.03713.28
5.2.30.0200.06013.28
5.2.20.0170.04313.28
5.2.10.0130.04313.28
5.2.00.0200.05013.28
5.1.60.0200.02713.28
5.1.50.0200.02713.28
5.1.40.0230.03013.28
5.1.30.0230.05013.28
5.1.20.0200.04013.28
5.1.10.0170.05313.28
5.1.00.0200.03313.28
5.0.50.0030.02713.28
5.0.40.0100.01713.28
5.0.30.0200.02713.28
5.0.20.0130.02013.28
5.0.10.0070.02313.28
5.0.00.0130.05713.28
4.4.90.0100.01313.28
4.4.80.0100.01313.28
4.4.70.0100.03313.28
4.4.60.0130.02013.28
4.4.50.0170.02313.28
4.4.40.0070.03013.28
4.4.30.0130.03313.28
4.4.20.0100.02013.28
4.4.10.0100.02013.28
4.4.00.0100.05313.28
4.3.110.0070.02713.28
4.3.100.0070.02013.28
4.3.90.0100.01713.28
4.3.80.0100.05013.28
4.3.70.0130.03013.28
4.3.60.0070.02313.28
4.3.50.0100.03313.28
4.3.40.0070.05313.28
4.3.30.0000.03713.28
4.3.20.0030.04013.28
4.3.10.0030.01713.28
4.3.00.0000.02013.28

preferences:
37.51 ms | 400 KiB | 5 Q