Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

advertising

related pastes to tag 'arrayobject'

1091668 - rewbs: php arrayobject exchangearray
  1. Index: spl_array.c
  2. ===================================================================
  3. RCS file: /repository/php-src/ext/spl/spl_array.c,v
  4. retrieving revision 1.71.2.17.2.13.2.19
  5. diff -u -w -p -r1.71.2.17.2.13.2.19 spl_array.c
  6. --- spl_array.c 26 Jul 2008 12:34:10 -0000       1.71.2.17.2.13.2.19
  7. +++ spl_array.c 3 Aug 2008 09:59:32 -0000
  8. @@ -924,50 +924,16 @@ zend_object_iterator *spl_array_get_iter
  9.  
1091667 - rewbs: php arrayobject exchangearray
  1. Index: spl_array.c
  2. ===================================================================
  3. RCS file: /repository/php-src/ext/spl/spl_array.c,v
  4. retrieving revision 1.71.2.17.2.13.2.19
  5. diff -u -w -p -r1.71.2.17.2.13.2.19 spl_array.c
  6. --- spl_array.c 26 Jul 2008 12:34:10 -0000       1.71.2.17.2.13.2.19
  7. +++ spl_array.c 3 Aug 2008 09:59:32 -0000
  8. @@ -924,50 +924,16 @@ zend_object_iterator *spl_array_get_iter
  9.  
1091266 - rewbs: php arrayobject exchangearray
  1. <?php
  2. $ao = new ArrayObject();
  3. $swapIn = array();
  4. $cowRef = $swapIn; // create a copy-on-write ref to $swapIn
  5. $ao->exchangeArray($swapIn);
  6.  
  7. $ao['a'] = 'This affects $swapIn and $cowRef';
  8. $swapIn['b'] = 'This forces $swapIn to split from its copy-on-write references';
  9.  
1091260 - rewbs: php arrayobject exchangearray
  1. <?php
  2. $ao = new ArrayObject();
  3. $swapIn = array();
  4. $ao->exchangeArray($swapIn);
  5.  
  6. $ao['a'] = 'This affects $swapIn';
  7. $swapIn['b'] = 'This forces $swapIn to split from its copy-on-write references';
  8. $ao['c'] = 'This no longer affects $swapIn';
  9.  
1091256 - rewbs: php arrayobject exchangearray
  1. <?php
  2. echo "--> exchangeArray(array):\n";
  3. $ao = new ArrayObject();
  4. $ao->exchangeArray(array('original'));
  5. var_dump($ao);
  6.  
  7. echo "\n--> exchangeArray(object):\n";
  8. $obj = new stdClass;
  9.  
1091254 - rewbs: php arrayobject exchangearray
  1. <?php
  2. echo "--> exchangeArray(array):\n";
  3. $ao = new ArrayObject();
  4. $ao->exchangeArray(array('original'));
  5. var_dump($ao);
  6.  
  7. echo "\n--> exchangeArray(object):\n";
  8. $obj = new stdClass;
  9.  
worth-right
worth-right
fantasy-obligation