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";

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.00.0120.04814.99
7.3.120.0110.05314.65
7.3.110.0080.05414.76
7.3.100.0070.04314.90
7.3.90.0130.03414.88
7.3.80.0060.04214.89
7.3.70.0060.03814.86
7.3.60.0050.03814.84
7.3.50.0020.04214.78
7.3.40.0050.03814.82
7.3.30.0070.04014.69
7.3.20.0030.04016.65
7.3.10.0070.03816.75
7.3.00.0030.04416.61
7.2.250.0110.04115.03
7.2.240.0100.05715.05
7.2.230.0100.03915.19
7.2.220.0060.03915.18
7.2.210.0030.04715.06
7.2.200.0050.04314.99
7.2.190.0020.04714.98
7.2.180.0050.04315.04
7.2.170.0050.04215.06
7.2.160.0070.04315.10
7.2.150.0030.04717.01
7.2.140.0100.03616.99
7.2.130.0070.04016.78
7.2.120.0030.05017.04
7.2.110.0070.05316.88
7.2.100.0030.04016.87
7.2.90.0070.04717.04
7.2.80.0030.04417.07
7.2.70.0070.04316.94
7.2.60.0100.04017.11
7.2.50.0070.04717.03
7.2.40.0060.04516.74
7.2.30.0030.05116.77
7.2.20.0030.04817.11
7.2.10.0130.03616.93
7.2.00.0050.04418.06
7.1.330.0070.12215.83
7.1.320.0020.12215.74
7.1.310.0030.11315.94
7.1.300.0030.10815.96
7.1.290.0070.11315.85
7.1.280.0030.11215.79
7.1.270.0020.11115.69
7.1.260.0030.10915.72
7.1.250.0070.11315.62
7.1.240.0030.13715.84
7.1.230.0030.10815.93
7.1.220.0030.12215.63
7.1.210.0070.11015.80
7.1.200.0030.10615.97
7.1.190.0070.10715.90
7.1.180.0030.11015.83
7.1.170.0000.11515.93
7.1.160.0030.11315.76
7.1.150.0100.11215.76
7.1.140.0030.12115.77
7.1.130.0070.11815.63
7.1.120.0070.10515.58
7.1.110.0000.12515.77
7.1.100.0070.10515.76
7.1.90.0000.11415.57
7.1.80.0000.12415.60
7.1.70.0020.07816.33
7.1.60.0050.09517.49
7.1.50.0080.08516.33
7.1.40.0070.10415.99
7.1.30.0100.12515.73
7.1.20.0030.12115.54
7.1.10.0030.11115.69
7.1.00.0030.11719.01
7.0.330.0030.11315.13
7.0.320.0070.10915.37
7.0.310.0070.10615.37
7.0.300.0030.13215.60
7.0.290.0070.12115.42
7.0.280.0030.12215.46
7.0.270.0130.10615.58
7.0.260.0070.12515.45
7.0.250.0100.12315.55
7.0.240.0030.11515.63
7.0.230.0100.11215.61
7.0.220.0070.10915.40
7.0.210.0030.11115.42
7.0.200.0020.07816.06
7.0.190.0030.12015.52
7.0.180.0030.11215.36
7.0.170.0100.11915.50
7.0.160.0000.11715.14
7.0.150.0070.11515.46
7.0.140.0030.11918.83
7.0.130.0070.11615.49
7.0.120.0030.11118.62
7.0.110.0050.10718.74
7.0.100.0030.08218.86
7.0.90.0020.12118.63
7.0.80.0050.10618.76
7.0.70.0070.08618.70
7.0.60.0050.11718.61
7.0.50.0050.13718.81
7.0.40.0030.10316.66
7.0.30.0020.10516.80
7.0.20.0050.09416.69
7.0.10.0020.11916.65
7.0.00.0050.10116.78
5.6.400.0030.23714.29
5.6.390.0030.24414.20
5.6.380.0070.26114.38
5.6.370.0000.26514.30
5.6.360.0100.24614.09
5.6.350.0030.26014.41
5.6.340.0070.24514.48
5.6.330.0100.25214.20
5.6.320.0130.23514.55
5.6.310.0070.24014.01
5.6.300.0100.23414.57
5.6.290.0070.24614.38
5.6.280.0050.23617.74
5.6.270.0050.22417.68
5.6.260.0120.22917.47
5.6.250.0050.23217.72
5.6.240.0130.18317.45
5.6.230.0030.19417.77
5.6.220.0070.18317.70
5.6.210.0050.18517.68
5.6.200.0050.22317.55
5.6.190.0070.17317.77
5.6.180.0020.20017.79
5.6.170.0030.22717.56
5.6.160.0020.17417.53
5.6.150.0020.19217.52
5.6.140.0050.19617.73
5.6.130.0030.18917.44
5.6.120.0070.19617.59
5.6.110.0030.18717.70
5.6.100.0070.17517.62
5.6.90.0050.17317.62
5.6.80.0030.18417.10
5.6.70.0080.19417.26
5.6.60.0030.18717.38
5.6.50.0020.21217.35
5.6.40.0030.19917.13
5.6.30.0050.19517.24
5.6.20.0020.18017.28
5.6.10.0000.20517.28
5.6.00.0080.18217.15
5.5.380.0030.19316.06
5.5.370.0050.17316.02
5.5.360.0020.21415.91
5.5.350.0050.19215.90
5.5.340.0080.20716.21
5.5.330.0050.19916.24
5.5.320.0050.19316.09
5.5.310.0070.19616.28
5.5.300.0030.17516.11
5.5.290.0050.19916.30
5.5.280.0020.21116.09
5.5.270.0000.19316.02
5.5.260.0030.19816.23
5.5.250.0020.20915.90
5.5.240.0030.20015.92
5.5.230.0020.18715.75
5.5.220.0020.18115.76
5.5.210.0000.18615.94
5.5.200.0050.20915.68
5.5.190.0070.18415.71
5.5.180.0150.17015.74
5.5.170.0030.25214.45
5.5.160.0050.18715.79
5.5.150.0000.21115.73
5.5.140.0000.20915.73
5.5.130.0070.19315.68
5.5.120.0050.18515.93
5.5.110.0020.20015.65
5.5.100.0050.20515.83
5.5.90.0030.21315.69
5.5.80.0030.17415.80
5.5.70.0000.17915.57
5.5.60.0000.17815.63
5.5.50.0050.17815.86
5.5.40.0020.18315.71
5.5.30.0070.20015.60
5.5.20.0050.19715.82
5.5.10.0020.18415.70
5.5.00.0030.17315.84
5.4.450.0050.21816.36
5.4.440.0030.17816.37
5.4.430.0020.18716.36
5.4.420.0050.18116.29
5.4.410.0030.17616.29
5.4.400.0000.17916.20
5.4.390.0020.17616.20
5.4.380.0020.17516.12
5.4.370.0020.18816.22
5.4.360.0050.17516.21
5.4.350.0030.19516.12
5.4.340.0000.18016.25
5.4.330.0030.23213.33
5.4.320.0050.19716.20
5.4.310.0050.16816.12
5.4.300.0030.19616.27
5.4.290.0020.18516.24
5.4.280.0000.18616.19
5.4.270.0020.20416.13
5.4.260.0000.20716.19
5.4.250.0020.17416.20
5.4.240.0070.19016.17
5.4.230.0020.16916.28
5.4.220.0020.19816.19
5.4.210.0030.19316.19
5.4.200.0130.17516.20
5.4.190.0020.17216.11
5.4.180.0000.20216.11
5.4.170.0000.19816.11
5.4.160.0070.16616.11
5.4.150.0000.18316.24
5.4.140.0070.16814.94
5.4.130.0020.17414.85
5.4.120.0050.18214.93
5.4.110.0030.17614.95
5.4.100.0000.18614.85
5.4.90.0050.17514.87
5.4.80.0050.17314.93
5.4.70.0020.16514.93
5.4.60.0020.19214.91
5.4.50.0020.16614.90
5.4.40.0070.17114.88
5.4.30.0030.17314.95
5.4.20.0030.16114.83
5.4.10.0020.16614.78
5.4.00.0030.18314.61
5.3.290.0050.22113.98
5.3.280.0050.19813.95
5.3.270.0020.21514.08
5.3.260.0000.21514.01
5.3.250.0000.22614.02
5.3.240.0050.21413.97
5.3.230.0020.21614.08
5.3.220.0070.19213.93
5.3.210.0020.22913.95
5.3.200.0020.21313.93
5.3.190.0070.21113.94
5.3.180.0020.19613.96
5.3.170.0030.20513.94
5.3.160.0050.21513.93
5.3.150.0050.20314.06
5.3.140.0020.20713.95
5.3.130.0030.18813.98
5.3.120.0020.19313.92
5.3.110.0050.18613.96
5.3.100.0020.19313.67
5.3.90.0030.18513.67
5.3.80.0020.18613.68
5.3.70.0020.23413.75
5.3.60.0030.21713.74
5.3.50.0020.19613.67
5.3.40.0030.19313.71
5.3.30.0050.18613.69
5.3.20.0000.21713.51
5.3.10.0020.19013.61
5.3.00.0020.21113.50
5.2.170.0030.14711.23
5.2.160.0000.18311.17
5.2.150.0070.16311.14
5.2.140.0030.15711.00
5.2.130.0000.15311.06
5.2.120.0070.20310.96
5.2.110.0000.13711.07
5.2.100.0000.13311.13
5.2.90.0000.22311.11
5.2.80.0030.19711.06
5.2.70.0030.22011.08
5.2.60.0000.13711.08
5.2.50.0000.17311.04
5.2.40.0030.16311.24
5.2.30.0070.15311.11
5.2.20.0000.15311.20
5.2.10.0030.16310.89
5.2.00.0000.15310.70
5.1.60.0000.14710.16
5.1.50.0000.17710.08
5.1.40.0200.16310.06
5.1.30.0030.21010.30
5.1.20.0000.20310.22
5.1.10.0000.26310.08
5.1.00.0000.27010.04
5.0.50.0000.4079.81
5.0.40.0000.3979.81
5.0.30.0000.3739.81
5.0.20.0000.3279.81
5.0.10.0000.3779.81
5.0.00.0030.3779.81
4.4.90.0030.3779.81
4.4.80.0030.3739.81
4.4.70.0000.2979.81
4.4.60.0000.2879.81
4.4.50.0000.3209.81
4.4.40.0000.2779.81
4.4.30.0030.3739.81
4.4.20.0000.3579.81
4.4.10.0070.3539.81
4.4.00.0000.4039.81
4.3.110.0030.3879.81
4.3.100.0000.3839.81
4.3.90.0000.3439.81
4.3.80.0000.3909.81
4.3.70.0000.3739.81
4.3.60.0030.4209.81
4.3.50.0000.3739.81
4.3.40.0000.3639.81
4.3.30.0000.3809.81
4.3.20.0000.3779.81
4.3.10.0000.3039.81
4.3.00.0030.3809.81

preferences:
35.38 ms | 401 KiB | 5 Q