3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = []; print memory_get_usage() . PHP_EOL; $array['key1'] = 'val1'; print memory_get_usage() . PHP_EOL; $array['key2'] = 'val2'; print memory_get_usage() . PHP_EOL; $array['key3'] = 'val3'; print memory_get_usage() . PHP_EOL;
Output for 7.4.0
387568 387976 387976 387976
Output for 7.3.0 - 7.3.12
387488 387896 387896 387896
Output for 7.2.0 - 7.2.25
383664 384072 384072 384072
Output for 7.1.0 - 7.1.33
346992 347400 347400 347400
Output for 7.0.0 - 7.0.33
347048 347400 347400 347400
Output for 5.6.0 - 5.6.40
217680 217952 218088 218224
Output for 5.5.0 - 5.5.38
217680 217936 218072 218208
Output for 5.4.10 - 5.4.45
218200 218456 218592 218728
Output for 5.4.0 - 5.4.9
217672 217928 218064 218200
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/SSZtM 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/SSZtM on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/SSZtM on line 2
Process exited with code 255.

preferences:
203.73 ms | 401 KiB | 322 Q