Req #70236 [Com]: $->var as syntactic sugar for $this->var
| From: | matt at re-gister dot com | Date: | Wed, 26 Aug 2015 11:33:30 +0000 |
| Subject: | Req #70236 [Com]: $->var as syntactic sugar for $this->var | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-195532@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70236&edit=1
ID: 70236
Comment by: matt at re-gister dot com
Reported by: z4k4ri4 at gmail dot com
Summary: $->var as syntactic sugar for $this->var
Status: Open
Type: Feature/Change Request
Package: Scripting Engine problem
Operating System: All
PHP Version: 7.0.0beta3
Block user comment: N
Private report: N
New Comment:
I would appreciate this
Previous Comments:
------------------------------------------------------------------------
[2015-08-11 08:18:07] z4k4ri4 at gmail dot com
Description:
------------
In a everyday PHP OOP coding, $this->var or $this->method() is so common and verbose, it
becomes a distraction for code reading.
I request that PHP add short form of $->var or $->method() as an alias for $this->var and
$this->method().
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70236&edit=1