php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32698 Initializing a variable twice in class header will stop php without any message
Submitted: 2005-04-13 20:35 UTC Modified: 2005-04-13 22:58 UTC
Votes:1
Avg. Score:2.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: matr1z at gmx dot net Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.0.4 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
31 + 34 = ?
Subscribe to this entry?

 
 [2005-04-13 20:35 UTC] matr1z at gmx dot net
Description:
------------
The bellow script will cause php to stop processing without showing any warning / error message.
The "ok" will not be shown. 

There should be an error message if you try to initialize a class variable twice.


Reproduce code:
---------------
<?

class Test {
  public $test = 'a';
  public $test = 'b';
}

print "ok";

?>

Expected result:
----------------
Error message or warning.

Actual result:
--------------
No output. PHP just stops processing.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-13 22:58 UTC] tony2001@php.net
Set display_errors directive to On and you'll see the fatal error message.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 01 13:01:33 2024 UTC