php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36441 php exits script (without error) when finds code like "function xxx(); {}"
Submitted: 2006-02-18 13:36 UTC Modified: 2006-12-20 09:35 UTC
From: michal dot hantl at gmail dot com Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.1.2 OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: michal dot hantl at gmail dot com
New email:
PHP Version: OS:

 

 [2006-02-18 13:36 UTC] michal dot hantl at gmail dot com
Description:
------------
php sort of exits executing this source code without propper parse error (which php4 reports correctly)

problem is in that ";" after "function whatever()"

Reproduce code:
---------------
Hello there
<?php    

class bug {      
  function whatever(); {       
    die("you wish");      
  }    
}  

?> 

Expected result:
----------------
some parse error

Actual result:
--------------
<totally nothing>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-18 16:30 UTC] mike@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip

I get:

Fatal error: Non-abstract method b::c() must contain body
 [2006-02-26 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2006-12-20 09:35 UTC] bjori@php.net
turn on error reporting
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 06:01:34 2025 UTC