- var_export: documentation ( source)
- iterator_to_array: documentation ( source)
<?php
$list1 = new \SplDoublyLinkedList();
$list1->push(1);
$list1->push(2);
$list2 = clone $list1;
$list2->push(3);
$list2->push(4);
var_export(iterator_to_array($list1));
print "\n";
var_export(iterator_to_array($list2));
print "\n";