|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-09-06 10:38 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 06:00:01 2025 UTC |
Description: ------------ I have a class with simple property, without any given type or value. Trying to access this property as it will be an array (i.e. getting its index, which is obviously undefined), should generate a notice when E_STRICT is set - but it doesn't. Specifying the property type as array or adding other index generates notice as expected. Reproduce code: --------------- error_reporting(E_ALL | E_STRICT); class test { private $bla; public function __construct() { var_dump(empty($this->bla)); var_dump($this->bla['fff']); } } $x = new test(); Expected result: ---------------- bool(true) Notice: Undefined index: fff in [...] NULL Actual result: -------------- bool(true) NULL