<?php
class MyList1 extends SplDoublyLinkedList {
}
$a = new MyList1();
var_dump($b=serialize($a));
var_dump(unserialize($b));
- Output for 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- string(46) "O:7:"MyList1":3:{i:0;i:0;i:1;a:0:{}i:2;a:0:{}}"
object(MyList1)#2 (2) {
["flags":"SplDoublyLinkedList":private]=>
int(0)
["dllist":"SplDoublyLinkedList":private]=>
array(0) {
}
}
- Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0 - 7.2.33, 7.3.12 - 7.3.33
- string(22) "C:7:"MyList1":4:{i:0;}"
object(MyList1)#2 (2) {
["flags":"SplDoublyLinkedList":private]=>
int(0)
["dllist":"SplDoublyLinkedList":private]=>
array(0) {
}
}
- Output for 5.3.0 - 5.3.29
- string(18) "O:7:"MyList1":0:{}"
object(MyList1)#2 (2) {
["flags":"SplDoublyLinkedList":private]=>
int(0)
["dllist":"SplDoublyLinkedList":private]=>
array(0) {
}
}
- Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
- Fatal error: Class 'SplDoublyLinkedList' not found in /in/LZLUB on line 3
Process exited with code 255. - Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
- Fatal error: Class mylist1: Cannot inherit from undefined class spldoublylinkedlist in /in/LZLUB on line 3
Process exited with code 255. - Output for 4.3.0 - 4.3.1
- Fatal error: Class mylist1: Cannot inherit from undefined class spldoublylinkedlist in /in/LZLUB on line 3
preferences:
234.02 ms | 401 KiB | 314 Q