|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-03-15 22:32 UTC] cmb@php.net
-Status: Open
+Status: Verified
-Type: Documentation Problem
+Type: Bug
[2020-03-15 22:32 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 13:00:02 2025 UTC |
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' ?>"/>