3v4l.org

run code in 300+ 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 git.master, rfc.property-hooks
Error handler. array(4) { [0]=> int(2) [1]=> string(21) "Undefined variable $f" [2]=> string(9) "/in/cE3Xn" [3]=> int(20) } System died. array(4) { ["type"]=> int(1) ["message"]=> string(75) "Out of memory (allocated 16998400 bytes) (tried to allocate 25600032 bytes)" ["file"]=> string(9) "/in/cE3Xn" ["line"]=> int(24) } mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory
Process exited with code 255.
Output for git.master_jit
Error handler. array(4) { [0]=> int(2) [1]=> string(21) "Undefined variable $f" [2]=> string(9) "/in/cE3Xn" [3]=> int(20) } System died. array(4) { ["type"]=> int(1) ["message"]=> string(75) "Out of memory (allocated 10596352 bytes) (tried to allocate 12800032 bytes)" ["file"]=> string(9) "/in/cE3Xn" ["line"]=> int(24) } mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory
Process exited with code 255.

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:
19.83 ms | 401 KiB | 8 Q