3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class MyList1 extends SplDoublyLinkedList { } $a = new MyList1(); var_dump($b=serialize($a)); var_dump(unserialize($b));
Output for 5.4.0 - 5.6.28, 7.0.0 - 7.1.0
string(22) "C:7:"MyList1":4:{i:0;}" object(MyList1)#2 (2) { ["flags":"SplDoublyLinkedList":private]=> int(0) ["dllist":"SplDoublyLinkedList":private]=> array(0) { } }
Output for hhvm-3.10.0 - 3.12.0
string(43) "C:7:"MyList1":24:{a:2:{i:0;a:0:{}i:1;i:0;}}" object(MyList1)#2 (6) { ["head":protected]=> NULL ["tail":protected]=> NULL ["key":protected]=> int(0) ["current":protected]=> NULL ["count":protected]=> int(0) ["mode":protected]=> int(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.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.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