3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('memory_limit', '64M'); define('N', 100); register_shutdown_function(function() { global $max; ini_set('memory_limit', '256M'); $y = []; for ($i = 0; $i < N; $i++) { var_dump($i); $y[] = str_repeat('asdf', $max); } var_dump('end'); }); $x = array_fill(0, N, ''); $max = 0; $i = 0; while (true) { $x[$i] .= 'asdf'; if (++$i >= N) { $i = 0; $max++; } }
Output for git.master, rfc.property-hooks
Fatal error: Out of memory (allocated 35651584 bytes) (tried to allocate 229376 bytes) in /in/Ug1pq on line 29 int(0) int(1) int(2) int(3) int(4) int(5) int(6) int(7) int(8) Fatal error: Out of memory (allocated 35651584 bytes) (tried to allocate 229376 bytes) in /in/Ug1pq on line 16 mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory
Process exited with code 255.
Output for git.master_jit
Fatal error: Out of memory (allocated 18874368 bytes) (tried to allocate 131072 bytes) in /in/Ug1pq on line 29 int(0) int(1) int(2) int(3) int(4) int(5) int(6) int(7) int(8) int(9) int(10) int(11) int(12) int(13) int(14) Fatal error: Out of memory (allocated 18874368 bytes) (tried to allocate 131072 bytes) in /in/Ug1pq on line 16 mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory 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:
46.44 ms | 401 KiB | 8 Q