3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { private $a; public function __construct() { $this->a = function () { return true; }; } public function doAction() { $result = array(); for ($i = 0; $i < 100; ++$i) { $result[] = mt_rand(); } call_user_func($this->a); } } for ($i = 0; $i < 10000; ++$i) { var_dump(memory_get_usage(true)); $a = new A(); $a->doAction(); //gc_collect_cycles(); //this fixes 5.5 }

Abusive script

This script was stopped while abusing our resources