3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test1() { $s = microtime(true); $var = null; for ($i = 0; $i < 1000000; $i++) { $condition = $var === null; } return microtime(true) - $s; } function test2() { $s = microtime(true); $var = null; for ($i = 0; $i < 1000000; $i++) { $condition = !isset($var); } return microtime(true) - $s; } function test3() { $s = microtime(true); $var = null; for ($i = 0; $i < 1000000; $i++) { $condition = empty($var); } return microtime(true) - $s; } echo test1() . "\n\n"; echo test2() . "\n\n"; echo test3() . "\n\n";

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.0070.05719.59
7.1.70.0030.06617.21
7.1.60.0160.08519.46
7.1.50.0100.09816.56
7.1.00.0030.14322.29
7.0.200.0000.06716.89
7.0.140.0130.13321.95
7.0.60.0030.08319.82
7.0.50.0070.13017.72
7.0.40.0000.10320.24
7.0.30.0570.11320.23
7.0.20.0230.09720.24
7.0.10.0130.13720.23
7.0.00.0100.13020.05
5.6.280.0030.31321.07
5.6.210.0170.17020.67
5.6.200.0100.20318.21
5.6.190.0100.13720.49
5.6.180.0370.18320.61
5.6.170.0370.15320.50
5.6.160.0070.14320.45
5.6.150.0130.20318.18
5.6.140.0000.14718.18
5.6.130.0100.18318.16
5.6.120.0130.19721.03
5.6.110.0100.20021.05
5.6.100.0130.17721.10
5.6.90.0030.21321.03
5.6.80.0070.20020.54
5.6.70.4130.13720.39
5.5.350.0170.18320.41
5.5.340.0130.16017.96
5.5.330.0100.13320.13
5.5.320.0100.20320.27
5.5.310.0330.18020.30
5.5.300.0000.19718.07
5.5.290.0170.17317.95
5.5.280.0170.16020.95
5.5.270.0230.18020.88
5.5.260.0100.17720.77
5.5.250.0070.16020.60
5.5.240.0270.18720.05
5.4.450.0830.20719.48
5.4.440.0300.28719.61
5.4.430.0300.23019.19
5.4.420.0230.22319.30
5.4.410.0300.23319.32
5.4.400.0130.21019.15
5.4.390.0170.20719.05
5.4.380.0200.19718.62
5.4.370.0270.18718.79
5.4.360.0330.19718.48
5.4.350.0330.19718.62
5.4.340.0330.19318.75
5.4.320.0090.13612.51
5.4.310.0080.14712.50
5.4.300.0060.14112.51
5.4.290.0050.14112.50
5.4.280.0130.22112.38
5.4.270.0120.21312.38
5.4.260.0130.23712.38
5.4.250.0100.21412.38
5.4.240.0100.21612.38
5.4.230.0110.21012.38
5.4.220.0130.23712.37
5.4.210.0100.25912.37
5.4.200.0230.37112.37
5.4.190.0120.29712.37
5.4.180.0140.23712.37
5.4.170.0110.20112.37
5.4.160.0210.20012.38
5.4.150.0140.22612.37
5.4.140.0150.22412.05
5.4.130.0080.21112.04
5.4.120.0100.21312.00
5.4.110.0170.29011.99
5.4.100.0130.26211.99
5.4.90.0180.25612.00
5.4.80.0090.23111.99
5.4.70.0110.22811.99
5.4.60.0120.22911.99
5.4.50.0130.22711.99
5.4.40.0160.23011.98
5.4.30.0120.23711.97
5.4.20.0110.24511.98
5.4.10.0080.25111.97
5.4.00.0120.24011.46
5.3.290.0100.21112.80
5.3.280.0150.28412.71
5.3.270.0170.29412.72
5.3.260.0090.29012.72
5.3.250.0120.29612.72
5.3.240.0120.39712.72
5.3.230.0120.28812.71
5.3.220.0160.29512.68
5.3.210.0120.31712.68
5.3.200.0120.26412.68
5.3.190.0180.27512.68
5.3.180.0220.41312.68
5.3.170.0130.37512.67
5.3.160.0120.31012.68
5.3.150.0130.31812.68
5.3.140.0100.28212.66
5.3.130.0100.31112.66
5.3.120.0130.30512.66
5.3.110.0100.30112.65
5.3.100.0090.28012.12
5.3.90.0110.22112.09
5.3.80.0050.21212.08
5.3.70.0080.19012.08
5.3.60.0070.23812.07
5.3.50.0120.27612.02
5.3.40.0090.27612.01
5.3.30.0110.29111.97
5.3.20.0090.28011.75
5.3.10.0100.27911.71
5.3.00.0090.24411.71
5.2.170.0140.4439.21
5.2.160.0130.4519.21
5.2.150.0060.4539.21
5.2.140.0130.4389.21
5.2.130.0100.4499.16
5.2.120.0120.5329.17
5.2.110.0120.4439.17
5.2.100.0080.4059.16
5.2.90.0120.3669.16
5.2.80.0080.4199.16
5.2.70.0150.3579.15
5.2.60.0110.4799.11
5.2.50.0070.4619.09
5.2.40.0090.4829.06
5.2.30.0100.4749.03
5.2.20.0090.5989.02
5.2.10.0110.5298.95
5.2.00.0140.4898.82
5.1.60.0110.4428.10
5.1.50.0070.5428.10
5.1.40.0080.5008.08
5.1.30.0070.4358.42
5.1.20.0050.3248.45
5.1.10.0080.3368.18
5.1.00.0140.5748.18
5.0.50.0070.8976.66
5.0.40.0080.7746.51
5.0.30.0070.9466.32
5.0.20.0050.6376.29
5.0.10.0050.6946.28
5.0.00.0050.9486.26
4.4.90.0101.0454.78
4.4.80.0110.9434.75
4.4.70.0060.9964.76
4.4.60.0060.9904.75
4.4.50.0071.0864.77
4.4.40.0041.2184.71
4.4.30.0091.0854.76
4.4.20.0060.8264.85
4.4.10.0081.2344.85
4.4.00.0111.2004.76
4.3.110.0090.8394.67
4.3.100.0110.7104.66
4.3.90.0050.8384.63
4.3.80.0060.8434.58
4.3.70.0061.0344.63
4.3.60.0201.1144.63
4.3.50.0110.8534.63
4.3.40.0041.1534.53
4.3.30.0200.9683.33
4.3.20.0040.9163.31
4.3.10.0070.7453.28
4.3.00.0000.51010.30

preferences:
33.6 ms | 400 KiB | 5 Q