3v4l.org

run code in 500+ PHP versions simultaneously
<?php register_shutdown_function(static function () { global $php_errormsg; while(ob_get_level())ob_end_clean(); ob_implicit_flush(true); echo "<!--\n"; echo "\n\tHeaders Sent:"; $file = $line = null; headers_sent($file, $line); $file = empty($file) ? 'unknown' : $file; echo "\n\t\t$file: $line"; echo "\n\tLast Error:"; /*if (!empty($lastError = error_get_last())) { foreach ($lastError as $k => $v) { echo htmlspecialchars("\n\t\t$k: $v"); } } else*/ if (!empty($GLOBALS['php_errormsg'])) { echo "\n\t\tError: {$GLOBALS['php_errormsg']}"; } else { echo "\n\t\tnone"; } echo "\n\tIncluded Files:"; echo "\n\t\t" . implode("\n\t\t", get_included_files()); echo "\n-->"; }); trigger_error('fdgsdf', E_USER_WARNING);
Output for 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
Warning: fdgsdf in /in/gtU3V on line 34 <!-- Headers Sent: /in/gtU3V: 34 Last Error: none Included Files: /in/gtU3V -->

preferences:
40.41 ms | 709 KiB | 4 Q