3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test { private $arr; public function add ($param) { $arr[] = 1; } public function getArr() { return $arr; } } $test = new Test(); $test->add(20); var_dump($test->getArr());
based on 6vLXC
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.21.3, 7.1.0 - 7.3.0rc3
Notice: Undefined variable: arr in /in/uNoLL on line 11 NULL
Output for hhvm-3.22.0
Notice: Undefined variable: arr in /in/uNoLL on line -1 NULL