3v4l.org

run code in 300+ PHP versions simultaneously
<?php class one{ public function index($called_from = null){ if ( $called_from != 'myfunc') { return $this->myfunc(__FUNCTION__); } else { echo 'parent'; } } public function myfunc($called_from){ return $this->$called_from(__FUNCTION__); } } class two extends one{ function index($called_from = null){ if ( $called_from != 'myfunc') { return $this->myfunc(__FUNCTION__); } else { echo 'child'; } } } $obj = new two; $obj->index();

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
197.51 ms | 2065 KiB | 10 Q