Is it possible to trigger a call to a function as soon as any PHP script’s execution is started ?
e.g.
<?php
Include 'a.php';
Include 'b.php';
?>
So what I want to achieve is as soon as a.php is included a call should be triggered to a function.
There should be something like register_shut_down but this function is executed at script shut down time.
Yes this is possible, using a line in your .htaccess file:
Or inside you php.ini ofcourse, but I’d not recommend it if you host multiple websites on the same server.