This is a bit of a crazy idea, but would there be a way to bootstrap all the functions that php have without using a helper function to call the functions.
What I mean is actually calling some code or function before and after every basic function call.
Example:
<?php echo 'Hello'; ?>
But these functions would be called before echo and after echo:
<?php function pre_echo() { do_something(); } function post_echo() { do_something_else(); } ?>
‘Bootstrapping’ is not the correct term here – what you want to do is called Aspect-oriented Programming, and yes, it can be done in PHP. However, it seems to require substantial changes to the way you normally use PHP.