note 47127 added to function.split

From: Date: Thu, 04 Nov 2004 00:10:42 +0000
Subject: note 47127 added to function.split
Groups: php.notes 
Request: Send a blank email to php-notes+get-79574@lists.php.net to get a copy of this message
Though this is obvious, the manual is a bit incorrect when claiming that the return will always be 1+number of time the split pattern occures. If the split pattern is the first part of the string, the return will still be 1. E.g. $a = split("zz," "zzxsj.com"); count($a); => 1. The return of this can not in anyway be seperated from the return where the split pattern is not found. ---- Manual Page -- http://www.php.net/manual/en/function.split.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47127 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47127&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47127&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47127&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47127&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47127&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47127&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47127&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#79574) next »