3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = array_fill_keys(range(100000, 200000), array_fill_keys(range('a', 'z'), 'plid')); $headerKey = 'y'; $plids = array(); foreach ($data as $key => &$row) { if (isset($row[$headerKey])) { $plids[] = $row[$headerKey]; } }
based on XrPWJ
Output for 7.0.0 - 7.2.0
Output for 5.5.24 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 74 bytes) in /in/vWRGp on line 6
Process exited with code 255.
Output for 5.4.11 - 5.4.45
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 256 bytes) in /in/vWRGp on line 6
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 73 bytes) in /in/vWRGp on line 6
Process exited with code 255.