3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = []; for ($i=0; $i<100000; $i++) { $arr[] = ['code' => 123 . $i, 'ipn' => 'ipn-12345']; } $result = []; foreach ($arr as $entry) { $result[$entry['code']] = $entry; } unset($entry); echo count($arr); echo '-' . count($result); //print_r($arr);
based on UqJGd
Output for 7.0.0 - 7.2.0
100000-100000
Output for 5.4.0 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /in/m6WCm on line 11
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/m6WCm on line 3
Process exited with code 255.