3v4l.org

run code in 300+ PHP versions simultaneously
<?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, ',', '.');
Output for 7.4.0
5.690.512 6.295.552 389.216 4.194.304
Output for 7.3.0 - 7.3.12
5.690.440 6.295.552 389.144 4.194.304
Output for 7.2.17 - 7.2.25
5.686.360 6.295.552 385.064 4.194.304
Output for 7.2.0
5.686.400 6.295.552 385.104 4.194.304
Output for 7.1.26 - 7.1.33
5.649.784 6.295.552 348.488 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.1.6, 5.2.0 - 5.2.17, 5.3.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.3.11, 4.4.0 - 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.

preferences:
150.57 ms | 401 KiB | 205 Q