Reputation: 382756
PHP allows you to replace or even re-name PHP's built-in functions using functions such as
override_function
and rename_function
.
Can we override the PHP's language constructs like echo
and eval
?
Upvotes: 4
Views: 917
Reputation: 3906
No, this isn't possible within PHP.
The only way I can think of would be to create a custom handler for PHP files (in apache or whichever web server you're using).
The custom handler could then search and replace core language constructs with functions of your own, before being passed to the real PHP handler.
Upvotes: 3
Reputation: 401032
I don't think it's possible : it's a language construct, which means something that's more than "integrated" to the language : it's really a "part" of the language.
Upvotes: 5