But we already have today:

declare(encoding='ISO-8859-1');
declare(ticks=1);

And for both holds: *the file is running a special mode of PHP, not the 
usual one.*
– Should I write all of them in the first line, or is strict_types such 
special?
– And, if so, what makes it such special?

Furthermore, at least for ticks, I see valid multi-line use cases:

Block declare statements are allowed and MUST be formatted as below. Note 
> position of braces and spacing:
> declare(ticks=1) {
>     //some code
> }
>

Moreover:

 Each block MUST be in the order listed below, although blocks that are not 
> relevant may be omitted.
>    
>    - File-level docblock.
>
>
>    - One or more declare statements.
>
>
>    - The namespace declaration of the file.
>
>
>    - …
>
> Hence, I know where they are, and *I don't need to scan around doc blocks 
and namespace declarations.*

Sorry, but I cannot see at the moment, how a consistent style 
recommendation may look like with that change.
However, I understand that declare statements are more important than the 
*File-level 
docblock –* thus why
not move them to the top of the list instead?

Best regards,
Michael Mayer

Am Sonntag, 4. Dezember 2016 18:50:55 UTC+1 schrieb Jordi Boggiano:
>
> I'm with Rudolph on this one, as I replied in the survey that was sent a 
> while back. IMO it should be on the first line to make sure it's visible 
> and not missed because it is such a meaningful line. It completely 
> changes the way the engine works, it's not php anymore, but strict php, 
> and you better be aware of it. 
>
> As for the fear that more flags will be added, well of course it's 
> possible but IMO unlikely. In any case we can revisit that topic if 
> needed when we have more flags, I don't think we need to set the rule of 
> today based on future unknowns. 
>
> Cheers 
>
> On 04/12/2016 14:48, Michael Mayer wrote: 
> > I disagree too. 
> > 
> > What, if PHP8 will introduce a new execution directive and PHP9 as well 
> > etc. And all of these are considered as good practice. 
> > Where should I put them? All in the same line? 
> > 
> > | 
> > <?php 
> > 
> declare(strict_types=1);declare(php8_directive=1);declare(php9_directive=1); 
>
> > 
> > useFoo\Bar\Baz; 
> > 
> > classThingextendsBaz 
> > { 
> > } 
> > | 
> > 
> > Ewww! 
> > 
> > Best regards, 
> > Michael Mayer 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "PHP Framework Interoperability Group" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> > an email to php-fig+u...@googlegroups.com <javascript:> 
> > <mailto:php-fig+u...@googlegroups.com <javascript:>>. 
> > To post to this group, send email to php...@googlegroups.com 
> <javascript:> 
> > <mailto:php...@googlegroups.com <javascript:>>. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/php-fig/07f36815-e178-42ee-b76c-42fa446fbfd9%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/php-fig/07f36815-e178-42ee-b76c-42fa446fbfd9%40googlegroups.com?utm_medium=email&utm_source=footer>.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>
> -- 
> Jordi Boggiano 
> @seldaek - http://seld.be 
>

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/1f66926a-551f-4092-abb9-6c9bee83ebb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to