RE: Mixed return type - boolean and array/resource/closure or object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




From: Sebastian Krebs [mailto:krebs.seb@xxxxxxxxx] 
Sent: Wednesday, March 05, 2014 3:18 AM
To: Robert Stoll
Cc: PHP General List
Subject: Re:  Mixed return type - boolean and array/resource/closure or object

> Some array functions like "current", "array_pop" and so on (item of arbitrary type or null) can return everything. An
example for "boolean or object" is 'date_create' [1]. Afaik there is no built-in function, that returns a closure, so
the combination "boolean or closure" is not possible at all.

Hm... date_create is an alias of DateTime::__construct and as far as I understood __construct returns usually an object
and false only in the case where an exception has been thrown anyway. Right?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux