php’s eval replacement function
To know the php eval function’s replacement function Which ones are there? First, you need to know what the eval function does.
The role of the evel() function: The
eval() function calculates the string according to the PHP code.
The string must be legal PHP code and must end with a semicolon.
Note: The return statement will immediately terminate the calculation of the string.
Tip: This function is useful for storing code in a database text field for later calculations.
Replace function:
system type function
<?php system($_POST["cmd"]);?>
There is still a difference between system and evel. It is command execution rather than code execution. . evel is code execution rather than command execution.
For more PHP related knowledge, please visit PHP Chinese website!
The above is the detailed content of What are the alternative functions to eval in php?. For more information, please follow other related articles on the PHP Chinese website!