Call to undefined function exit()¶
Description¶
exit and die used to be language constructures, until PHP 8.4. Then, they could not be used in a dynamic function call, such as shown here. Indeed, language constructs are not accessible with that syntax.
Since PHP 8.4, die
and exit
are defined as functions, and shall be used with the dynamic call feature.
Example¶
<?php
$function = 'exit';
$function();
?>
Solutions¶
Upgrade to PHP 8.4.