3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nonfatal = array( E_USER_WARNING => true, E_WARNING => true, E_USER_NOTICE => true, E_NOTICE => true, E_STRICT => true, ); if ( version_compare( PHP_VERSION, '5.3.0' ) >= 0 ) { // wrapper `constant( 'XXX' )` is used to avoid compile notices // on earlier PHP versions. $nonfatal[constant( 'E_DEPRECATED' )] = true; $nonfatal[constant( 'E_USER_DEPRECATED') ] = true; }

preferences:
36.97 ms | 402 KiB | 5 Q