3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Row extends \ArrayObject { } class Piwik_DataTable_Row extends Row { public function unserialize($serialized) { $serialized = str_replace('O:19:"Piwik_DataTable_Row"', 'O: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);
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Deprecated: Return type of Piwik_DataTable_Row::unserialize($serialized) should either be compatible with ArrayObject::unserialize(string $data): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/Xe82b on line 8 Fatal error: Uncaught UnexpectedValueException: Incomplete or ill-typed serialization data in /in/Xe82b:16 Stack trace: #0 [internal function]: ArrayObject->__unserialize(Array) #1 /in/Xe82b(16): unserialize('O:19:"Piwik_Dat...') #2 {main} thrown in /in/Xe82b on line 16
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Deprecated: Return type of Piwik_DataTable_Row::unserialize($serialized) should either be compatible with ArrayObject::unserialize(string $data): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/Xe82b on line 8 Fatal error: Uncaught UnexpectedValueException: Incomplete or ill-typed serialization data in /in/Xe82b:16 Stack trace: #0 [internal function]: ArrayObject->__unserialize(Array) #1 /in/Xe82b(16): unserialize('O:19:"Piwik_Dat...') #2 {main} thrown in /in/Xe82b on line 16
Process exited with code 255.
Output for 7.4.0 - 7.4.33, 8.0.0 - 8.0.30
Fatal error: Uncaught UnexpectedValueException: Incomplete or ill-typed serialization data in /in/Xe82b:16 Stack trace: #0 [internal function]: ArrayObject->__unserialize(Array) #1 /in/Xe82b(16): unserialize('O:19:"Piwik_Dat...') #2 {main} thrown in /in/Xe82b on line 16
Process exited with code 255.
Output for 7.3.32 - 7.3.33
Warning: Erroneous data format for unserializing 'Piwik_DataTable_Row' in /in/Xe82b on line 16 bool(false)
Output for 5.4.29, 5.5.13, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31
Warning: Erroneous data format for unserializing 'Piwik_DataTable_Row' in /in/Xe82b on line 16 Notice: unserialize(): Error at offset 30 of 392 bytes in /in/Xe82b on line 16 bool(false)
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.28, 5.4.30 - 5.4.45, 5.5.0 - 5.5.12, 5.5.14 - 5.5.38
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.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/Xe82b 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/Xe82b on line 2 Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/Xe82b on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/Xe82b on line 2 Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/Xe82b 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/Xe82b on line 2 Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/Xe82b on line 8
Process exited with code 255.

preferences:
343.24 ms | 401 KiB | 458 Q