On Sep 18, 2023, at 11:18, Shailesh Humbad <shail...@atensoftware.com> wrote:
> INSTEAD:
> Change the short echo tag "<?= $x ?>" to be equivalent to "<?php 
> is_callable($x) ? $x() : echo $x; ?>", which allows view model properties to 
> be defined as closures.

Surely this can already be accomplished unambiguously using syntax like `<?= 
$x() ?>` or `<? ($model->title)() ?>` ?

In any case, this seems like a non-starter, as it would substantially change 
the behavior of some existing code, e.g. when echoing objects which implement 
both __invoke() and __toString().
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to