I’m running a PHP script from CLI that user the DirectoryIterator::getExtension() method in PHP.
The version of PHP I’m running under is 5.3.5, but I keep getting errors saying Fatal error: Call to undefined method DirectoryIterator::getExtension()
The script works fine in my local dev machine running PHP 5.3.6, with no errors. However, the page for DirectoryIterator::getExtension() in the PHP man has no mention of version.
Can anyone tell me what version I need to use this method?
From the documentation:
It seems like the commit didn’t make the PHP 5.3.5 build, but got into the 5.3.6 release. The page just hasn’t been updated yet.
And as Mario pointed out, the 5.3.6 changelog mentions the addition: