3v4l.org

run code in 300+ PHP versions simultaneously
<?php $params = array('key' => str_repeat('value', 1e6)); echo memory_get_peak_usage(), "\n"; extract($params); echo memory_get_peak_usage(), "\n";
Output for 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
5388072 5388176
Output for 8.1.0 - 8.1.27
5388384 5388488
Output for 8.0.0 - 8.0.30
5387920 5388024
Output for 7.4.0 - 7.4.33
5388224 5388328
Output for 7.3.0 - 7.3.33
5388144 5388248
Output for 7.2.0 - 7.2.33
5384296 5384400
Output for 7.1.0 - 7.1.33
5347592 5347696
Output for 7.0.0 - 7.0.33
5347624 5347728
Output for 5.6.0 - 5.6.40
5217960 10218480
Output for 5.5.0 - 5.5.38
5217960 10218432
Output for 5.4.10 - 5.4.45
5218424 10218896
Output for 5.4.0 - 5.4.9
5217896 10218368
Output for 5.3.11 - 5.3.29
5620848 10621368
Output for 5.3.0 - 5.3.10
5620544 10621064
Output for 5.2.10 - 5.2.17
5077920 10078480
Output for 5.2.9
5077952 10078512
Output for 5.2.7 - 5.2.8
5077952 10078248
Output for 5.2.3 - 5.2.6
5078272 10078568
Output for 5.2.1 - 5.2.2
5076296 10076552
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0
Fatal error: Call to undefined function memory_get_peak_usage() in /in/NCPQS on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: memory_get_peak_usage() in /in/NCPQS on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: memory_get_peak_usage() in /in/NCPQS on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: memory_get_peak_usage() in /in/NCPQS on line 3

preferences:
271.85 ms | 401 KiB | 455 Q