PHP 5.3 was released on June 30th and everything is already asking when is Hawk Host going to have it on our servers! Well this is unfortunately going to take some time until it shows up on our servers is it is a major release that does have some deprecated features users may be using. It also has some changes to functions and of the core of PHP itself and we just don’t know how well it’ll play with various open source, commercial and custom PHP scripts users make use of it. So as it stands I estimate at the earliest August it’ll be on our servers but it may actually be more like September. This comes down to knowing all PHP scripts work fine as well as cPanel having support for it and litespeed. Right now we’re actually waiting on cPanel to fully support 5.2.10 which we could install ourselves but best to let others deal with the issues and we’ll just run things when all the issues are figured out.
A very cool although useless for our users is the fact the LiteSpeed SAPI is now a SAPI available by default in the PHP core! So basically means we could do –with-litespeed or whatever the parameter is to get the litespeed PHP binary.
Quick list of the major new features
- Support for namespaces has been added.
- Support for Late Static Bindings has been added.
- Support for jump labels (limited goto) has been added.
- Support for native Closures (Lambda/Anonymous functions) has been added.
- There are two new magic methods, __callStatic and __invoke.
- Nowdoc syntax is now supported, similar to Heredoc syntax, but with single quotes.
- It is now possible to use Heredocs to initialize static variables and class members/constants.
- Heredocs may now be declared using double quotes, complementing the Nowdoc syntax.
- Constants can now be declared outside a class using the const keyword.
- The ternary operator now has a shorthand form: ?:.
- The HTTP stream wrapper now considers all status codes from 200 to 399 to be successful.
- Dynamic access to static methods is now possible.
- Exceptions can now be nested.
- A garbage collector has been added, and is enabled by default.
List of actual functions and such to make this a decent length post:
- array_replace() – Replaces elements from passed arrays into one array.
- array_replace_recursive() – Recursively replaces elements from passed arrays into one array.
- class_alias() – Creates an alias for a user defined class.
- forward_static_call() – Call a user function from a method context.
- forward_static_call_array() – Call a user function from a method context, with the arguments contained in an array.
- gc_collect_cycles() – Forces collection of any existing garbage cycles.
- gc_disable() – Deactivates the circular reference collector.
- gc_enable() – Activates the circular reference collector.
- gc_enabled() – Returns the status of the circular reference collector.
- get_called_class() – Return the name of the class a static method is called in.
- gethostname() – Return the current host name for the local machine.
- header_remove() – Removes an HTTP header previously set using the header() function.
- lcfirst() – Make a string’s first character lowercase.
- parse_ini_string() – Parse a configuration string.
- quoted_printable_encode() – Convert an 8 bit string to a quoted-printable string.
- str_getcsv() – Parse a CSV string into an array.
- stream_context_set_default() – Set the default stream context.
- stream_supports_lock() – Return TRUE if the stream supports locking.
- stream_context_get_params() – Retrieve parameters from a stream context.
- streamWrapper::stream_cast() – Retrieve the underlying stream resource.
- streamWrapper::stream_set_option() – Change stream options
- date_add() – Adds an amount of days, months, years, hours, minutes and seconds to a DateTime object.
- date_create_from_format() – Returns a new DateTime object formatted according to the given format.
- date_diff() – Returns the difference between two DateTime objects.
- date_get_last_errors() – Returns the warnings and errors from the last date/time operation.
- date_parse_from_format() – Get infoformation about a given date.
- date_sub() – Subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object.
- timezone_version_get() – Returns the version of the timezonedb.
- gmp_testbit() – Tests whether a bit is set.
- hash_copy() – Copy hashing context.
- imap_gc() – Clears IMAP cache.
- imap_utf8_to_mutf7() – Encode a UTF-8 string to modified UTF-7.
- imap_mutf7_to_utf8() – Decode a modified UTF-7 string to UTF-8.
- json_last_error() – Returns the last JSON error that occurred.
- mysqli_fetch_all() – Fetches all result rows as an associative array, a numeric array, or both.
- mysqli_get_connection_stats() – Returns statistics about the client connection.
- mysqli_poll() – Poll connections.
- mysqli_reap_async_query() – Get result from async query.
- openssl_random_pseudo_bytes() – Returns a string of the given length specified, filled with pseudo-random bytes.
- pcntl_signal_dispatch() – Calls signal handlers for pending signals.
- pcntl_sigprocmask() – Sets and retrieves blocked signals.
- pcntl_sigtimedwait() – Wait for signals with a timeout.
- pcntl_sigwaitinfo() – Wait for signals.
- preg_filter() – Perform a regular expression search and replace, reutrning only results which matched the pattern.
- msg_queue_exists() – Check whether a message queue exists.
- shm_has_var() – Checks whether a specific key exists inside a shared memory segment.
The following functions are now natively implemented, making them available on all operating systems which can run PHP: