|
Mantis - Quercus
|
|||||
| Viewing Issue Advanced Details | |||||
|
|
|||||
| ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
| 4260 | minor | sometimes | 10-14-10 12:04 | 10-19-10 15:10 | |
|
|
|||||
| Reporter: | domdorn | Platform: | |||
| Assigned To: | OS: | ||||
| Priority: | normal | OS Version: | |||
| Status: | feedback | Product Version: | 4.0.11 | ||
| Product Build: | Resolution: | open | |||
| Projection: | none | ||||
| ETA: | none | Fixed in Version: | |||
|
|
|||||
| Summary: | 0004260: Dynamic properties not working correctly | ||||
| Description: |
Dynamic properties do not behave the same as in native PHP (version ?) <?php class Foo { public function __construct() {} } class Bar { public $name = "Greg"; public function __construct() {} } $foo = new Foo(); $foo->bar = new Bar(); echo " TEST 1: "; print_r($foo); // Foo Object ( [bar] => Bar Object ( [name] => Greg ) ) echo " TEST 2: "; echo $foo->bar; // Bar[] echo " TEST 3: "; $barVariable = "bar"; echo $foo->$barVariable; // Bar[] echo " TEST 4: "; echo $foo->$barVariable->name; // (blank) echo " TEST 5: "; $testBarVar = $foo->$barVariable; echo $testBarVar->name; // Greg echo " TEST 6: "; echo $foo->bar->name; // Greg ?> Additional information: http://www.krisjordan.com/2008/11/27/dynamic-properties-in-php-with-stdclass/ [^] |
||||
| Steps To Reproduce: | |||||
| Additional Information: | |||||
| Relationships | |||||
| Attached Files: | |||||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||