有没有办法听一个被覆盖的变量......
一个虚构的例子:
<?php
$user = new user_class();
function callback_foo(){
die('Do not override this variable you are not permited...');
}
listen_var_change('user','callback_foo');
?>
我应该希望上面的代码能解释我想要做什么,我只是想确保 var 是恒定的。我不能使用define()
它是否不允许对象|数组
干杯。