3v4l.org

run code in 300+ PHP versions simultaneously
<?php $badScript = '<?php /* Broken comment '; $filename = tempnam(sys_get_temp_dir(), 'badScript'); file_put_contents($filename, $badScript); function examine($text, $filename, $errorReporting, $displayErrors) { error_reporting($errorReporting); ini_set('display_errors', $displayErrors); ini_set('log_errors', $displayErrors); echo 'error_reporting = ', $errorReporting, PHP_EOL, 'display_errors = ', $displayErrors, PHP_EOL, 'log_errors = ', $displayErrors, PHP_EOL; error_clear_last(); highlight_string($text, true); echo 'highlight_string(): ', (error_get_last() ? 'error' : 'no error'), PHP_EOL; error_clear_last(); highlight_file($filename, true); echo 'highlight_file(): ', (error_get_last() ? 'error' : 'no error'), PHP_EOL; } examine($badScript, $filename, -1, 1); examine($badScript, $filename, -1, 0); examine($badScript, $filename, 0, 1); examine($badScript, $filename, 0, 0); unlink($filename);
Output for git.master, git.master_jit, rfc.property-hooks
error_reporting = -1 display_errors = 1 log_errors = 1 highlight_string(): no error highlight_file(): no error error_reporting = -1 display_errors = 0 log_errors = 0 highlight_string(): no error highlight_file(): no error error_reporting = 0 display_errors = 1 log_errors = 1 highlight_string(): no error highlight_file(): no error error_reporting = 0 display_errors = 0 log_errors = 0 highlight_string(): no error highlight_file(): no error

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:
98.93 ms | 402 KiB | 8 Q