PHP 5.1 Beta 2

Ok, so maybe I've been living under a rock for too long, but PHP 5.1 is almost here :D and with it a lot of new stuff :D, including several changes to MySQLi, SPL, etc. It's very nice to see SPL groing up and it's certanly time to wake up and start using it , and I promissed myself I would , Interfaces are our friends :D

Here are the Added things, from Beta 1 and Beta 2:

Beta 2

  • Improved PHP extension loading mechanism with support for module dependencies and conflicts. (Jani, Dmitry)
  • Allowed return by reference from internal functions. (Marcus, Andi, Dmitry)
  • Rewrote strtotime() with support for timezones and many new formats. Implements feature requests #21399, #26694, #28088, #29150, #29585 and #29595. (Derick)
  • Added bindto socket context option. (Ilia)
  • Added offset parameter to the stream_copy_to_stream() function. (Ilia)
  • Added offset & length parameters to substr_count() function. (Ilia)

Beta 1

  • Upgraded PCRE library to version 5.0. (Andrei)
  • Removed php_check_syntax() function which never worked properly. (Ilia)
  • Removed garbage manager in Zend Engine which results in more aggressive freeing of data. (Dmitry, Andi)
  • Moved extensions to PECL:
    • ext/cpdf (Tony, Derick)
    • ext/dio (Jani, Derick)
    • ext/fam (Jani, Derick)
    • ext/ingres_ii (Jani, Derick)
    • ext/mnogosearch (Jani, Derick)
    • ext/w32api (Jani, Derick)
    • ext/yp (Jani, Derick)
  • Changed sha1_file() and md5_file() functions to use streams instead of low level IO. (Uwe)
  • Changed abstract private methods to be not allowed anymore. (Stas)
  • Changed stream_filter_(ap|pre)pend() to return resource. (Sara)
  • Changed mysqli_exception and sqlite_exception to use RuntimeException as base if SPL extension is present. (Georg, Marcus)
  • Improved interactive mode of PHP CLI (php -a). (Johannes, Marcus)
  • Improved performance of:
    • general execution/compilation. (Andi, Thies, Sterling, Dmitry, Marcus)
    • switch() statement. (Dmitry)
    • several array functions. (Marcus)
    • virtual path handling by adding a realpath() cache. (Andi)
    • variable fetches. (Andi)
    • magic method invocations. (Marcus)
  • Improved support for embedded server in mysqli. (Georg)
  • Improved mysqli extension. (Georg)
    • added constructor for mysqli_stmt and mysqli_result classes
    • added new function mysqli_get_charset()
    • added new function mysqli_set_charset()
    • added new class mysqli_driver
    • added new class mysqli_warning
    • added new class mysqli_execption
    • added new class mysqli_sql_exception
  • Improved SPL extension. (Marcus)
    • added standard hierarchy of Exception classes
    • added interface Countable
    • added interfaces Subject and Observer
    • added spl_autoload*() functions
    • converted several 5.0 examples into c code
    • added class FileObject
    • added possibility to use a string with class_parents() and class_implements(). (Andrey)
  • Added man pages for "phpize" and "php-config" scripts. (Jakub Vrana)
  • Added support for .cc files in extensions. (Brian)
  • Added PHP_INT_MAX and PHP_INT_SIZE as predefined constants. (Andrey)
  • Added user opcode API that allow overloading of opcode handlers. (Dmitry)
  • Added an optional remove old session parameter to session_regenerate_id(). (Ilia)
  • Added array type hinting. (Dmitry)
  • Added the tidy_get_opt_doc() function to return documentation for configuration options in tidy. (Patch by: [email protected])
  • Added support for .cc files in extensions. (Brian)
  • Added imageconvolution() function which can be used to apply a custom 3x3 matrix convolution to an image. (Pierre)
  • Added optional first parameter to XsltProcessor::registerPHPFunctions to only allow certain functions to be called from XSLT. (Christian)
  • Added the ability to override the autotools executables used by the buildconf script via the PHP_AUTOCONF and PHP_AUTOHEADER environmental variables. (Jon)
  • Added several new functions to support the PostgreSQL v3 protocol introduced in PostgreSQL 7.4. (Christopher)
    • pg_transaction_status() - in-transaction status of a database connection.
    • pg_query_params() - execution of parameterized queries.
    • pg_prepare() - prepare named queries.
    • pg_execute() - execution of named prepared queries.
    • pg_send_query_params() - async equivalent of pg_query_params().
    • pg_send_prepare() - async equivalent of pg_prepare().
    • pg_send_execute() - async equivalent of pg_execute().
    • pg_result_error_field() - highly detailed error information, most importantly the SQLSTATE error code.
    • pg_set_error_verbosity() - set verbosity of errors.
  • Added optional fifth parameter "count" to preg_replace_callback() and preg_replace() to count the number of replacements made. FR #32275. (Andrey)
  • Added optional third parameter "charlist" to str_word_count() which contains characters to be considered as word part. FR #31560. (Andrey, Ilia)
  • Added interface Serializeable. (Stanislav, Marcus)
  • Added pg_field_type_oid() PostgreSQL function. (mauroi at digbang dot com)
  • Added zend_declare_property_...() and zend_update_property_...()
  • API functions for bool, double and binary safe strings. (Hartmut)
  • Added possibility to access INI variables from within .ini file. (Andrei)
  • Added variable $_SERVER['REQUEST_TIME'] containing request start time. (Ilia)
  • Added optional float parameter to gettimeofday(). (Ilia)
  • Added apache_reset_timeout() Apache1 function. (Rasmus)
  • Added sqlite_fetch_column_types() 3rd argument for arrays. (Ilia)
  • Added optional offset parameter to stream_get_contents() and file_get_contents(). (Ilia)
  • Added optional maxlen parameter to file_get_contents(). (Ilia)
  • Added SAPI hook to get the current request time. (Rasmus)
  • Added new functions:
    • array_diff_key() (Andrey)
    • array_diff_ukey() (Andrey)
    • array_intersect_key() (Christiano Duarte)
    • array_intersect_ukey() (Christiano Duarte)
    • array_product() (Andrey)
    • DomDocumentFragment::appendXML() (Christian)
    • fputcsv() (David Sklar)
    • htmlspecialchars_decode() (Ilia)
    • inet_pton() (Sara)
    • inet_ntop() (Sara)
    • mysqli::client_info property (Georg)
    • posix_access() (Magnus)
    • posix_mknod() (Magnus)
    • SimpleXMLElement::registerXPathNamespace() (Christian)
    • stream_context_get_default() (Wez)
    • stream_socket_enable_crypto() (Wez)
    • stream_wrapper_unregister() (Sara)
    • stream_wrapper_restore() (Sara)
    • stream_filter_remove() (Sara)
    • time_sleep_until() (Ilia)
  • Added DomDocument::$recover property for parsing not well-formed XML Documents. (Christian)
  • Added Cursor support for MySQL 5.0.x in mysqli (Georg)
  • Added proxy support to ftp wrapper via http. (Sara)
  • Added MDTM support to ftp_url_stat. (Sara)
  • Added zlib stream filter support. (Sara)
  • Added bz2 stream filter support. (Sara)
  • Added HTTP/1.1 and chunked encoding support to http:// wrapper. (Sara)
  • Added max_redirects context option that specifies how many HTTP redirects to follow. (Ilia)
  • Added support of parameter=>value arrays to xsl_xsltprocessor_set_parameter(). (Tony)