This function validates your code and automatically whitelists it according to your specified configuration, then executes it.
public execute ( callable | string $callable = null, boolean $skip_validation = false ) : mixed | ||
$callable | callable | string | Callable or string of PHP code to prepare and execute within the sandbox |
$skip_validation | boolean | Boolean flag to indicate whether the sandbox should skip validation of the pass callable. Default is false. |
Résultat | mixed | The output from the executed sandboxed code |