note 20462 deleted from function.explode by didou

From: Date: Sun, 07 Dec 2003 03:12:10 +0000
Subject: note 20462 deleted from function.explode by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-61581@lists.php.net to get a copy of this message
Note Submitter: ken@positive-edge.com ---- Just as a quick node, if you are trying to explode a string into an array by spaces and tabs, I did some profiling (for a time-intensive application) and the results suggest that doing a $array = preg_split( "/[ \t]+/", $string ); is jsut as fast as doing the explode. I don't mean 'roughly' - I really mean to microsecond. The test conducted were executed over 50,000 times on various strings and the time was nearly identical. Thought this would help people profile their stuff better.

« previous php.notes (#61581) next »