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
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: matr1z at gmx dot net
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 07 05:01:36 2025 UTC