Re: [RFC Discussion] Typed Properties

From: Date: Wed, 30 Mar 2016 08:59:48 +0000
Subject: Re: [RFC Discussion] Typed Properties
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  Groups: php.internals 
Request: Send a blank email to internals+get-92013@lists.php.net to get a copy of this message
Few more related inconsistencies in current implementation. class A { public int $b; } $a = new A; var_dump($a); // <- prints A::b as NULL foreach ($a as $val) { var_dump($val); // <- prints NULL } All similar inconsistencies would be automatically solved with implicit default value int(0) and ability to explicitly define property as nullable. Thanks. Dmitry.

« previous php.internals (#92013) next »