30
5
Im wondering if its good practice to pass-by-reference when you are only reading a variable, or if it should always be passed as a value. Example with pass-by-reference: $a = 'fish and chips'; $b = do_my_hash($a); echo $b; function &do_my_...
2010-01-29
0
3
I have a hook system setup... which is working on localhost... I put it live and get an error saying "Warning: Call-time pass-by-reference has been deprecated". Now, apparently the work around is to remove all "&" from your function calls, i...
0
3
With PHP5 using "copy on write" and passing by reference causing more of a performance penalty than a gain, why should I use pass-by-reference? Other than call-back functions that would return more than one value or classes who's attributes you ...
2009-05-20
-3
1
what is the best substitute for settype() in php 5.3.5 due to this error/warnings Deprecated: Call-time pass-by-reference has been deprecated in C:\xampp\htdocs\MyWebInterface\includes\payroll_cutoff.inc.php on line 217 ...
2011-06-08
3
2
Given the following interface: interface ISoapInterface { public static function registerSoapTypes( &$wsdl ); public static function registerSoapOperations( &$server ); } And the following code: $soapProvider = array( "FilePool", ...
2010-10-19
1
1
I'm sure this question has been asked a thousand times, but i had trouble finding an answer i could understand or use anywhere. In my project, i need to use my sql class and other misc classes, in alot of the classes. Then i'm qurious to know wh...
3
1
Seemingly something of a misnomer, as pass by reference is deprecated in PHP 5.3... anyway, what I'm trying to do is write a unit test framework using reflection, that allows you to pass arguments to a method which requires a reference. e.g. cla...
2
3
I am really confused with this one. Here's my code class inner { var $val = 0; } class outer { var $obj=null; function outer() { $this->obj = new inner; } function get_obj() { return $this-&g...
2
2
So I want to extend for example this RecursiveIterator from the SPL with the function each so i can easily walk over the object/array class it extends RecursiveArrayIterator { public function each( $function, $args=array() ){ $args =...
2010-09-29
220
7
When an array is passed as an argument to a method or function is it passed by reference? What about doing this: $a = array(1,2,3); $b = $a; Is $b a reference to $a? ...