SitePoint Sponsor |
|
User Tag List
Results 1 to 25 of 73
Threaded View
-
Nov 28, 2005, 05:04 #1
- Join Date
- Mar 2004
- Location
- Russia, Penza
- Posts
- 265
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Upgrading scripts to conform to PHP 4.4 ref. implementation
Folks, is there any PHP 4.4 upgrading paper? There's very nice PHP 5.1 upgrading manual but i couldn't find anything on PHP 4.4 while its new reference implementation breaks tons of existing scripts.
Basically, all return/pass by reference calls should be changed. e.g the following code:
PHP Code:function &Foo($id) {
if(isset($arr[$id]))
return $arr[$id];
}
PHP Code:function &Foo($id) {
if(isset($arr[$id]))
return $arr[$id];
$zref = null;
return $zref;
}
PHP Code:function &Foo($id) {
if(isset($arr[$id]))
return $arr[$id];
return $zref = null;
}
PHP Code:function foo(&$arr) {
$arr[] = 3;
}
foo($arr = array(1, 2));
PHP Code:class Foo {
var $ref = 1;
function & foo() {
return $this->ref;
}
}
class Bar extends Foo {
function & foo() {
return parent :: foo();
}
}
Any other issues like those i mentioned?
Bookmarks