I need to change my defined constant but ,I couldn't find where i've defined it i.e.
<?php
define("var_name","somevalue");
?>
Is it possible in php to get where this constant is defined ??
答案 0 :(得分:0)
Using runkit_constant_redefine
you can re define your defined constant.
runkit_constant_redefine("var_name_new", "somevalue_new");
more about function.runkit-constant-redefine.php
Note: If you have the
runkit extension
installed, you can userunkit_constant_redefine()