3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('display_errors', 1); error_reporting(E_ALL); echo '#+++++++++++++++++++++++++++++++++++#' . PHP_EOL; echo '# Checking if a constant is defined #' . PHP_EOL; echo '# always retuns (bool)false in PHP. #' . PHP_EOL; echo '# Even if it has been defined! #' . PHP_EOL; echo '#+++++++++++++++++++++++++++++++++++#' . PHP_EOL; echo 'Testing on PHP version ' . PHP_VERSION . PHP_EOL . PHP_EOL; echo 'Result of `echo __FILE__`: ' . PHP_EOL; echo __FILE__; echo PHP_EOL . PHP_EOL; echo 'Okay, looks like __FILE__ is defined.' . PHP_EOL; echo 'Now let\'s see what `if ( defined('__FILE__') )` returns:' . PHP_EOL; var_dump(defined('__FILE__'));

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.0070.07317.32
5.5.20.0100.07317.19
5.5.10.0070.07317.22
5.5.00.0100.06017.27
5.4.190.0070.08019.05
5.4.180.0000.07719.00
5.4.170.0000.06019.11
5.4.160.0070.07319.04
5.4.150.0030.07019.05
5.4.140.0100.05716.43
5.4.130.0030.03716.54
5.4.120.0070.07716.30
5.4.110.0070.05016.40
5.4.100.0070.03316.38
5.4.90.0070.04016.49
5.4.80.0000.03716.45
5.4.70.0070.03016.54
5.4.60.0030.03316.40
5.4.50.0030.03716.45
5.4.40.0000.04316.61
5.4.30.0070.03316.35
5.4.20.0030.03316.51
5.4.10.0070.04016.32
5.4.00.0070.04015.83
5.3.270.0070.08014.47
5.3.260.0070.08014.43
5.3.250.0070.07714.55
5.3.240.0030.04714.55
5.3.230.0000.04014.53
5.3.220.0000.05714.54
5.3.210.0000.04014.41
5.3.200.0070.03314.54
5.3.190.0000.05314.64
5.3.180.0070.04014.54
5.3.170.0030.04014.48
5.3.160.0070.03714.50
5.3.150.0000.04014.39
5.3.140.0000.04014.51
5.3.130.0070.03314.33
5.3.120.0000.04014.63
5.3.110.0030.04014.35
5.3.100.0000.04013.87
5.3.90.0030.03313.85
5.3.80.0000.03713.96
5.3.70.0070.03313.78
5.3.60.0030.03313.93
5.3.50.0030.03713.92
5.3.40.0000.03713.71
5.3.30.0030.03313.85
5.3.20.0000.03713.46
5.3.10.0070.03013.61
5.3.00.0030.03713.60

preferences:
138.41 ms | 1394 KiB | 7 Q