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"; } self::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
347088 1395696 2706416 3754992 5065712 6114288
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/OFnp1 on line 15
Process exited with code 255.
Output for 5.6.0 - 5.6.28
220784 2687584 5154312 7752024 10218752 12816464
Output for 5.5.0 - 5.5.38
220776 2687544 5154272 7621000 10087728 12554456
Output for 5.4.0 - 5.4.45
221288 2557088 5023816 7359560 9826288 12162032
Output for 5.3.11 - 5.3.29
623784 2959072 5818152 8677232 11536312 14395392
Output for 5.3.0 - 5.3.10
623480 2958752 5817832 8676912 11535992 14395072
Output for 5.2.10 - 5.2.17
81776 1873288 3665760
Process exited with code 139.
Output for 5.2.7 - 5.2.9
82504 1875032 3667536
Process exited with code 139.
Output for 5.2.6
82824 1875368 3667872
Process exited with code 139.
Output for 5.2.3 - 5.2.5
82824 1875368 3667856
Process exited with code 139.
Output for 5.2.2
80720 1873208 3665696
Process exited with code 139.
Output for 5.2.1
80720 1872160 3664648
Process exited with code 139.
Output for 5.0.0 - 5.2.0
Fatal error: Call to undefined function memory_get_usage() in /in/OFnp1 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/OFnp1 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/OFnp1 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/OFnp1 on line 12