Zitat von Ilia Alshanetsky <[EMAIL PROTECTED]>: > Perhaps, if PEAR developers wrote proper code & did not rely upon > unsupported > & undocumented features we would not have this problem. While they do, > these > problems will occur. If you do not write proper code, either don't turn > on > warnings & notices (that supposed to help you write proper code) or take > the > time to fix the problem. This by no means is a problem in PHP.
As Stefan pointed out with his link to the PHP manual, this acutally *is* documented, because it's an implicit cast from a simple type to an array. >From the manual: For any of the types: integer, float, string, boolean and resource, if you convert a value to an array, you get an array with one element (with index 0), which is the scalar value you started with. If you convert an object to an array, you get the properties (member variables) of that object as the array's elements. The keys are the member variable names. If you convert a NULL value to an array, you get an empty array. [...] PHP does not require (or support) explicit type definition in variable declaration; a variable's type is determined by the context in which that variable is used. Jan. -- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php