• PHP split() is listed as deprecated and will be removed
    10/18/2009 3:51PM

    This is one of the liabilities of using a language long term that's in a high state of flux. As you continue to build larger and larger codebases, the work required to change that codebase as the language changes increases linearly.

    The formVista codebase started in 2001 and has been growing ever since. During that time the PHP language has changed significantly. In many of these cases these changes address fundamental design flaws in the language such as the whole way objects were done in PHP 4. (A change which will in the near future force me to evaluate each and every object assignment in the entire codebase. ouch.)

    So today I was looking at the PHP documentation for the split(). I'm endless forgetting if the string or the delimiter comes first. To my shock and horror split() is now deprecated.

    Of course you can use explode() or preg_split(), but it's another case of having to crawl through a codebase and change things. IMHO, in this case it's completely needless and arbitrary. If the underlying code that implements the split() function needs to be changed, then a wrapper function should be included so that legacy code does not break.


  • Comment By:
    Yermo
    10/18/2009 6:04PM
    As was pointed out by one of my friends on Facebook, this could also represent a support nightmare. Imagine a PHP upgrade happening and suddenly all of your forum, blogging, support ticketing and ecommerce software breaks and you have no idea why. Given that it's likely to come from third parties it's not as easy as just doing a search and replace in your own code.
You must be logged into an account to post comments.