What is the correct syntax for using eval in PHP?

Using eval in PHP can be risky as it allows for the execution of arbitrary code, which can potentially lead to security vulnerabilities. However, if you need to use eval, make sure to properly sanitize and validate the input to prevent any malicious code injection. Always use eval with caution and avoid using it if possible.

$code = "echo 'Hello, World!';";
eval($code);