3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dt = new DateTime( null ); $serial = serialize( $dt ); var_dump( '1', unserialize( $serial ) ); $test = 'O:8:"DateTime":3:{s:4:"date";s:19:"2014-03-31 14:55:58";s:13:"timezone_type";i:3;s:8:"timezone";s:12:"Europe/Paris";}'; var_dump( '2', unserialize( $test ) ); $test = 'O:8:"DateTime":3:{s:4:"date";s:19:"2014-03-31 14:55:58";s:13:"timezone_type";i:3;s:8:"timezone";s:0:"";}'; var_dump( '3', unserialize( $test ) );
Output for git.master
Deprecated: DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated in /in/KJM2Z on line 3 string(1) "1" object(DateTime)#2 (3) { ["date"]=> string(26) "2014-03-31 16:07:20.003565" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(1) "2" object(DateTime)#2 (3) { ["date"]=> string(26) "2014-03-31 14:55:58.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "Europe/Paris" } Fatal error: Uncaught Error: Invalid serialization data for DateTime object in /in/KJM2Z:13 Stack trace: #0 [internal function]: DateTime->__unserialize(Array) #1 /in/KJM2Z(13): unserialize('O:8:"DateTime":...') #2 {main} thrown in /in/KJM2Z on line 13
Process exited with code 255.
Output for git.master_jit
Deprecated: DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated in /in/KJM2Z on line 3 string(1) "1" object(DateTime)#2 (3) { ["date"]=> string(26) "2014-03-31 16:07:20.004103" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(1) "2" object(DateTime)#2 (3) { ["date"]=> string(26) "2014-03-31 14:55:58.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "Europe/Paris" } Fatal error: Uncaught Error: Invalid serialization data for DateTime object in /in/KJM2Z:13 Stack trace: #0 [internal function]: DateTime->__unserialize(Array) #1 /in/KJM2Z(13): unserialize('O:8:"DateTime":...') #2 {main} thrown in /in/KJM2Z on line 13
Process exited with code 255.
Output for rfc.property-hooks
Deprecated: DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated in /in/KJM2Z on line 3 string(1) "1" object(DateTime)#2 (3) { ["date"]=> string(26) "2014-03-31 16:07:20.003575" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(1) "2" object(DateTime)#2 (3) { ["date"]=> string(26) "2014-03-31 14:55:58.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(12) "Europe/Paris" } Fatal error: Uncaught Error: Invalid serialization data for DateTime object in /in/KJM2Z:13 Stack trace: #0 [internal function]: DateTime->__unserialize(Array) #1 /in/KJM2Z(13): unserialize('O:8:"DateTime":...') #2 {main} thrown in /in/KJM2Z on line 13
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
44.79 ms | 402 KiB | 8 Q