3v4l.org

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

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.0070.06514.68
7.3.120.0060.06814.62
7.3.110.0070.10714.86
7.3.100.0130.10014.81
7.3.90.0070.05714.60
7.3.80.0030.06515.03
7.3.70.0000.07714.89
7.3.60.0100.06714.86
7.3.50.0030.06414.54
7.3.40.0100.05914.91
7.3.30.0060.06814.70
7.3.20.0030.06316.93
7.3.10.0030.06716.66
7.3.00.0070.08116.66
7.2.250.0070.07815.26
7.2.240.0070.10215.04
7.2.230.0070.05715.30
7.2.220.0000.06614.99
7.2.210.0030.09115.14
7.2.200.0030.10215.11
7.2.190.0070.06315.04
7.2.180.0100.06215.03
7.2.170.0030.07815.16
7.2.160.0130.05515.14
7.2.150.0000.06517.04
7.2.140.0030.06316.59
7.2.130.0100.07517.05
7.2.120.0030.06316.95
7.2.110.0070.06016.81
7.2.100.0000.06416.82
7.2.90.0030.06916.96
7.2.80.0000.06816.85
7.2.70.0070.06016.66
7.2.60.0030.10716.95
7.2.50.0000.07017.13
7.2.40.0000.06516.80
7.2.30.0100.07016.89
7.2.20.0070.06717.00
7.2.10.0000.06216.67
7.2.00.0050.05918.22
7.1.330.0130.15315.76
7.1.320.0070.13915.75
7.1.310.0000.15615.68
7.1.300.0030.11915.91
7.1.290.0030.14515.80
7.1.280.0030.13315.96
7.1.270.0100.11415.83
7.1.260.0070.11615.92
7.1.250.0100.14715.90
7.1.240.0070.12615.68
7.1.230.0000.13315.86
7.1.220.0100.12715.89
7.1.210.0070.11315.89
7.1.200.0000.14715.85
7.1.190.0100.12815.93
7.1.180.0030.14715.94
7.1.170.0030.11715.86
7.1.160.0100.11115.94
7.1.150.0070.11315.81
7.1.140.0030.12115.70
7.1.130.0000.12315.71
7.1.120.0070.14915.89
7.1.110.0030.12515.86
7.1.100.0030.11515.96
7.1.90.0070.12715.80
7.1.80.0030.11815.96
7.1.70.0050.10816.47
7.1.60.0130.10517.82
7.1.50.0030.10016.24
7.1.40.0070.13715.62
7.1.30.0030.12915.75
7.1.20.0030.11715.92
7.1.10.0000.12215.83
7.1.00.0020.14319.04
7.0.330.0000.15015.57
7.0.320.0100.12815.19
7.0.310.0030.12815.44
7.0.300.0030.11515.61
7.0.290.0070.11115.45
7.0.280.0030.12515.20
7.0.270.0000.15215.39
7.0.260.0000.11915.41
7.0.250.0130.12615.58
7.0.240.0030.11515.52
7.0.230.0100.10415.56
7.0.220.0070.11615.34
7.0.210.0070.12315.32
7.0.200.0080.12015.89
7.0.190.0070.11315.30
7.0.180.0030.14815.60
7.0.170.0070.10915.30
7.0.160.0030.11815.57
7.0.150.0100.12715.43
7.0.140.0050.14018.75
7.0.130.0100.11715.39
7.0.120.0070.10415.37
7.0.110.0070.11514.89
7.0.100.0030.11315.43
7.0.90.0000.12015.53
7.0.80.0000.11915.22
7.0.70.0030.12515.55
7.0.60.0030.09918.71
7.0.50.0030.12616.55
7.0.40.0070.12616.74
7.0.30.0130.12416.84
7.0.20.0250.11916.80
7.0.10.0070.12916.82
7.0.00.0070.12416.89
5.6.400.0030.25614.10
5.6.390.0030.25914.49
5.6.380.0030.25514.32
5.6.370.0030.26814.38
5.6.360.0030.27714.63
5.6.350.0070.25914.32
5.6.340.0030.26114.37
5.6.330.0030.27014.11
5.6.320.0070.30514.01
5.6.310.0000.31213.93
5.6.300.0030.28514.50
5.6.290.0070.26614.40
5.6.280.0050.22317.65
5.6.270.0000.28814.34
5.6.260.0030.28414.64
5.6.250.0000.26314.19
5.6.240.0070.28114.39
5.6.230.0000.28814.35
5.6.220.0030.24914.03
5.6.210.0120.21117.45
5.6.200.0000.19316.15
5.6.190.0120.22417.43
5.6.180.0220.21217.44
5.6.170.0130.23617.38
5.6.160.0020.20517.46
5.6.150.0050.23916.24
5.6.140.0050.19916.25
5.6.130.0070.24316.31
5.6.120.0080.23617.55
5.6.110.0070.21017.76
5.6.100.0080.22817.59
5.6.90.0080.21617.59
5.6.80.0050.20917.35
5.6.70.0000.26814.37
5.6.60.0030.26014.37
5.6.50.0030.27314.41
5.6.40.0000.33014.35
5.6.30.0030.26914.11
5.6.20.0030.26514.13
5.6.10.0000.25414.38
5.6.00.0030.26114.43
5.5.380.0000.30614.25
5.5.370.0130.27714.28
5.5.360.0030.28914.38
5.5.350.1900.19317.39
5.5.340.0000.22616.11
5.5.330.0030.19617.40
5.5.320.0050.20017.27
5.5.310.0130.20517.40
5.5.300.0080.19816.22
5.5.290.0030.25216.13
5.5.280.0120.21617.62
5.5.270.0080.21317.58
5.5.260.0070.22417.46
5.5.250.0070.19417.32
5.5.240.0170.23217.07
5.5.230.0100.24714.01
5.5.220.0000.25414.28
5.5.210.0030.26814.02
5.5.200.0030.26314.04
5.5.190.0030.29514.23
5.5.180.0000.26714.33
5.5.170.0030.27913.85
5.5.160.0070.25614.29
5.5.150.0070.26314.27
5.5.140.0030.28414.07
5.5.130.0070.31414.33
5.5.120.0070.30814.36
5.5.110.0070.27214.21
5.5.100.0030.27313.82
5.5.90.0070.29213.88
5.5.80.0100.25613.90
5.5.70.0030.26114.38
5.5.60.0030.27814.38
5.5.50.0000.30714.33
5.5.40.0030.28214.11
5.5.30.0030.30314.04
5.5.20.0030.27214.09
5.5.10.0030.27214.42
5.5.00.0030.25514.15
5.4.450.0120.20915.50
5.4.440.0170.22515.64
5.4.430.0130.23415.50
5.4.420.0120.22115.57
5.4.410.0100.22215.62
5.4.400.0130.19915.37
5.4.390.0230.20615.54
5.4.380.0170.22015.57
5.4.370.0200.20815.51
5.4.360.0180.23415.51
5.4.350.0170.20215.34
5.4.340.0150.22315.49
5.4.330.0000.26411.90
5.4.320.0150.19915.52
5.4.310.0130.19715.49
5.4.300.0130.19815.55
5.4.290.0150.22915.57
5.4.280.0170.25815.41
5.4.270.0130.19315.55
5.4.260.0180.21215.40
5.4.250.0100.19715.55
5.4.240.0280.22915.35
5.4.230.0130.22315.48
5.4.220.0130.20615.35
5.4.210.0130.20415.48
5.4.200.0170.21915.57
5.4.190.0170.20515.40
5.4.180.0120.20815.38
5.4.170.0120.20415.38
5.4.160.0120.20515.40
5.4.150.0120.22015.48
5.4.140.0120.23014.11
5.4.130.0170.22314.11
5.4.120.0130.22814.11
5.4.110.0080.22314.14
5.4.100.0170.22314.18
5.4.90.0120.19714.15
5.4.80.0100.22414.16
5.4.70.0170.20314.18
5.4.60.0170.19314.12
5.4.50.0180.19314.17
5.4.40.0150.22014.11
5.4.30.0100.20113.96
5.4.20.0170.21114.15
5.4.10.0120.19514.16
5.4.00.0130.20813.89
5.3.290.0120.21713.21
5.3.280.0150.23413.21
5.3.270.0170.24813.18
5.3.260.0150.25313.18
5.3.250.0150.23713.22
5.3.240.0180.23913.19
5.3.230.0130.25713.16
5.3.220.0130.22713.22
5.3.210.0150.24713.14
5.3.200.0130.20813.15
5.3.190.0130.24613.25
5.3.180.0130.22513.24
5.3.170.0120.23513.16
5.3.160.0150.22613.22
5.3.150.0150.25413.17
5.3.140.0150.23113.20
5.3.130.0250.21513.24
5.3.120.0150.24013.14
5.3.110.0130.22313.14
5.3.100.0100.26512.94
5.3.90.0200.26612.92
5.3.80.0120.23912.87
5.3.70.0120.25912.93
5.3.60.0200.27312.87
5.3.50.0080.21812.89
5.3.40.0100.21812.84
5.3.30.0180.23512.82
5.3.20.0130.20112.71
5.3.10.0150.24212.75
5.3.00.0150.23812.66
5.2.170.0200.19311.75
5.2.160.0300.20711.75
5.2.150.0170.17011.75
5.2.140.0200.17011.75
5.2.130.0170.21711.75
5.2.120.0230.20311.75
5.2.110.0270.22011.75
5.2.100.0230.18711.75
5.2.90.0300.20311.75
5.2.80.0270.22011.75
5.2.70.0270.21711.75
5.2.60.0300.19311.75
5.2.50.0300.16011.75
5.2.40.0170.17311.75
5.2.30.0200.16011.75
5.2.20.0130.16711.75
5.2.10.0200.19711.75
5.2.00.0230.20711.75
5.1.60.0200.17011.75
5.1.50.0300.20311.75
5.1.40.0200.16011.75
5.1.30.0170.17311.75
5.1.20.0270.16011.75
5.1.10.0130.15311.75
5.1.00.0100.16011.75
5.0.50.0100.36011.75
5.0.40.0070.39311.75
5.0.30.0070.38011.75
5.0.20.0100.53011.75
5.0.10.0070.34011.75
5.0.00.0030.36711.75
4.4.90.0100.40311.75
4.4.80.0100.40311.75
4.4.70.0070.40311.75
4.4.60.0070.35711.75
4.4.50.0100.35711.75
4.4.40.0700.40011.75
4.4.30.0130.38311.75
4.4.20.0100.35311.75
4.4.10.0070.35011.75
4.4.00.0100.54311.75
4.3.110.0030.33711.75
4.3.100.0000.33311.75
4.3.90.0030.33311.75
4.3.80.0030.36711.75
4.3.70.0100.35711.75
4.3.60.0170.38711.75
4.3.50.0070.50311.75
4.3.40.0800.33711.75
4.3.30.0030.34311.75
4.3.20.0070.43311.75
4.3.10.0030.38011.75
4.3.00.0000.34711.75

preferences:
37.04 ms | 401 KiB | 5 Q