On 26.07.2016 at 15:15, Michael Vostrikov wrote: >> The RFC speaks of *operator*, where actually start-tags[1] are meant, to > start with. >> Using the word operator is rather confusing in this context. > > Technically yes, but there are echo operator, so it can be considered as > special construction for using echo operator. I don't think that exact work > is very important here.
In my opinion, the wording is quite important in this case. An operator is supposed to be usable "anywhere" in PHP code, but most certainly you don't want to allow something like: <?php $value = read_value_from_db(); <?*$value*?> ?> >> But what happens to additional code, e.g. >> <?* $str, 'html', 42 ?> >> <?* $str, 'html'; echo 42 ?> > > This is new operator with new syntax. It will give parsing error. So you want to invent an own mini-language for this "operator"? That might require a lot of effort. Compare that with the implementation of `<?=`[1], i.e. it is just a shortcut for `<?php echo`. I suggest to *consider* doing something similar: invent a new statement (say, echoe, for the sake of giving an example), and make `<?*` a shortcut of `<?php echoe`. Then define the syntax and semantics of the echoe statement. [1] <https://github.com/php/php-src/blob/php-7.0.9/Zend/zend_language_scanner.l#L1791-L1794> -- Christoph M. Becker -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php