Bug #14658: The strtok() changes destroyed 4 years old applications!

From: Date: Sat, 22 Dec 2001 10:46:47 +0000
Subject: Bug #14658: The strtok() changes destroyed 4 years old applications!
Groups: php.dev 
Request: Send a blank email to php-dev+get-74776@lists.php.net to get a copy of this message
From: hofmann@hofmann-int.de Operating system: Linux, Solaris, Windows PHP version: 4.1.0 PHP Bug Type: Feature/Change Request Bug description: The strtok() changes destroyed 4 years old applications! The change made in 4.1.0 to strtok() destroyed my applications from the past 4 years! Thats because I used strtok() to read data from CSV (comma separated values) files - for which it works perfektly! For CSV (not only separated with commans - also with | and other symbols) it is required that EMPTY fields will be reported as empty field!!! So the change you made brokes my existing applications. For parsing tokens as explained I understand the change - because there you wont need empty tokens! But for real parsing strtok is useless(!) because you always have more than one separator - for human language parsing you need space, return/line feed, full stop as well as comma, questionmark etc. as separators! strtok() fails here as it seems to me!!! So my suggestion ist - to restore the old behaviour for CSV parsing and adding a new command like strparse() that will work with a list of separators!!! Greetings Dipl.-Inform. Kai Hofmann -- Edit bug report at: http://bugs.php.net/?id=14658&edit=1

« previous php.dev (#74776) next »