3v4l.org

run code in 300+ PHP versions simultaneously
<?php class billing{ private $cache=array(); public function resetCache(){ $this->cache=array(); return $this; } } class billing_info extends billing{ public function getPassword() { return $this->cache; } } $o=new billing_info; var_dump($o->resetCache());

preferences:
46.82 ms | 402 KiB | 5 Q