3v4l.org

run code in 500+ PHP versions simultaneously
<?php error_reporting(0); ini_set('display_errors', '0'); register_shutdown_function(function (): void { // error handler consumes non-fatal errors $error = error_get_last(); if($error){ echo "System died.\n"; var_dump($error); } }); set_error_handler(function(...$error){ echo "Error handler.\n"; var_dump($error); }); $f .= ''; // test out of memory $d = str_repeat('f', 100000); foreach (range(1, 100) as $x) { $d = $d . $d; }
Output for master
Error handler. array(4) { [0]=> int(2) [1]=> string(21) "Undefined variable $f" [2]=> string(9) "/in/cE3Xn" [3]=> int(20) } mmap() failed: [12] Cannot allocate memory Out of memory
Process exited with code 134.

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:
14.21 ms | 1214 KiB | 7 Q