Req #67030 [Com]: Support property syntax for associative arrays

From: Date: Wed, 06 May 2015 11:57:17 +0000
Subject: Req #67030 [Com]: Support property syntax for associative arrays
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192515@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67030&edit=1 ID: 67030 Comment by: olafvdspek at gmail dot com Reported by: olafvdspek at gmail dot com Summary: Support property syntax for associative arrays Status: Wont fix Type: Feature/Change Request Package: *General Issues PHP Version: 5.5.11 Block user comment: N Private report: N New Comment: Somebody, please? Previous Comments: ------------------------------------------------------------------------ [2014-04-06 12:45:01] olafvdspek at gmail dot com Would you mind being a little bit more constructive in your rejection? 'name' isn't an offset, I know array != object but I've no idea why you think this would be a bad idea. ------------------------------------------------------------------------ [2014-04-06 06:28:16] nikic@php.net Won't happen. offset != property, array != object. ------------------------------------------------------------------------ [2014-04-05 21:44:17] olafvdspek at gmail dot com Description: ------------ Could you support the property access syntax -> for associative arrays? This would make the syntax slightly simpler and it'd save notices like: "Use of undefined constant name - assumed 'name' in /home/olaf/a.php on line 4" Test script: --------------- $v['name'] = 'Olaf'; echo $v->name; Actual result: -------------- Olaf ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67030&edit=1

« previous php.bugs (#192515) next »