#38337 [Opn->Bgs]: explode function's return value is incorrect

From: Date: Sat, 05 Aug 2006 01:59:33 +0000
Subject: #38337 [Opn->Bgs]: explode function's return value is incorrect
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969373664@lists.php.net to get a copy of this message
ID: 38337 Updated by: sean@php.net Reported By: z_rules55 at hotmail dot com -Status: Open +Status: Bogus Bug Type: Documentation problem PHP Version: Irrelevant New Comment: Many functions return FALSE if something goes wrong/data has been exhausted/the function does not find what the developer was looking for. In fact, we'd have to mark a great number of functions in the manual "mixed" if we followed the convention you propose. Instead, we mark return values as the most common case(s), and avoid error situations. See strpos(), each(), mysql_fetch_assoc(), etc. S Previous Comments: ------------------------------------------------------------------------ [2006-08-04 22:04:29] z_rules55 at hotmail dot com Description: ------------ explode() is listed as returning an array. However, its documentation states that: -------------- If separator is an empty string (""), explode() will return FALSE. If separator contains a value that is not contained in string, then explode() will return an array containing string. -------------- The return value should therefore be "mixed". ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38337&edit=1

« previous php.doc (#969373664) next »