3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iterations = 10000; class A { protected $number; public function __construct() { $this->number = mt_rand(1, 10000); } } for ($i = 0; $i <= $iterations; ++$i) { $someVariable = new A; }

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.120.0030.01414.91
7.3.110.0030.00914.68
7.3.100.0040.01114.88
7.3.90.0090.00614.80
7.3.80.0030.00714.61
7.3.70.0060.00914.61
7.3.60.0120.00314.63
7.3.50.0030.00814.67
7.3.40.0000.01114.57
7.3.30.0030.01014.63
7.3.20.0060.00616.81
7.3.10.0060.00816.45
7.3.00.0000.01016.63
7.2.240.0150.00315.13
7.2.230.0060.01015.09
7.2.220.0060.00615.14
7.2.210.0050.01315.00
7.2.200.0020.01214.80
7.2.190.0040.01514.71
7.2.180.0060.01014.86
7.2.170.0080.00814.96
7.2.160.0100.00614.91
7.2.150.0070.01016.95
7.2.140.0050.00816.98
7.2.130.0060.00617.01
7.2.120.0040.01416.85
7.2.110.0030.01016.87
7.2.100.0060.00916.77
7.2.90.0060.00916.95
7.2.80.0030.00816.80
7.2.70.0090.00616.96
7.2.60.0060.01216.97
7.2.50.0060.00616.66
7.2.40.0000.01816.69
7.2.30.0030.00917.03
7.2.20.0000.01716.80
7.2.10.0100.00616.79
7.2.00.0080.01116.95
7.1.330.0120.00615.64
7.1.320.0060.00915.43
7.1.310.0040.01115.59
7.1.300.0070.01115.56
7.1.290.0000.01915.82
7.1.280.0070.01015.80
7.1.270.0030.01415.74
7.1.260.0030.01315.52
7.1.250.0000.01615.72
7.1.70.0030.01317.18
7.1.60.0130.01319.40
7.1.50.0000.01516.61
7.1.00.0130.07022.57
7.0.200.0000.01016.73
7.0.140.0070.07322.06
7.0.60.0070.07719.80
7.0.50.0070.08717.86
7.0.40.0000.04720.23
7.0.30.0200.04020.08
7.0.20.0270.05720.15
7.0.10.0070.09320.24
7.0.00.0000.07020.25
5.6.280.0000.08321.08
5.6.210.0000.05020.52
5.6.200.0030.09318.22
5.6.190.0100.09320.51
5.6.180.0270.07320.77
5.6.170.0130.05020.62
5.6.160.0030.09720.71
5.6.150.0000.04718.18
5.6.140.0130.06718.28
5.6.130.0070.08718.18
5.6.120.0070.09020.96
5.6.110.0100.08020.98
5.6.100.0030.04721.04
5.6.90.0130.07721.00
5.6.80.0030.08020.44
5.5.350.0170.04320.34
5.5.340.0200.07018.09
5.5.330.0070.09020.40
5.5.320.0170.05720.34
5.5.310.0270.08720.34
5.5.300.0000.04317.95
5.5.290.0070.09017.95
5.5.280.0100.07320.65
5.5.270.0130.08020.73
5.5.260.0000.07320.96
5.5.250.0030.04320.68
5.5.240.0030.08020.16
5.4.450.0870.05319.48
5.4.440.0800.06019.52
5.4.430.0700.04719.68
5.4.420.0630.05019.54
5.4.410.0030.08019.00
5.4.400.0370.06718.86
5.4.390.0330.06018.73
5.4.380.0130.05718.81
5.4.370.0070.05718.72
5.4.360.0070.06018.72
5.4.350.0070.03612.02
5.4.340.0070.04812.02
5.4.320.0070.04412.50
5.4.310.0050.04212.50
5.4.300.0050.04012.50
5.4.290.0020.04512.50
5.4.280.0040.04012.39
5.4.270.0060.03912.40
5.4.260.0050.04212.39
5.4.250.0060.04012.39
5.4.240.0060.03912.39
5.4.230.0030.04312.39
5.4.220.0060.04012.39
5.4.210.0030.04112.38
5.4.200.0040.04212.39
5.4.190.0060.03812.39
5.4.180.0050.04912.38
5.4.170.0070.03812.40
5.4.160.0060.03912.39
5.4.150.0090.03612.39
5.4.140.0070.04312.07
5.4.130.0030.04112.05
5.4.120.0080.04612.02
5.4.110.0070.04812.01
5.4.100.0100.03912.01
5.4.90.0060.04012.01
5.4.80.0090.03712.01
5.4.70.0040.04012.01
5.4.60.0040.04012.00
5.4.50.0070.03812.01
5.4.40.0100.03911.99
5.4.30.0100.04911.99
5.4.20.0060.04611.99
5.4.10.0080.04111.99
5.4.00.0070.04211.49
5.3.290.0070.04412.80
5.3.280.0030.04512.71
5.3.270.0030.04712.72
5.3.260.0030.04812.71
5.3.250.0060.04212.72
5.3.240.0050.04412.72
5.3.230.0100.03912.71
5.3.220.0050.04412.68
5.3.210.0070.04912.68
5.3.200.0070.03912.68
5.3.190.0060.04812.68
5.3.180.0070.04212.68
5.3.170.0110.04312.67
5.3.160.0050.04312.67
5.3.150.0060.04112.67
5.3.140.0030.04912.66
5.3.130.0070.04312.66
5.3.120.0080.04612.66
5.3.110.0080.04112.65
5.3.100.0050.04212.12
5.3.90.0060.04112.10
5.3.80.0110.05512.09
5.3.70.0110.05512.09
5.3.60.0060.04012.07
5.3.50.0080.04312.03
5.3.40.0060.04712.03
5.3.30.0060.04011.98
5.3.20.0050.04011.77
5.3.10.0050.03911.73
5.3.00.0070.04611.71
5.2.170.0040.0369.23
5.2.160.0120.0319.22
5.2.150.0040.0379.22
5.2.140.0030.0369.22
5.2.130.0030.0359.18
5.2.120.0080.0359.18
5.2.110.0070.0369.19
5.2.100.0050.0349.18
5.2.90.0040.0349.18
5.2.80.0070.0329.18
5.2.70.0040.0409.18
5.2.60.0050.0389.13
5.2.50.0050.0349.10
5.2.40.0050.0359.07
5.2.30.0050.0379.05
5.2.20.0030.0379.03
5.2.10.0060.0408.93
5.2.00.0040.0338.80
5.1.60.0070.0278.09
5.1.50.0050.0298.08
5.1.40.0060.0328.07
5.1.30.0020.0328.41
5.1.20.0020.0358.44
5.1.10.0020.0338.16
5.1.00.0040.0318.16
5.0.50.0070.0266.64
5.0.40.0060.0296.50
5.0.30.0050.0466.31
5.0.20.0030.0286.27
5.0.10.0060.0326.25
5.0.00.0020.0406.25
4.4.90.0010.0164.78
4.4.80.0030.0164.76
4.4.70.0020.0164.75
4.4.60.0020.0154.76
4.4.50.0030.0164.77
4.4.40.0040.0254.71
4.4.30.0030.0154.76
4.4.20.0030.0264.84
4.4.10.0040.0144.85
4.4.00.0010.0264.76
4.3.110.0010.0174.67
4.3.100.0000.0174.66
4.3.90.0020.0184.63
4.3.80.0010.0294.58
4.3.70.0030.0144.63
4.3.60.0010.0164.63
4.3.50.0030.0144.63
4.3.40.0040.0224.54
4.3.30.0010.0173.30
4.3.20.0010.0173.28
4.3.10.0010.0163.23
4.3.00.0170.0177.12

preferences:
44.76 ms | 400 KiB | 5 Q