Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. $array = array(5,7,9,3,6,5,4);
  2. $arrayObj = new ArrayObject($array);
  3. var_dump($arrayObj);
  4. $arrayObj2 = new ArrayObject($arrayObj->getArrayCopy(), ArrayObject::STD_PROP_LIST);
  5. var_dump($arrayObj2);
  6.  
  7. object(ArrayObject)#1 (7) { [0]=> int(5) [1]=> int(7) [2]=> int(9) [3]=> int(3) [4]=> int(6) [5]=> int(5) [6]=> int(4) }
  8. object(ArrayObject)#2 (0) { }
  9.  
  10. object(ArrayObject)#1 (1) { ["storage":"ArrayObject":private]=> array(7) { [0]=> int(5) [1]=> int(7) [2]=> int(9) [3]=> int(3) [4]=> int(6) [5]=> int(5) [6]=> int(4) } }
  11. object(ArrayObject)#2 (1) { ["storage":"ArrayObject":private]=> array(7) { [0]=> int(5) [1]=> int(7) [2]=> int(9) [3]=> int(3) [4]=> int(6) [5]=> int(5) [6]=> int(4) } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement