note 72364 added to function.explode

From: Date: Tue, 16 Jan 2007 10:03:33 +0000
Subject: note 72364 added to function.explode
Groups: php.notes 
Request: Send a blank email to php-notes+get-121786@lists.php.net to get a copy of this message
I was using explode("\n", $string) to split a huge string (~ 0,5 MB). This took about 15 minutes to complete! Using strtok($string, "\n") (followed by several thousand strtok("\n") of course), the same splitting is done in less than a minute. ---- Server IP: 212.124.37.9 Probable Submitter: 132.187.10.77 ---- Manual Page -- http://www.php.net/manual/en/function.explode.php Edit -- https://master.php.net/note/edit/72364 Del: integrated -- https://master.php.net/note/delete/72364/integrated Del: useless -- https://master.php.net/note/delete/72364/useless Del: bad code -- https://master.php.net/note/delete/72364/bad+code Del: spam -- https://master.php.net/note/delete/72364/spam Del: non-english -- https://master.php.net/note/delete/72364/non-english Del: in docs -- https://master.php.net/note/delete/72364/in+docs Del: other reasons-- https://master.php.net/note/delete/72364 Reject -- https://master.php.net/note/reject/72364 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#121786) next »