3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(); $a[1] = 'toto'; echo memory_get_usage() . '\n'; $a[2] = 'titi'; echo memory_get_usage() . '\n'; $a[1000000] = 'tata'; echo memory_get_usage() . '\n';
Output for 7.0.0 - 7.1.0
347176\n347208\n347208\n
Output for hhvm-3.10.0 - 3.12.0
2097152\n2097152\n2097152\n
Output for 5.6.0 - 5.6.28
217656\n217848\n217984\n
Output for 5.5.0 - 5.5.35
217656\n217832\n217968\n
Output for 5.4.10 - 5.4.45
218176\n218352\n218488\n
Output for 5.4.0 - 5.4.9
217648\n217824\n217960\n
Output for 5.3.11 - 5.3.29
620976\n621176\n621344\n
Output for 5.3.0 - 5.3.10
620672\n620872\n621040\n
Output for 5.2.10 - 5.2.17
78600\n78792\n78952\n
Output for 5.2.7 - 5.2.9
79024\n79344\n79472\n
Output for 5.2.3 - 5.2.6
79344\n79664\n79792\n
Output for 5.2.2
77272\n77528\n77688\n
Output for 5.2.1
77272\n77432\n77592\n
Output for 5.0.0 - 5.2.0
<br /> <b>Fatal error</b>: Call to undefined function memory_get_usage() in <b>/in/qT1ee</b> on line <b>4</b><br />
Process exited with code 255.
Output for 4.4.5 - 4.4.9
<br /> <b>Fatal error</b>: Call to undefined function: memory_get_usage() in <b>/in/qT1ee</b> on line <b>4</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.4.4
<br /> <b>Fatal error</b>: Call to undefined function: memory_get_usage() in <b>/in/qT1ee</b> on line <b>4</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<br /> <b>Fatal error</b>: Call to undefined function: memory_get_usage() in <b>/in/qT1ee</b> on line <b>4</b><br />