> Le 8 juin 2022 à 05:34, Sara Golemon <poll...@php.net> a écrit :
> 
> 
> <?php
> declare(ignore_newline_after_close_tag=false); // defaults to true, i.e
> existing behavior
> 
> This would avoid any new syntax rules, but still provide the ability for
> php-as-template-engine to behave in the user's preferred mode.
> 

No, because the user’s preferred mode is not a global one, it is a local one. 
You do not want to keep newlines in the following situation:

```
* line 1
<?php if ($foo): ?>
* line 2
* line 3
<?php endif; ?>
* line 4
```

With a global switch, not only you have failed to solve the real problem (doing 
the Right Thing with newlines), but also you have created another one (looking 
at the top of the file in order to understand the code). You have the worst of 
both world.

—Claude
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to