New Class Constants
New Extensions
Migrating from PHP 5.2.x to PHP 5.3.x
PHP Manual

## New Methods

Several new methods were introduced in 5.3.0:

Date/Time:

- 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:

- Exception::getPrevious() - Retrieves the previous exception.

DOM:

- DOMNode::getLineNo() - Get the line number of a parsed node.

PDO_FIREBIRD:

- PDO::setAttribute() - Sets an attribute.

Reflection:

- 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.

New Class Constants
New Extensions
Migrating from PHP 5.2.x to PHP 5.3.x
PHP Manual