3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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());
based on 1OiTm
Output for 5.6.0 - 5.6.30, hhvm-3.12.14 - 3.17.3, 7.0.0 - 7.3.0beta1
object(billing_info)#1 (1) { ["cache":"billing":private]=> array(0) { } }