From:             bart at mediawave dot nl
Operating system: Irrelevant
PHP version:      5.0.0RC2
PHP Bug Type:     Feature/Change Request
Bug description:  Cast array to properties of custom objects

Description:
------------
A lot of functions in PHP return arrays in stead of objects. Of course
it's possible to simply cast the return value to an object like:

$urlObject = (object) parse_url($url);

But then I would get an instance of the stdClass. I can imagine situations
where people would like to cast arrays into properties of their own custom
objects. Maybe something like:

cast_array2object($array, $someCustomObject);

or something like:

$this .= (object) parse_url($url);


-- 
Edit bug report at http://bugs.php.net/?id=28462&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28462&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28462&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28462&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28462&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28462&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28462&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28462&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28462&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28462&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28462&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28462&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28462&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28462&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28462&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28462&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28462&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28462&r=float

Reply via email to