3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $startMemory = memory_get_usage(); $array = range(1, 100000); echo memory_get_usage() - $startMemory, ' bytes'; echo memory_get_peak_usage() . "\n"; $var['test'] = 'hallo2'; var_dump($var); echo memory_get_peak_usage() . "\n";
based on 74gt7
Output for 7.2.0 - 7.2.6
4198480 bytes4582336 array(1) { ["test"]=> string(6) "hallo2" } 4582720
Output for 7.0.0 - 7.1.1, 7.1.7 - 7.1.10
4198480 bytes4545696 array(1) { ["test"]=> string(6) "hallo2" } 4546080
Output for 7.1.2 - 7.1.6
4198480 bytes4545992 array(1) { ["test"]=> string(6) "hallo2" } 4546376
Output for hhvm-3.15.4
4194304 bytes4194304 array(1) { ["test"]=> string(6) "hallo2" } 4194304
Output for 5.6.0 - 5.6.30
14649040 bytes14868264 array(1) { ["test"]=> string(6) "hallo2" } 14868624