Anonymous | Login | Signup for a new account | 11-21-2024 16:21 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | |||||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
0004260 | [Quercus] | minor | sometimes | 10-14-10 12:04 | 10-19-10 15:10 | |||||||
Reporter | domdorn | View Status | public | |||||||||
Assigned To | ||||||||||||
Priority | normal | Resolution | open | |||||||||
Status | feedback | Product Version | 4.0.11 | |||||||||
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/ [^] |
|||||||||||
Additional Information | ||||||||||||
Attached Files | ||||||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
36 total queries executed. 29 unique queries executed. |