3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class MyClass { private function some($b){ //echo $privateVar; return ($b * 3); } public function calc($a){ $privateVar = 100; $c = some($a) * 2; echo $privateVar . "\n"; return $c; } } $test = new MyClass(); $saveValue = $test->calc(10); echo $saveValue;
based on NKGTE
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function some() in /in/UniZa:10 Stack trace: #0 /in/UniZa(17): MyClass->calc(10) #1 {main} thrown in /in/UniZa on line 10
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Fatal error: Call to undefined function some() in /in/UniZa on line 10
Process exited with code 255.