You could use the PHP Compiler: http://phpcompiler.org/ and do a
preprocessor as I did: http://www.satyam.com.ar/pht/.
PHC is capable of compiling a PHP source and return a modified PHP source.
It is easy to make a plugin for any such modifications, there is a class
which gets instantiated after parsing and makes a full tree traversal with a
method defined for each node type so you simply inherit from the method for
your particular tree node and make any modifications you want to it.
For PHC echo is not a language construct, you would have to override the
"method invocation" method, check whether the function name is "echo" (print
is translated to echo) and then do your changes. One of the tutorials
shows you how to do this: http://phpcompiler.org/doc/tutorial2.html
Satyam
----- Original Message -----
From: "Fahad Pervaiz" <fahad.pervaiz@xxxxxxxxx>
To: <php-general@xxxxxxxxxxxxx>
Sent: Tuesday, December 19, 2006 6:46 AM
Subject: Re: ECHO
I have written a framework for internationalization. Now i have
incoorperate
it into and existing system that is huge and it will take alot of time to
change ECHO to a function call, so i want to override its implementation
so
that i can use it for my own purposes with having to change all the echo
calls
--
Regards
Fahad Pervaiz
www.ecommerce-xperts.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php