daily pastebin goal
6%
SHARE
TWEET

Untitled

a guest Jun 25th, 2018 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function set(&$x, &$y)
  2. {
  3.     $x =& $y[2];
  4. }
  5.  
  6. $y = array(
  7.     0,
  8.     1,
  9.     array('something')
  10. );
  11.  
  12. $x = array('old_val');
  13. print "1. inited, x is:n";
  14. print_r($x);
  15.  
  16. set($x, $y);
  17.  
  18. print "n2. now, x is: ";
  19. print_r($x);
  20.    
  21. 1. inited, x is:
  22. Array
  23. (
  24.     [0] => old_val
  25. )
  26.  
  27. 2. now, x is: Array
  28. (
  29.     [0] => old_val
  30. )
  31.    
  32. function &set(&$x, &$y) {}
  33.    
  34. $x =& set($x,$y);
  35.    
  36. $x =& $y[2];
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top