You are here: strtok() rationale « PHP Programming Language « IT news, forums, messages
strtok() rationale

Posted by semi_evil on 05/26/07 19:43

I downloaded a few PHP scripts from various sites, in part to use them
as is, and partly to study and learn from them.

One script is littered with strtok() occurrences. So I checked the
manual for its details.
I do understand the basics of it, and the limitations (like not being
able to work on two strings simultaneously for loss of the strtok
internal 'pointer').

And it MUST be my ignorance and/or limited experience, but I don't
understand what this function has to offer that can't be solved with
str_split and explode functions, or to be more precise, what typical
problem can better/easier/faster be solved by using strtok() than by
the 'easier' string and array functions.

I am convinced there are good reasons to use strtok, maybe some folks
here can point me to a 'textbook situation' where strtok saves the day
or copy/paste a good self-explanatory example or link to additional
strtok() reading material.

Cheers!
Semi

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация