3v4l.org

run code in 300+ PHP versions simultaneously
<?php $times = 10000; $var = null; $var = new stdClass(); $time1 = microtime(true); for ($i = 0; $i <= $times; $i++) { if (!$var) {} } $time1 = microtime(true) - $time1; echo "Time using '!': $time1\n"; $time2 = microtime(true); for ($i = 0; $i <= $times; $i++) { if ($var === null) {} } $time2 = microtime(true) - $time2; echo "Time using '===': $time2\n"; if ($time1 > $time2){ $p = (($time1-$time2)/$time2) * 100; printf("'===' was faster by %.2f percent.", $p); } else { $p = (($time2-$time1)/$time1) * 100; printf("'!' was faster by %.2f percent.", $p); }

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.10.0030.01716.44
7.4.00.0130.00616.20
7.3.130.0070.01316.41
7.3.120.0070.01116.51
7.3.110.0090.00616.33
7.3.100.0130.00316.49
7.3.90.0030.01016.37
7.3.80.0070.01016.43
7.3.70.0060.00616.53
7.3.60.0030.01216.45
7.3.50.0100.00616.41
7.3.40.0090.00616.21
7.3.30.0140.00316.21
7.3.20.0130.00018.28
7.3.10.0110.00717.01
7.3.00.0110.00617.02
7.2.260.0070.01416.53
7.2.250.0110.00716.47
7.2.240.0100.00716.46
7.2.230.0070.00316.70
7.2.220.0160.00316.68
7.2.210.0070.01116.45
7.2.200.0110.00716.71
7.2.190.0100.01016.52
7.2.180.0030.00916.62
7.2.170.0070.01016.41
7.2.160.0030.00916.61
7.2.150.0070.00718.51
7.2.140.0060.00918.30
7.2.130.0060.00817.35
7.2.120.0080.01017.43
7.2.110.0120.00317.11
7.2.100.0100.00617.26
7.2.90.0080.00617.30
7.2.80.0060.00817.17
7.2.70.0060.01117.12
7.2.60.0070.00717.21
7.2.50.0110.00617.34
7.2.40.0100.00517.42
7.2.30.0040.01217.50
7.2.20.0100.00717.26
7.2.10.0140.00417.36
7.2.00.0090.00917.84
7.1.330.0030.01617.46
7.1.320.0040.01117.50
7.1.310.0040.00717.31
7.1.300.0060.00817.32
7.1.290.0130.00317.47
7.1.280.0060.01017.25
7.1.270.0090.00617.41
7.1.260.0000.01517.43
7.1.250.0060.00916.21
7.1.240.0050.00816.55
7.1.230.0060.00816.66
7.1.220.0050.00916.49
7.1.210.0060.00816.45
7.1.200.0080.00616.61
7.1.190.0060.00816.51
7.1.180.0080.00816.33
7.1.170.0050.00716.49
7.1.160.0030.00916.57
7.1.150.0070.00716.39
7.1.140.0050.00716.59
7.1.130.0030.01116.65
7.1.120.0090.00516.46
7.1.110.0030.01016.59
7.1.100.0060.00816.56
7.1.90.0060.00716.49
7.1.80.0110.00516.56
7.1.70.0030.00916.71
7.1.60.0080.01017.52
7.1.50.0110.00922.65
7.1.40.0060.00816.57
7.1.30.0060.00616.56
7.1.20.0080.00816.50
7.1.10.0060.00816.57
7.1.00.0030.02218.46
7.0.330.0040.01016.10
7.0.320.0030.01216.20
7.0.310.0090.00516.22
7.0.300.0000.01416.35
7.0.290.0010.01316.22
7.0.280.0070.00715.96
7.0.270.0020.01016.11
7.0.260.0080.00816.17
7.0.250.0070.00516.28
7.0.240.0030.00916.12
7.0.230.0070.00516.10
7.0.220.0050.00916.25
7.0.210.0030.01016.31
7.0.200.0050.00816.43
7.0.190.0070.01016.29
7.0.180.0070.00816.13
7.0.170.0030.01316.23
7.0.160.0060.00616.22
7.0.150.0040.01216.21
7.0.140.0010.03518.24
7.0.130.0030.00916.20
7.0.120.0070.00516.21
7.0.110.0070.00616.14
7.0.100.0020.01016.10
7.0.90.0060.00816.02
7.0.80.0050.00916.26
7.0.70.0050.03317.90
7.0.60.0060.02718.08
7.0.50.0060.03018.17
7.0.40.0050.03416.18
7.0.30.0080.03016.15
7.0.20.0060.03116.15
7.0.10.0050.03016.15
7.0.00.0080.03216.18
5.6.400.0070.01015.77
5.6.390.0030.01616.06
5.6.380.0080.00714.98
5.6.370.0060.00815.08
5.6.360.0070.01015.17
5.6.350.0030.01215.03
5.6.340.0040.01215.18
5.6.330.0060.00714.99
5.6.320.0040.00915.25
5.6.310.0040.00915.27
5.6.300.0080.00814.92
5.6.290.0050.01315.17
5.6.280.0020.03617.02
5.6.270.0040.01115.04
5.6.260.0040.00715.07
5.6.250.0060.00815.30
5.6.240.0030.01014.98
5.6.230.0070.01014.94
5.6.220.0100.03416.79
5.6.210.0120.02816.87
5.6.200.0030.03417.15
5.6.190.0040.02717.16
5.6.180.0070.03417.09
5.6.170.0040.03717.15
5.6.160.0080.03016.95
5.6.150.0080.03417.03
5.6.140.0090.03417.01
5.6.130.0080.03517.07
5.6.120.0030.03017.07
5.6.110.0060.03216.95
5.6.100.0030.02817.03
5.6.90.0040.03617.09
5.6.80.0060.03416.74
5.6.70.0030.03616.94
5.6.60.0060.01916.92
5.6.50.0070.01816.80
5.6.40.0050.02016.81
5.6.30.0040.02016.83
5.6.20.0070.01816.77
5.6.10.0030.02016.72
5.6.00.0050.02116.89
5.5.380.0070.01013.38
5.5.370.0030.01213.26
5.5.360.0020.03615.70
5.5.350.0040.03215.62
5.5.340.0030.03215.95
5.5.330.0080.03115.92
5.5.320.0100.02815.81
5.5.310.0050.02815.89
5.5.300.0060.03415.82
5.5.290.0100.03016.04
5.5.280.0040.03015.94
5.5.270.0040.02515.99
5.5.260.0050.02415.73
5.5.250.0030.03415.77
5.5.240.0050.03315.68
5.5.230.0020.03215.50
5.5.220.0030.02115.82
5.5.210.0080.02015.68
5.5.200.0040.02615.71
5.5.190.0040.01715.71
5.5.180.0010.02115.59
5.5.170.0080.00813.42
5.5.160.0030.02115.71
5.5.150.0030.02215.81
5.5.140.0040.02215.59
5.5.130.0040.02115.55
5.5.120.0040.01615.68
5.5.110.0050.01715.71
5.5.100.0040.02215.56
5.5.90.0060.01915.54
5.5.80.0040.01615.74
5.5.70.0010.02315.62
5.5.60.0060.01615.62
5.5.50.0020.01915.62
5.5.40.0060.01615.54
5.5.30.0040.01515.59
5.5.20.0030.01815.59
5.5.10.0040.01515.64
5.5.00.0060.01815.53
5.4.450.0050.03414.18
5.4.440.0050.02714.21
5.4.430.0070.02214.28
5.4.420.0060.02814.30
5.4.410.0060.03214.29
5.4.400.0060.03114.19
5.4.390.0050.03414.09
5.4.380.0010.02214.03
5.4.370.0070.01514.09
5.4.360.0030.01914.14
5.4.350.0040.01814.08
5.4.340.0060.01614.15
5.4.330.0050.01211.69
5.4.320.0040.02114.15
5.4.310.0040.02014.22
5.4.300.0060.01714.18
5.4.290.0030.02114.05
5.4.280.0030.02314.09
5.4.270.0060.01314.12
5.4.260.0040.01814.10
5.4.250.0020.01814.23
5.4.240.0030.01914.07
5.4.230.0060.01714.13
5.4.220.0030.02014.13
5.4.210.0030.01814.17
5.4.200.0040.01814.15
5.4.190.0060.01714.10
5.4.180.0060.01514.09
5.4.170.0070.01914.13
5.4.160.0040.01814.04
5.4.150.0070.02914.11
5.4.140.0050.03313.25
5.4.130.0040.03313.30
5.4.120.0120.03013.24
5.4.110.0060.02013.18
5.4.100.0120.03013.27
5.4.90.0070.03313.18
5.4.80.0080.03013.30
5.4.70.0120.03113.19
5.4.60.0130.02613.20
5.4.50.0080.02113.19
5.4.40.0090.02013.16
5.4.30.0060.02813.23
5.4.20.0150.02613.16
5.4.10.0150.01813.29
5.4.00.0100.02613.10
5.3.290.0030.02812.73
5.3.280.0040.01912.68
5.3.270.0060.01912.63
5.3.260.0020.02512.68
5.3.250.0030.02512.69
5.3.240.0080.02812.68
5.3.230.0030.03212.65
5.3.220.0050.03212.64
5.3.210.0060.02612.54
5.3.200.0070.02112.54
5.3.190.0070.02512.53
5.3.180.0020.03412.58
5.3.170.0040.03212.58
5.3.160.0100.02512.55
5.3.150.0090.03512.66
5.3.140.0070.02912.55
5.3.130.0050.03212.52
5.3.120.0050.02012.55
5.3.110.0060.02512.63
5.3.100.0060.02512.47
5.3.90.0020.03012.50
5.3.80.0060.03312.28
5.3.70.0020.03312.36
5.3.60.0060.03112.33
5.3.50.0060.03512.42
5.3.40.0090.02912.39
5.3.30.0080.03012.41
5.3.20.0030.03412.35
5.3.10.0050.03312.24
5.3.00.0040.02912.17
5.2.170.0050.03910.39
5.2.160.0130.03510.34
5.2.150.0130.03510.42
5.2.140.0070.03610.38
5.2.130.0090.04010.39
5.2.120.0110.03510.30
5.2.110.0080.03910.36
5.2.100.0090.02010.36
5.2.90.0100.01910.40
5.2.80.0040.02210.28
5.2.70.0170.02210.40
5.2.60.0060.03610.28
5.2.50.0140.02810.34
5.2.40.0090.03010.32
5.2.30.0150.03510.28
5.2.20.0150.03310.24
5.2.10.0110.03710.33
5.2.00.0120.03410.15
5.1.60.0160.0309.99
5.1.50.0140.0319.99
5.1.40.0170.0329.99
5.1.30.0170.02510.02
5.1.20.0140.03310.01
5.1.10.0190.0229.99
5.1.00.0160.0289.99
5.0.50.0110.0319.99
5.0.40.0100.0309.99
5.0.30.0160.0419.99
5.0.20.0080.0329.99
5.0.10.0140.0339.99
5.0.00.0070.0459.99
4.4.90.0030.0229.99
4.4.80.0050.0219.99
4.4.70.0130.0259.99
4.4.60.0080.0269.99
4.4.50.0140.0259.99
4.4.40.0050.0369.99
4.4.30.0060.0299.99
4.4.20.0080.0279.99
4.4.10.0060.0269.99
4.4.00.0100.0369.99
4.3.110.0060.0289.99
4.3.100.0140.0249.99
4.3.90.0080.0309.99
4.3.80.0080.0409.99
4.3.70.0080.0309.99
4.3.60.0100.0249.99
4.3.50.0060.0319.99
4.3.40.0160.0319.99
4.3.30.0090.0269.99
4.3.20.0100.0269.99
4.3.10.0090.0269.99
4.3.00.0050.0289.99

preferences:
41.82 ms | 401 KiB | 5 Q