note 119794 added to sdo.sample.getset
| From: | MalcolmMurphy | Date: | Sat, 27 Aug 2016 05:05:05 +0000 |
| Subject: | note 119794 added to sdo.sample.getset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-206401@lists.php.net to get a copy of this message | ||
You can also use curly brackets to evaluate property names (e.g., to access a property name
containing special [non-standard] characters without first needing to assign the name to a
variable).
<?php
$object = new StdClass();
// standard access using variable
$nonStandardPropertyName = '/a/path?for=example';
$object->$nonStandardPropertyName = 'access using a variable';
// alternative access using curly braces
$object->{'/a/path?for=example'} = 'set using curly braces';
----
Server IP: 72.52.91.14
Probable Submitter: 67.215.23.198
----
Manual Page -- http://php.net/manual/en/sdo.sample.getset.php
Edit -- https://master.php.net/note/edit/119794
Del: integrated -- https://master.php.net/note/delete/119794/integrated
Del: useless -- https://master.php.net/note/delete/119794/useless
Del: bad code -- https://master.php.net/note/delete/119794/bad+code
Del: spam -- https://master.php.net/note/delete/119794/spam
Del: non-english -- https://master.php.net/note/delete/119794/non-english
Del: in docs -- https://master.php.net/note/delete/119794/in+docs
Del: other reasons-- https://master.php.net/note/delete/119794
Reject -- https://master.php.net/note/reject/119794
Search -- https://master.php.net/manage/user-notes.php