Doc #73420 [NEW]: unsemicoloned expressions vs statements
From: ewan dot delanoy at gmx dot fr Date: Sun, 30 Oct 2016 13:31:46 +0000 Subject: Doc #73420 [NEW]: unsemicoloned expressions vs statements Groups: php.doc.bugs Request: Send a blank email to [email protected] to get a copy of this message
From: ewan dot delanoy at gmx dot fr Operating system: PHP version: Irrelevant Package: PHP Language Specification Bug Type: Documentation Problem Bug description:unsemicoloned expressions vs statements Description: ------------ Consider the following (valid) one-line php code : <input type="<?php echo 'text' ?>"/> According to https://github.com/php/php-langspec/blob/master/spec/04-basic-concepts.md, in the code above echo 'text' must be a statement-list. According to https://github.com/php/php-langspec/blob/master/spec/11-statements.md, this statement-list must in fact consist of a single statement. But what type of statement is it ? If we look at the enumeration at https://github.com/php/php-langspec/blob/master/spec/11-statements.md#general, it seems to be an expression-statement. But https://github.com/php/php-langspec/blob/master/spec/11-statements.md#expression-statements says that expression-statements always end with a semicolon. Test script: --------------- <input type="<?php echo 'text' ?>"/> -- Edit bug report at https://bugs.php.net/bug.php?id=73420&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73420&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73420&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73420&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=73420&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=73420&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=73420&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=73420&r=needscript Try newer version: https://bugs.php.net/fix.php?id=73420&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=73420&r=support Expected behavior: https://bugs.php.net/fix.php?id=73420&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=73420&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=73420&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=73420&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73420&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=73420&r=dst IIS Stability: https://bugs.php.net/fix.php?id=73420&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=73420&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=73420&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=73420&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=73420&r=mysqlcfg
Thread (1 message)
« previous | php.doc.bugs (#14053) | next » |
---|