PHP 5.4
New Methods
Several new methods were introduced in 5.4.0:
XSL:
SPL:
- RegexIterator::getRegex()
- SplObjectStorage::getHash()
- DirectoryIterator::getExtension()
- SplDoublyLinkedList::serialize()
- SplDoublyLinkedList::unserialize()
- SplFileInfo::getExtension()
- SplFileObject::fputcsv()
- SplQueue::serialize()
- SplQueue::unserialize()
- SplStack::serialize()
- SplStack::unserialize()
- SplTempFileObject::fputcsv()
- ReflectionExtension::isPersistent()
- ReflectionExtension::isTemporary()
- ReflectionClass::isCloneable()
- PDO::newRowset()
PHP 5.3
New Methods
Several new methods were introduced in 5.3.0:
- DateTime::add() - Adds an amount of days, months, years, hours, minutes and seconds to a DateTime object.
- DateTime::createFromFormat() - Returns a new DateTime object formatted according to the given format.
- DateTime::diff() - Returns the difference between two DateTime objects.
- DateTime::getLastErrors() - Returns the warnings and errors from the last date/time operation.
- DateTime::sub() - Subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object.
- Exception::getPrevious() - Retrieves the previous exception.
DOM:
- DOMNode::getLineNo() - Get the line number of a parsed node.
- PDO::setAttribute() - Sets an attribute.
- ReflectionClass::getNamespaceName() - Returns the name of namespace where this class is defined.
- ReflectionClass::getShortName() - Returns the short name of this class (without namespace part).
- ReflectionClass::inNamespace() - Returns whether this class is defined in a namespace.
- ReflectionFunction::getNamespaceName() - Returns the name of namespace where this function is defined.
- ReflectionFunction::getShortName() - Returns the short name of the function (without namespace part).
- ReflectionFunction::inNamespace() - Returns whether this function is defined in a namespace.
- ReflectionProperty::setAccessible() - Sets whether non-public properties can be requested.
SPL:
- SplObjectStorage::addAll() - Add all elements from another SplObjectStorage object.
- SplObjectStorage::removeAll() - Remove all elements from another SplObjectStorage object.
XSL:
- XSLTProcessor::setProfiling() - Sets the profiling output file.
PHP 5.2
New Methods
New methods were introduced in 5.2.0:
dom:
- DOMDocument::registerNodeClass() - Register extended class used to create base node type
- DOMElement::setIDAttribute() - Declares the attribute specified by name to be of type ID
- DOMElement::setIDAttributeNode() - Declares the attribute specified by node to be of type ID
- DOMElement::setIDAttributeNS() - Declares the attribute specified by local name and namespace URI to be of type ID
- DOMNode::C14N()([bool exclusive [, bool with_comments [, array xpath [, array ns_prefixes]]]]) - Canonicalize nodes to a string
- DOMNode::C14NFile()(string uri [, bool exclusive [, bool with_comments [, array xpath [, array ns_prefixes]]]]) - Canonicalize nodes to a file
-
DOMNode::getNodePath()()
- Gets an
xpath
for a node
soap:
- SoapServer::setObject()(object obj) - Sets object which will handle SOAP requests
spl:
- int ArrayObject::asort()(void) - Sort the entries by values
- int ArrayObject::ksort()(void) - Sort the entries by key
- int ArrayObject::natcasesort()(void) - Sort the entries by key using case insensitive "natural order" algorithm.
- int ArrayObject::natsort()(void) - Sort the entries by values using "natural order" algorithm.
- int ArrayObject::uasort()(callback cmp_function) - Sort the entries by values using a user defined function
- int ArrayObject::uksort()(callback cmp_function) - Sort the entries by key using a user defined function.
-
ArrayIterator AppendIterator::getArrayIterator()()
- Get access to inner
ArrayIterator
- int AppendIterator::getIteratorIndex()() - Get index of iterator
- bool CachingIterator::getCache()() - Return the cache
- int CachingIterator::getFlags()() - Return the internal flags
-
bool CachingIterator::offsetExists()(mixed index)
- Returns
TRUE
if the requested index exists - string CachingIterator::offsetGet()(mixed index) - Return the internal cache if used
- void CachingIterator::offsetSet()(mixed index, mixed newval) - Set given index in cache
- void CachingIterator::offsetUnset()(mixed index) - Unset given index in cache
- void CachingIterator::setFlags()() - Set the internal flags
- array("delimiter" =>, "enclosure" =>) SplFileObject::getCsvControl()(void) - Get the delimiter and enclosure character used in fgetcsv()
- void SplFileObject::setCsvControl()([string delimiter = ',' [, string enclosure = '"']]) - Set the delimiter and enclosure character used in fgetcsv()
- tidyNode tidyNode::getParent()() - Returns the parent node of the current node (Added in PHP 5.2.2)
- boolean XMLReader::setSchema() - Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first XMLReader::read()
zip:
- ZipArchive::addEmptyDir()() - Creates an empty directory in the archive