3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$var = 'A'; //$var = ''; //$var = null; $var = 0; $f1 = function($var) { if (! isset($var) || $var) { //echo "set default"; //"not empty or not defiend or a null value"; } else { //echo "not default"; //"empty"; } } $f2 = function($var) { if (! isset($var) || ! empty($var)) { //echo "set default"; } else { //echo "not default"; } } $s = microtime(1); for ($i = 0; $i < 100; $i++) { $f1($var); } echo microtime(1) - $s;

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)
5.5.30.4230.04319.37
5.5.20.4200.03719.42
5.5.10.4100.03719.31
5.5.00.4000.04719.40
5.4.190.3930.03718.98
5.4.180.4270.04018.98
5.4.170.3630.03719.04
5.4.160.3470.03719.00
5.4.150.3700.04019.03
5.4.140.3630.04016.41
5.4.130.3670.03716.48
5.4.120.4400.04016.39
5.4.110.4300.03716.35
5.4.100.4170.03316.38
5.4.90.4270.03016.55
5.4.80.4370.03716.54
5.4.70.3800.02716.54
5.4.60.3330.03316.36
5.4.50.3570.04016.36
5.4.40.3700.03316.38
5.4.30.3600.03016.30
5.4.20.3570.03716.41
5.4.10.4130.03716.43
5.4.00.4270.03315.98
5.3.270.4230.03714.66
5.3.260.4270.03314.65
5.3.250.3570.03014.71
5.3.240.3770.04014.65
5.3.230.3400.03714.57
5.3.220.4070.04314.63
5.3.210.4200.03014.64
5.3.200.4270.03714.66
5.3.190.4300.03314.52
5.3.180.4370.03314.66
5.3.170.3930.03714.66
5.3.160.3630.03314.77
5.3.150.3270.03714.77
5.3.140.3570.03714.60
5.3.130.3100.03714.57
5.3.120.3570.04014.58
5.3.110.3670.03014.58
5.3.100.4100.04014.08
5.3.90.3300.03014.04
5.3.80.3030.04314.05
5.3.70.3300.03313.90
5.3.60.1930.03713.88
5.3.50.3000.03713.80
5.3.40.3030.03714.00
5.3.30.3130.02713.98
5.3.20.3400.03313.71
5.3.10.3030.03313.70
5.3.00.3330.02713.63

preferences:
136.65 ms | 1394 KiB | 7 Q