3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class a { function b($i = 0) { if ($i > 25000) { die; } if ($i % 5000 == 0) { echo memory_get_usage() . "\n"; } $this->b(++$i); } } $a=new a; $a->b();
Output for 7.1.0
346960 1133424 2182000 3230576 4279152 5327728
Output for 7.0.0 - 7.0.14
346960 1395568 2444144 3492720 4803440 5852016
Output for hhvm-3.12.0
2097152 Assertion failure: /build/hhvm/src/hhvm-HHVM-3.12.0/hphp/runtime/base/runtime-error.cpp:48: void HPHP::raise_error(const string&): assertion `0' failed.
Process exited with code 134.
Output for hhvm-3.10.0
2097152 Fatal error: Stack overflow in /in/vCYnK on line 15
Process exited with code 255.
Output for 5.6.0 - 5.6.28
220776 2687568 5154296 7752008 10218736 12816448
Output for 5.5.0 - 5.5.38
220768 2687552 5154280 7621008 10087736 12554464
Output for 5.4.10 - 5.4.45
221280 2557072 5023800 7359544 9826272 12162016
Output for 5.4.0 - 5.4.9
221280 2557064 5023792 7359536 9826264 12162008
Output for 5.3.11 - 5.3.29
623664 2958984 5818064 8677144 11536224 14395304
Output for 5.3.0 - 5.3.10
623360 2958656 5817736 8676816 11535896 14394976
Output for 5.2.10 - 5.2.17
81656 1873096 3665608
Process exited with code 139.
Output for 5.2.7 - 5.2.9
82456 1874960 3667432
Process exited with code 139.
Output for 5.2.6
82776 1875304 3667808
Process exited with code 139.
Output for 5.2.3 - 5.2.5
82776 1875304 3667792
Process exited with code 139.
Output for 5.2.2
80672 1873200 3665688
Process exited with code 139.
Output for 5.2.1
80672 1872096 3664584
Process exited with code 139.
Output for 5.0.0 - 5.2.0
Fatal error: Call to undefined function memory_get_usage() in /in/vCYnK on line 12
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: memory_get_usage() in /in/vCYnK on line 12
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: memory_get_usage() in /in/vCYnK on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: memory_get_usage() in /in/vCYnK on line 12