3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php ini_set('memory_limit', -1); $a = range(0, 20000000); $b = array_map(function($z){ return $z*2; }, $a);
Output for 7.0.20 - 7.2.0
Fatal error: Out of memory (allocated 2097152) (tried to allocate 1073741832 bytes) in /in/gRUHC on line 3 mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory
Process exited with code 255.
Output for 5.4.15 - 5.4.23
Fatal error: Out of memory (allocated 260308992) (tried to allocate 32 bytes) in /in/gRUHC on line 3
Process exited with code 255.
Output for 5.4.0 - 5.4.14
Fatal error: Out of memory (allocated 260571136) (tried to allocate 32 bytes) in /in/gRUHC on line 3
Process exited with code 255.
Output for 5.3.6 - 5.3.28
Fatal error: Out of memory (allocated 265551872) (tried to allocate 32 bytes) in /in/gRUHC on line 3
Process exited with code 255.
Output for 5.3.5
Fatal error: Out of memory (allocated 203423744) (tried to allocate 32 bytes) in /in/gRUHC on line 3
Process exited with code 255.
Output for 5.2.17
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /in/gRUHC on line 4
Process exited with code 255.