3v4l.org

run code in 300+ PHP versions simultaneously
<?php function log_error( $type, $message, $file, $line ) { $error_reporting = error_reporting(); echo $error_reporting . ' - ' . ( $error_reporting & $type ) . PHP_EOL; } set_error_handler( 'log_error' ); trigger_error( 'A', E_USER_NOTICE ); @trigger_error( 'A', E_USER_NOTICE ); $constants = ['E_ERROR', 'E_USER_ERROR', 'E_USER_WARNING', 'E_USER_NOTICE', 'E_DEPRECATED', 'E_USER_DEPRECATED', 'E_RECOVERABLE_ERROR', 'E_ALL']; foreach ( $constants as $constant ) { echo $constant . ': ' . constant( $constant ) . PHP_EOL; error_reporting( constant( $constant ) ); trigger_error( 'A', E_USER_NOTICE ); @trigger_error( 'A', E_USER_NOTICE ); }
Output for git.master, git.master_jit
-1 - 1024 4437 - 0 E_ERROR: 1 1 - 0 1 - 0 E_USER_ERROR: 256 256 - 0 256 - 0 E_USER_WARNING: 512 512 - 0 0 - 0 E_USER_NOTICE: 1024 1024 - 1024 0 - 0 E_DEPRECATED: 8192 8192 - 0 0 - 0 E_USER_DEPRECATED: 16384 16384 - 0 0 - 0 E_RECOVERABLE_ERROR: 4096 4096 - 0 4096 - 0 E_ALL: 30719 30719 - 1024 4437 - 0

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.09 ms | 406 KiB | 5 Q