3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = str_repeat('/' . str_repeat('текст', 1000), 1000); for ($i = 0; $i < 10000; $i++) { list($a, $b) = preg_split('/(?=\/[^\/]+$)/', $str . $i); }
Output for 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Fatal error: Out of memory (allocated 22102016 bytes) (tried to allocate 9991024 bytes) in /in/dkrBG on line 5 mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory
Process exited with code 255.
Output for 8.1.2 - 8.1.27
Fatal error: Out of memory (allocated 22102016) (tried to allocate 9991024 bytes) in /in/dkrBG on line 5 mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory
Process exited with code 255.
Output for 5.6.0 - 5.6.23, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.1

Process exited with code 137.

preferences:
153.33 ms | 403 KiB | 177 Q