3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class bad { private $_private = array(); public function __construct() { $this->_private[] = 'oh noes'; } public function __destruct() { //echo "bad::destructor\n"; global $bar; $bar = $this->_private; } } $foo = new stdclass; $foo->foo = $foo; $foo->bad = new bad; print_r($foo); gc_disable(); for ($i=0; true; $i++) { $deep_clone = clone $foo; gc_collect_cycles(); var_dump($i); }

Abusive script

This script was stopped while abusing our resources