Author Topic: Is SPL part of PHP 5.2.11?  (Read 494 times)

0 Members and 1 Guest are viewing this topic.

Offline takeme2webTopic starter

  • Irregular
    • View Profile
Is SPL part of PHP 5.2.11?
« on: February 09, 2010, 06:19:24 PM »
All,

Is Standard PHP Library is part of PHP 5.2.11 version? Or Do I have to download the SPL from some URL?

Please let me know.

Please note that I have posted the same message in the "Other Scripts" forum too.

Thanks
Takeme2web-Bala

Online thorpe

  • Administrator
  • 'Mind Boggling!'
  • *
    • View Profile
Re: Is SPL part of PHP 5.2.11?
« Reply #1 on: February 09, 2010, 07:42:06 PM »
Quote
Is Standard PHP Library is part of PHP 5.2.11 version? Or Do I have to download the SPL from some URL?


From the manual
Quote
Note: As of PHP 5.3.0 this extension can no longer be disabled and is therefore always available.


Quote
Please note that I have posted the same message in the "Other Scripts" forum too.


Removed. Not only is it against our TOS to double post, the Other Scripts board (whch doesn't actually exist) would be completely unrelated to your question.
« Last Edit: February 09, 2010, 07:43:26 PM by thorpe »

Offline salathe

  • n'est pas un petit blaireau
  • Guru
  • Devotee
  • *
  • Gender: Male
  • Species: Meles meles
    • View Profile
    • My Blog
Re: Is SPL part of PHP 5.2.11?
« Reply #2 on: February 10, 2010, 05:20:31 AM »
The SPL was added in PHP 5 (strictly 5.0.0 beta 4) and has been continuously improved upon since that point with new changes coming in the latest versions of PHP.  If you browse to the manual page for a particular method of an SPL class, the version where it was introduced is printed at the top of the page.

For example, for IteratorIterator::current:


As thorpe quoted, as of PHP 5.3.0 the SPL extension cannot be disabled. Before that point, there is no guarantee that it will be enabled (but in my experience it is not common to disable it).

Offline Mchl

  • Guru
  • Freak!
  • *
  • Gender: Male
  • That's Largo in my avatar, not me.
    • View Profile
    • BOINC@Poland
Re: Is SPL part of PHP 5.2.11?
« Reply #3 on: February 10, 2010, 05:33:45 AM »
Code: [Select]
echo extension_loaded('spl');
NetBeans fanatic | ExtJS masochist | C++ denier
PHP4 & MySQL4 are no longer supported.
PHPFreaks Tutorials | PHP Debugging: A Beginner's guide | PHP Security Tutorial || How To Ask Questions The Smart Way
Code: [Select]
brugere i panik

PHP Freaks Forums

« on: »

Tired of these ads? Purchase a supporter subscription to get rid of them.