How come XHP can alter PHP syntax and yet be wholl

2019-09-16 14:44发布

问题:

I think what I'm asking is this:

  1. To make PHP understand $a=<div>{$stuff}</div> one must alter the PHP parser
  2. The above can not be done in a PHP extension or even a Zend extension. To introduce new syntax one has to modify the Zend Engine.
  3. XHP does (1) as a simple extension !

What am I missing ?