|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78810 RW fetches do not throw "uninitialized property" exception
Submitted: 2019-11-13 19:56 UTC Modified: -
From: Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 7.4.0RC5 OS:
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [2019-11-13 19:56 UTC]
Accesses to uninitialized typed properties currently only throw an exception for R fetches, but not increments ( or compound assignment operators ( These should throw as well.

Salvaged from bug #78809, which had to be deleted due to inappropriate language.

Test script:

class Test {
    public int $i;
$test = new Test;

Expected result:
Uncaught Error: Typed property Test::$i must not be accessed before initialization

Actual result:
Notice: Undefined property: Test::$i in /in/oqvf3 on line 7


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-11-15 11:09 UTC]
Automatic comment on behalf of
Log: Fixed bug #78810
 [2019-11-15 11:09 UTC]
-Status: Open +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Mar 03 07:01:28 2024 UTC