Re: [RFC][Vote] Typed Properties

From: Date: Thu, 26 May 2016 10:39:50 +0000
Subject: Re: [RFC][Vote] 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-93557@lists.php.net to get a copy of this message
On 26/05/2016 11:16, Fleshgrinder wrote:
$o = (object) ['x' => null];
  var_dump(isset($a->x));              // false
var_dump(property_exists($a, 'x')); // true
Apart from a typo in your example (you change from $o to $a), this is already the current behaviour, and always has been: https://3v4l.org/NeqGl isset() is really very simple: if the thing your accessing would give you the value null, it returns false, otherwise it returns true. Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#93557) next »