3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Row extends \ArrayObject { } class Piwik_DataTable_Row extends Row { public function unserialize($serialized) { $serialized = str_replace('O:19:"Piwik_DataTable_Row"', 'C:19:"Piwik_DataTable_Row"', $serialized); $unserialized = unserialize($serialize); $this->exchangeArray($unserialized); } } $x = unserialize('O:19:"Piwik_DataTable_Row":1:{s:1:"c";a:3:{i:0;a:11:{s:5:"label";s:9:"piwik.org";i:2;i:10509;i:3;i:31854;i:4;d:263;i:5;i:1736331;i:6;i:6887;i:10;a:2:{i:0;a:8:{i:1;i:120;i:3;i:60;i:2;d:48633.300000000003;i:4;d:81000;i:5;d:15930;i:6;d:3603.2999999999993;i:7;d:20580;i:8;i:390;}i:3;a:3:{i:1;i:48;i:3;i:48;i:2;d:0;}}i:8;i:168;i:9;d:48633.300000000003;i:11;i:10509;i:7;i:0;}i:1;a:0:{}i:3;i:1581;}}'); var_dump($x);
based on Xe82b
Output for 5.4.29, 5.6.8 - 7.2.6
Warning: Erroneous data format for unserializing 'Piwik_DataTable_Row' in /in/YgpDR on line 16 Notice: unserialize(): Error at offset 30 of 392 bytes in /in/YgpDR on line 16 bool(false)
Output for 5.3.0 - 5.4.28, 5.4.30 - 5.5.35
object(Piwik_DataTable_Row)#1 (1) { ["storage":"ArrayObject":private]=> array(1) { ["c"]=> array(3) { [0]=> array(11) { ["label"]=> string(9) "piwik.org" [2]=> int(10509) [3]=> int(31854) [4]=> float(263) [5]=> int(1736331) [6]=> int(6887) [10]=> array(2) { [0]=> array(8) { [1]=> int(120) [3]=> int(60) [2]=> float(48633.3) [4]=> float(81000) [5]=> float(15930) [6]=> float(3603.3) [7]=> float(20580) [8]=> int(390) } [3]=> array(3) { [1]=> int(48) [3]=> int(48) [2]=> float(0) } } [8]=> int(168) [9]=> float(48633.3) [11]=> int(10509) [7]=> int(0) } [1]=> array(0) { } [3]=> int(1581) } } }
Output for 5.0.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/YgpDR on line 2 object(Piwik_DataTable_Row)#1 (1) { ["c"]=> array(3) { [0]=> array(11) { ["label"]=> string(9) "piwik.org" [2]=> int(10509) [3]=> int(31854) [4]=> float(263) [5]=> int(1736331) [6]=> int(6887) [10]=> array(2) { [0]=> array(8) { [1]=> int(120) [3]=> int(60) [2]=> float(48633.3) [4]=> float(81000) [5]=> float(15930) [6]=> float(3603.3) [7]=> float(20580) [8]=> int(390) } [3]=> array(3) { [1]=> int(48) [3]=> int(48) [2]=> float(0) } } [8]=> int(168) [9]=> float(48633.3) [11]=> int(10509) [7]=> int(0) } [1]=> array(0) { } [3]=> int(1581) } }
Output for 4.4.2 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/YgpDR on line 2 Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/YgpDR on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/YgpDR on line 2 Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/YgpDR on line 8
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/YgpDR on line 2 Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/YgpDR on line 8
Process exited with code 255.