3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count = 1000000; class ValueObject {} $time = microtime(true); for ($i = 0; $i < $count; $i++) { $item = new ValueObject(); } $spentTime = microtime(true) - $time; echo 'create array test took ' . number_format($spentTime, 3) . ' seconds';

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.2.00.0030.06319.12
7.1.70.0030.07716.91
7.1.60.0070.12019.46
7.1.50.0130.10616.98
7.1.00.0000.17022.45
7.0.200.0030.06416.71
7.0.140.0030.17322.08
7.0.100.0330.11720.17
7.0.90.0370.14319.93
7.0.80.0400.12719.98
7.0.70.0430.13019.86
7.0.60.0430.15019.86
7.0.50.0470.14020.21
7.0.40.0030.15720.00
7.0.30.0170.16320.04
7.0.20.0000.13320.14
7.0.10.0030.14720.10
7.0.00.0130.15720.07
5.6.280.0030.30320.86
5.6.250.0030.18320.57
5.6.240.0100.16720.65
5.6.230.0030.16320.69
5.6.220.0030.20320.59
5.6.210.0130.18320.61
5.6.200.0030.17721.04
5.6.190.0100.20020.96
5.6.180.0100.19321.02
5.6.170.0070.20021.00
5.6.160.0030.19021.01
5.6.150.0100.18020.99
5.6.140.0200.17721.04
5.6.130.0070.21021.09
5.6.120.0100.19320.94
5.6.110.0100.20021.04
5.6.100.0070.18721.10
5.6.90.0170.11721.01
5.6.80.0100.17020.40
5.6.70.0070.18720.48
5.6.60.0170.17720.44
5.6.50.0030.20720.47
5.6.40.0030.13020.44
5.6.30.0030.13320.29
5.6.20.0070.17020.41
5.6.10.0100.17720.43
5.6.00.0070.14720.39
5.5.380.0070.20320.52
5.5.370.0070.18320.50
5.5.360.0130.19720.35
5.5.350.0130.18720.48
5.5.340.0100.18320.80
5.5.330.0170.19720.89
5.5.320.0100.19720.88
5.5.310.0130.22020.78
5.5.300.0070.19720.89
5.5.290.0100.17020.93
5.5.280.0030.20320.79
5.5.270.0130.19720.74
5.5.260.0100.27720.86
5.5.250.0130.16720.66
5.5.240.0100.18720.19
5.5.230.0030.20720.24
5.5.220.0070.20320.29
5.5.210.0130.18720.25
5.5.200.0000.15020.21
5.5.190.0070.14020.18
5.5.180.0070.14020.25
5.5.160.0070.20720.23
5.5.150.0170.20320.21
5.5.140.0100.16320.13
5.5.130.0030.15020.11
5.5.120.0100.15320.10
5.5.110.0030.14019.97
5.5.100.0030.15320.16
5.5.90.0030.14319.97
5.5.80.0000.14720.14
5.5.70.0030.14719.96
5.5.60.0000.19720.05
5.5.50.0100.16020.15
5.5.40.0000.16020.02
5.5.30.0070.17320.05
5.5.20.0030.14020.10
5.5.10.0000.14720.02
5.5.00.0130.18020.13
5.4.450.0100.20319.28
5.4.440.0100.20319.30
5.4.430.0100.22019.29
5.4.420.0100.20019.53
5.4.410.0100.18719.32
5.4.400.0000.18719.09
5.4.390.0070.14319.30
5.4.380.0070.20319.21
5.4.370.0030.17019.30
5.4.360.0030.14319.27
5.4.350.0070.16719.31
5.4.340.0070.14019.16
5.4.320.0000.14319.01
5.4.310.0030.16718.95
5.4.300.0070.20319.13
5.4.290.0070.17019.12
5.4.280.0130.18019.01
5.4.270.0000.14318.96
5.4.260.0070.15319.09
5.4.250.0100.15019.26
5.4.240.0070.11719.12
5.4.230.0030.13019.02
5.4.220.0030.14319.09
5.4.210.0230.12719.14
5.4.200.0100.20319.22
5.4.190.0100.16319.22
5.4.180.0030.20718.97
5.4.170.0030.20019.21
5.4.160.0070.20719.02
5.4.150.0130.19718.94
5.4.140.0130.17716.34
5.4.130.0030.14716.44
5.4.120.0070.17716.39
5.4.110.0100.17716.32
5.4.100.0030.17016.51
5.4.90.0000.20016.41
5.4.80.0070.19316.50
5.4.70.0200.17716.50
5.4.60.0100.19016.37
5.4.50.0100.17716.25
5.4.40.0230.16716.51
5.4.30.0000.20716.48
5.4.20.0070.19016.52
5.4.10.0130.18716.24
5.4.00.0030.19015.78
5.3.290.0000.30314.78
5.3.280.0070.30714.63
5.3.270.0100.35014.65
5.3.260.0070.26714.71
5.3.250.0100.32014.61
5.3.240.0030.33014.64
5.3.230.0100.33014.58
5.3.220.0030.33014.61
5.3.210.0030.28314.58
5.3.200.0070.35314.61
5.3.190.0100.34014.61
5.3.180.0100.31714.57
5.3.170.0070.33714.59
5.3.160.0170.31314.57
5.3.150.0030.32314.70
5.3.140.0100.32714.59
5.3.130.0030.34314.59
5.3.120.0070.37714.67
5.3.110.0030.32714.60
5.3.100.0070.32014.16
5.3.90.0100.32014.13
5.3.80.0070.32014.14
5.3.70.0100.32314.13
5.3.60.0070.33714.11
5.3.50.0070.33313.88
5.3.40.0130.35313.87
5.3.30.0070.35014.01
5.3.20.0100.32713.59
5.3.10.0070.36013.75
5.3.00.0070.34713.53
5.2.170.0170.33011.39
5.2.160.0030.32711.38
5.2.150.0070.31711.36
5.2.140.0030.36711.38
5.2.130.0030.32311.34
5.2.120.0070.33711.15
5.2.110.0070.34011.25
5.2.100.0030.35011.20
5.2.90.0100.32311.24
5.2.80.0070.35311.33
5.2.70.0030.35311.14
5.2.60.0030.33311.22
5.2.50.0030.36711.25
5.2.40.0030.34711.23
5.2.30.0070.33311.29
5.2.20.0000.34711.00
5.2.10.0070.32311.11
5.2.00.0030.35310.84
5.1.60.0030.32710.01
5.1.50.0000.33710.25
5.1.40.0000.27010.01
5.1.30.0070.28010.45
5.1.20.0000.33010.48
5.1.10.0070.32310.18
5.1.00.0000.32010.10
5.0.50.0030.4178.80
5.0.40.0030.4078.50
5.0.30.0130.4038.43
5.0.20.0070.4078.45
5.0.10.0000.4338.39
5.0.00.0030.4108.39
4.4.90.0030.4178.07
4.4.80.0000.3938.07
4.4.70.0070.3938.07
4.4.60.0030.4378.07
4.4.50.0030.3938.07
4.4.40.0070.4038.07
4.4.30.0070.3808.07
4.4.20.0030.3738.07
4.4.10.0030.4038.07
4.4.00.0030.3838.07
4.3.110.0000.3838.07
4.3.100.0000.3938.07
4.3.90.0070.4078.07
4.3.80.0000.3408.07
4.3.70.0000.4208.07
4.3.60.0030.4008.07
4.3.50.0030.3778.07
4.3.40.0000.4008.07
4.3.30.0070.3808.07
4.3.20.0000.4008.07
4.3.10.0000.3978.07
4.3.00.0000.4278.07

preferences:
35.2 ms | 401 KiB | 5 Q