On 18.07.2006 13:38, Michael Wallner wrote:
Ilia Alshanetsky wrote:
Looks good to me, although I'd prefer you returned an associated
array rather then an object.

What for do we have object dereferencing then? As gimmick or buzzword?

Definitely not for returning errors.
Array perfectly fits here.
$err = error_get_last();
echo $err["message"];

vs.

echo error_get_last()->message;

And if there was no error before that - what would you get?

One can still cast the stdClass instance to an array.

--
Wbr, Antony Dovgal

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to