php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53060 End tag ; ignored on last statement
Submitted: 2010-10-14 04:15 UTC Modified: 2010-10-14 04:17 UTC
From: musicdev at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.3.3 OS: Windows 7 Ultimate
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: musicdev at gmail dot com
New email:
PHP Version: OS:

 

 [2010-10-14 04:15 UTC] musicdev at gmail dot com
Description:
------------
I'm not completely sure that this is an intended behavior.  In a php script, the last statement can be left unclosed (without the ";").  Please see below script.  The behavior does not seem to be negative as the last statement is reached, however, the expected result is consistency and all statements need to be closed.

Test script:
---------------
<?php
echo "test"
?>


Expected result:
----------------
In the short script provided, I expect php to provide an error stating that the statement is not closed using the closing semi-colon (;).

Actual result:
--------------
The actual result is that the script runs as normal and echos the "test" statement, though the statement is not closed.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-14 04:17 UTC] rasmus@php.net
-Status: Open +Status: Bogus
 [2010-10-14 04:17 UTC] rasmus@php.net
No, ; is the statement separator and it is perfectly consistent the way it is 
since you are not separating any statements there.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 14:01:31 2025 UTC