note 119739 added to migration70.new-features
| From: | omarv_r at yahoo dot com | Date: | Mon, 15 Aug 2016 11:38:40 +0000 |
| Subject: | note 119739 added to migration70.new-features | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-206291@lists.php.net to get a copy of this message | ||
lexx918, It is not working unexpectedly... lets see:
Calling to isset() method for a non existing property ($foo->bar in this case), automatically the
magic method __isset() is invoked. So
$a = isset($foo->bar) ?: null; // __isset
is correct.
But when we try to evaluate $foo->bar, we are calling a getter. Because the bar property does not
exist, the implicit calling is to magic method __get(). So
$a = $foo->bar ?? null; // __get
is correct too.
----
Server IP: 72.52.91.14
Probable Submitter: 201.243.255.113
----
Manual Page -- http://php.net/manual/en/migration70.new-features.php
Edit -- https://master.php.net/note/edit/119739
Del: integrated -- https://master.php.net/note/delete/119739/integrated
Del: useless -- https://master.php.net/note/delete/119739/useless
Del: bad code -- https://master.php.net/note/delete/119739/bad+code
Del: spam -- https://master.php.net/note/delete/119739/spam
Del: non-english -- https://master.php.net/note/delete/119739/non-english
Del: in docs -- https://master.php.net/note/delete/119739/in+docs
Del: other reasons-- https://master.php.net/note/delete/119739
Reject -- https://master.php.net/note/reject/119739
Search -- https://master.php.net/manage/user-notes.php