Re: Alternative PHP tags and strict_types=1

From: Date: Thu, 14 May 2015 14:54:05 +0000
Subject: Re: Alternative PHP tags and strict_types=1
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-86221@lists.php.net to get a copy of this message
mmm I guess this is the correct behaviour, <% tags ar now not parsed at all and behave as plain text. If you run http://3v4l.org/uDDW3 foo <?php declare(strict_types=1); it will fail too On Thu, May 14, 2015 at 4:39 PM, Bishop Bettini <bishop@php.net> wrote: > Hi! > > In php7@20150501, I've noticed that this code <^Ú)�h×,;xú > http://3v4l.org/hPFIg> > produces the expected output [1]: > > <% echo 'top'; %> > <?php // COMMENTED OUT -- declare(strict_types=1); > > But this code <http://3v4l.org/RriFV> unexpectedly > produces the > strict-must-be-first instruction error: > > <% echo 'top'; %> > <?php declare(strict_types=1); > > > Am I missing something? I expected that removing the ASP tags > <https://wiki.php.net/rfc/remove_alternative_php_tags> > from the language > would remove them and their contents from tallying as instructions. > > Thanks, > bishop > > [1]: The expected output is "<% echo 'top'; %>", not "top". >

« previous php.internals (#86221) next »