note 102425 added to function.split

From: Date: Sun, 13 Feb 2011 23:44:15 +0000
Subject: note 102425 added to function.split
Groups: php.notes 
Request: Send a blank email to php-notes+get-176958@lists.php.net to get a copy of this message
Please never *ever* use this from the previous note: list( $ip, $line, $filename) = split( ',', implode( ',', array('100.1.2.3','23','/index.php') ) ); This is exactly the same as: list($ip, $line, $filename) = array('100.1.2.3','23','/index.php'); In fact, never ever use split(). Go read up on preg_split() or explode() if you don't need regular expressions. ---- Server IP: 69.147.83.197 Probable Submitter: 150.101.198.201 ---- Manual Page -- http://www.php.net/manual/en/function.split.php Edit -- https://master.php.net/note/edit/102425 Del: integrated -- https://master.php.net/note/delete/102425/integrated Del: useless -- https://master.php.net/note/delete/102425/useless Del: bad code -- https://master.php.net/note/delete/102425/bad+code Del: spam -- https://master.php.net/note/delete/102425/spam Del: non-english -- https://master.php.net/note/delete/102425/non-english Del: in docs -- https://master.php.net/note/delete/102425/in+docs Del: other reasons-- https://master.php.net/note/delete/102425 Reject -- https://master.php.net/note/reject/102425 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#176958) next »