- var_dump: documentation ( source)
<?php
class BaseController {
public static $var_test = '#';
public function __construct() {
self::$var_test = "100";
}
}
class AdminController extends BaseController {
public function render() {
echo parent::$var_test; // Prints 100 here (www.3v4l.org/mkoLL) which is correct
// Prints # in CI 4 AdminController extended from BaseController which is wrong
}
}
$adm = new AdminController;
var_dump($adm->render());
?>