summaryrefslogtreecommitdiff
path: root/README.PHP4-TO-PHP5-THIN-CHANGES
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2003-12-14 20:00:15 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2003-12-14 20:00:15 +0000
commit61e6cd2a1aff34d55a6b4fbea073dea4c4b779ab (patch)
treea3f06a289c616525a04e9104e88145dcc8b0b9fc /README.PHP4-TO-PHP5-THIN-CHANGES
parent5ce35b8253a5ba08b7b9da9e659b787ff2714b3d (diff)
downloadphp-git-61e6cd2a1aff34d55a6b4fbea073dea4c4b779ab.tar.gz
Reorganization.
Diffstat (limited to 'README.PHP4-TO-PHP5-THIN-CHANGES')
-rw-r--r--README.PHP4-TO-PHP5-THIN-CHANGES35
1 files changed, 26 insertions, 9 deletions
diff --git a/README.PHP4-TO-PHP5-THIN-CHANGES b/README.PHP4-TO-PHP5-THIN-CHANGES
index 64fc15fca0..568ff0561c 100644
--- a/README.PHP4-TO-PHP5-THIN-CHANGES
+++ b/README.PHP4-TO-PHP5-THIN-CHANGES
@@ -1,24 +1,41 @@
-1. strr(i)pos() now uses the full needle when searching - be aware that code that previous have run now can stop working.
+1. strrpos() and strripos() now use the entire string as a needle.
+ Be aware that the existing scripts may no longer work as you expect.
+
EX :
<?php
var_dump(strrpos("ABCDEF","DEF"));
var_dump(strrpos("ABCDEF","DAF"));
?>
- Will give you differents results. The diffence is in the second cal to strrpos(). The same applies and for strripos().
-2. Change illegal use of string offset from E_WARNING to E_ERROR
+ Will give you different results. The former returns 3 while the latter
+ returns false rather than the position of the last occurrence of 'D'.
+ The same applies to strripos().
+
+2. Illegal use of string offsets causes E_ERROR instead of E_WARNING.
+
EX :
- marcus@zaphod /usr/src/php5 $ sapi/cli/php -r '$a = "foo"; unset($a[0][1][2]);'
- Fatal error: Cannot use string offset as an array in Command line code on line 1
+ <?php
+ $a = "foo";
+ unset($a[0][1][2]);
+ ?>
+
+ Fatal error: Cannot use string offset as an array in ... on line 1
-3. array_merge() accepts only arrays. If non-array is passed a E_WARNING for every non-array
- parameter will be throwed. Be careful because your code may start emitting E_WARNING out of the blue.
+3. array_merge() was changed to accept only arrays. If a non-array variable is
+ passed, a E_WARNING will be thrown for every such parameter. Be careful
+ because your code may start emitting E_WARNING out of the blue.
-4. Be careful when porting from ext/mysql to ext/mysqli. mysqli_fetch_row()/mysqli_fetch_array()/mysql_fetch_assoc()
- return NULL when there is no more data in the result set (ext/mysql's functions return FALSE).
+4. Be careful when porting from ext/mysql to ext/mysqli. The following
+ functions return NULL when no more data is available in the result set
+ (ext/mysql's functions return FALSE).
+
+ - mysqli_fetch_row()
+ - mysqli_fetch_array()
+ - mysqli_fetch_assoc()
5. PATH_TRANSLATED server variable is no longer set implicitly under
Apache2 SAPI in contrast to the situation in PHP4, where it is set to the
same value as the SCRIPT_FILENAME server variable when it is not populated
by Apache. This change was made to comply with the CGI specification.
Please refer to bug #23610 for further information.
+