Sunday, September 23, 2007

difference between php and php5

1.What is changed between PHP 4 and PHP is the XML support?.

Two extensions have changed.
The XSLT extension present in PHP4 is not the XSL extension in PHP 5.
Additionally, the XML-DOM extension in PHP 4 is not the DOM extension
is PHP 5. What this means is that the syntax of the functions in these
extensions have changed but the purpose of the extensions has not
changed.

In PHP 4, objects were really just primitive data types, and were referenced by value. In an attempt to retain as much backward compatibility as possible, setting the zend.ze1_compatibility_mode in PHP 5 allows compatibility with the version 4 methods. There are a number of other backward incompatible changes. These include:

2.CLI and CGI:
In PHP 5 there were some changes in CLI and CGI filenames. In PHP 5, the CGI version was renamed to php-cgi.exe (previously php.exe) and the CLI version now sits in the main directory (previously cli/php.exe).
In PHP 5 it was also introduced a new mode: php-win.exe. This is equal to the CLI version, except that php-win doesn't output anything and thus provides no console (no "dos box" appears on the screen). This behavior is similar to php-gtk.
3.New Functions:
In PHP 5 there are some new functions. Here is the list of them:
Arrays:
• array_combine() - Creates an array by using one array for keys and another for its values
• array_diff_uassoc() - Computes the difference of arrays with additional index check which is performed by a user supplied callback function
• array_udiff() - Computes the difference of arrays by using a callback function for data comparison
• array_udiff_assoc() - Computes the difference of arrays with additional index check. The data is compared by using a callback function
• array_udiff_uassoc() - Computes the difference of arrays with additional index check. The data is compared by using a callback function. The index check is done by a callback function also
• array_walk_recursive() - Apply a user function recursively to every member of an array
• array_uintersect_assoc() - Computes the intersection of arrays with additional index check. The data is compared by using a callback function
• array_uintersect_uassoc() - Computes the intersection of arrays with additional index check. Both the data and the indexes are compared by using a callback functions
• array_uintersect() - Computes the intersection of arrays. The data is compared by using a callback function
InterBase:
• ibase_affected_rows() - Return the number of rows that were affected by the previous query
• ibase_backup() - Initiates a backup task in the service manager and returns immediately
• ibase_commit_ret() - Commit a transaction without closing it
• ibase_db_info() - Request statistics about a database
• ibase_drop_db() - Drops a database
• ibase_errcode() - Return an error code
• ibase_free_event_handler() - Cancels a registered event handler
• ibase_gen_id() - Increments the named generator and returns its new value
• ibase_maintain_db() - Execute a maintenance command on the database server
• ibase_name_result() - Assigns a name to a result set
• ibase_num_params() - Return the number of parameters in a prepared query
• ibase_param_info() - Return information about a parameter in a prepared query
• ibase_restore() - Initiates a restore task in the service manager and returns

1 comment:

ItsDone said...

thanks for the post !!