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__'));
Output for git.master, git.master_jit, rfc.property-hooks
#+++++++++++++++++++++++++++++++++++# # Checking if a constant is defined # # always retuns (bool)false in PHP. # # Even if it has been defined! # #+++++++++++++++++++++++++++++++++++# Testing on PHP version 8.3.0-dev Result of `echo __FILE__`: /in/S6ZY6 Okay, looks like __FILE__ is defined. Now let's see what `if ( defined('__FILE__') )` returns: bool(false)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
38.05 ms | 401 KiB | 8 Q