How can i extend PHP functionality beyond functions & classes libraries?
<p>I wanna know how to extend PHP functionality beyond frameworks, functions or classes libraries ?<br>
An example about what I am trying to achieve is to be able to create my own operators, make language constructs myself (like foreach, while .. etc).<br>
Also there are a lot of built in functions, they are just available globally not in packages or something, so I have a whole range of reserved keywords that clashes with whatever classes or functions I am trying to write.<br>
I know an ideal solution would be "go and program in some other language other than PHP". This is logical and I know python &amp; ruby already, but I wanna make use of the popularity &amp; availability of PHP on a vast majority of systems.<br>
I was thinking of creating a tool to compile some custom language i make myself with all the freedom i am seeking to valid PHP code but if I know how to do that i would better hack PHP core but I don't know much c or c++ (may be only how to make a tic, tac toe)<br>
So how can I acheive that ? if it's not possible from PHP itself can I write extensions/alter the function of php using python or ruby ? if this is not possible either what are the things/languages I need to learn to get to what I am trying to do ?</p>
