How php disables eval () function instances
Php eval () function Operation Array:
<? Php $ data = "array ('key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3 ', 'key4' => 'value4 ') "; $ arr = eval (" return $ data; "); var_dump ($ arr); // array?>
Running result:
Array (4) {["key1"] => string (6) "value1" ["key2"] => string (6) "value2" ["key3"] => string (6) "value3" ["key4"] => string (6) "value4 "}
On the Internet, it is often said that disable_functions is used to disable eval!
In fact, eval () cannot be disabled by disable_functions in php. ini:
Because eval () is a language construct and not a function
Eval is zend, so it is not a PHP_FUNCTION;
So how does php disable eval?
If you want to disable eval, you can use php extension Suhosin:
After suhosinis installed, load suhosin.soin php.ini, and add suhosin.exe cutor. disable_eval = on.
Thank you for reading this article. I hope it will help you. Thank you for your support for this site!