3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = []; for( $i =0 ; $i < 50000 ; $i++) { $data[] = md5('test'); } echo number_format(memory_get_usage(), 0, ',', '.')."\n"; echo number_format(memory_get_usage(true), 0, ',', '.')."\n"; unset($data); echo number_format(memory_get_usage(), 0, ',', '.')."\n"; echo number_format(memory_get_usage(true), 0, ',', '.');
based on gRL9G
Output for 7.2.0
5.686.400 6.295.552 385.104 4.194.304
Output for 7.1.0, 7.1.7
5.649.856 6.295.552 348.560 4.194.304
Output for 7.1.5 - 7.1.6
5.650.496 6.295.552 349.200 4.194.304
Output for 7.0.0 - 7.0.20
5.649.872 6.295.552 348.576 4.194.304
Output for 5.6.7 - 5.6.21
10.344.176 10.747.904 219.624 786.432
Output for 5.5.24 - 5.5.35
10.344.176 10.747.904 219.608 786.432
Output for 5.4.10 - 5.4.45
10.344.704 10.747.904 220.128 786.432
Output for 5.4.0 - 5.4.9
10.344.168 10.747.904 219.600 786.432
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/IuNSq on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/IuNSq on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/IuNSq on line 2
Process exited with code 255.