<?php
class SerialDateTime extends DateTime implements JsonSerializable{
public function jsonSerialize(){
return $this->getTimestamp();
}
}
class StringDateTime extends DateTime{
public function __toString(){
return $this->getTimestamp();
}
}
$j = new SerialDateTime;
$s = new StringDateTime;
//echo $j."\n";
echo $s."\n";
echo json_encode(array($j, $s));
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.007146","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.3.5
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.008831","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.3.4
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.007171","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.3.3
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.007085","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.3.2
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003657","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.3.1
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.004167","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.3.0
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003822","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.2.18
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.009903","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.2.17
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.007026","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.2.16
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.006413","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.2.15
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003900","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.2.14
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.009097","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.2.13
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003756","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.2.12
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003889","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.2.11
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.004683","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.2.10
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.005457","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.2.9
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003767","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.2.8
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003836","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.2.7
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.004019","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.2.6
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.004345","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.2.5
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003929","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.17, 8.2.4
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003714","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.2.3
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003937","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.2.2
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003920","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.2.1
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.004060","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.2.0
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.004122","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.28
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.010137","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.27
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003810","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.26
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003474","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.25
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003806","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.24
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.004228","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.23
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.005583","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.22
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003661","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.21
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003747","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.20
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003909","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.19
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003902","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.18
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003760","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.16
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003456","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.15
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003681","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.14
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003651","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.13
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003700","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.12
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003774","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.11
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003647","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.10
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003528","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.9
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003751","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.8
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003502","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.7
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003693","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.6
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003660","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.5
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003628","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.4
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003672","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.3
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003501","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.2
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003736","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.1
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003638","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Output for 8.1.0
Deprecated: Return type of SerialDateTime::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/pSfRr on line 5
1378912489
[1378912489,{"date":"2013-09-11 17:14:49.003708","timezone_type":3,"timezone":"Europe\/Amsterdam"}]
Fatal error: Uncaught Error: Method StringDateTime::__toString() must return a string value in /in/pSfRr:21
Stack trace:
#0 {main}
thrown in /in/pSfRr on line 21
Process exited with code 255.