Bug #67766 [Opn->Csd]: Inaccuracies in Program Structure

[email protected]
Newsgroups php.standards
Message-ID <[email protected]>
Edit report at https://bugs.php.net/bug.php?id=67766&edit=1

 ID:                 67766
 Updated by:         [email protected]
 Reported by:        joelm at fb dot com
 Summary:            Inaccuracies in Program Structure
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            PHP Language Specification
 PHP Version:        Irrelevant
-Assigned To:        
+Assigned To:        stas
 Block user comment: N
 Private report:     N

 New Comment:

The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

This seems to be already fixed.


Previous Comments:
------------------------------------------------------------------------
[2014-08-05 16:15:49] joelm at fb dot com

Description:
------------
https://github.com/php/php-langspec/blob/master/spec/04-basic-concepts.md#program-structure

The "<?php" open tag doesn't have to be at the top of the file, it can come later, and technically a PHP file might not have any tags at all. Also, after the "?>" close tag there can be more stuff and possible another open tag "<?php". Finally, there are some interesting things like how "<?" (with the "php" part) work as an open tag, and how "<script language='php'>" can also work as an open tag. Stuff that appears before the first open tag and stuff that appears after a close tag but before the next open tag is treated as content that is echo'd out when the flow of execution reaches it. 

Some of this has been addressed by changing the grammar for the syntactic grammar production “program”.



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=67766&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.