Skip to content

tool - php 5.3 - some new functions

Since php 5.4. throws his shadow i finally had some time to check the release notes of 5.3. Here are some changes that are made in PHP 5.3, i just picked up my favorits (as expected ;-) ).

New Global Constants __DIR__ __NAMESPACE__

New Functions arrayreplace: replaces elements from passed arrays into the first array arrayreplacerecursive: replaces elements from passed arrays into the first array recursively classalias: rreates an alias for a class header_remove: remove previously set headers

I have not used one of this functions but since i am a developer i knew a lot of situations where this functons could have saved time.

other changes to extensions cURL: cURL now supports SSH OpenSSL: OpenSSL digest and cipher functions are now supported. Session: Sessions will no longer store session-files in "/tmp" when open_basedir restrictions apply, unless "/tmp" is explicitly added to the list of allowed paths.

new methods DateTime::add(): Adds an amount of days, months, years, hours, minutes and seconds to a DateTime object DateTime::diff(): Returns the difference between two DateTime objects. DateTime::sub(): Subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object.

Translate to de es fr it pt ja