These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * JsonSerializable interface |
||
4 | * |
||
5 | * PHP 5.3 compatibility for PHP 5.4's \JsonSerializable |
||
6 | * |
||
7 | * @author Sam-Mauris Yong / [email protected] |
||
8 | * @copyright Copyright (c) 2010-2012, Sam-Mauris Yong |
||
9 | * @license http://www.opensource.org/licenses/bsd-license New BSD License |
||
10 | * @link http://www.php.net/manual/en/class.jsonserializable.php |
||
11 | */ |
||
12 | |||
13 | if(PHP_VERSION_ID < 50400) |
||
14 | { |
||
15 | /** |
||
16 | * JsonSerializable interface |
||
17 | * |
||
18 | * PHP 5.3 compatibility for PHP 5.4's \JsonSerializable |
||
19 | * |
||
20 | * @author Sam-Mauris Yong / [email protected] |
||
21 | * @copyright Copyright (c) 2010-2012, Sam-Mauris Yong |
||
22 | * @license http://www.opensource.org/licenses/bsd-license New BSD License |
||
23 | * @link http://www.php.net/manual/en/class.jsonserializable.php |
||
24 | */ |
||
25 | interface JsonSerializable { |
||
26 | /** The jsonSerizlize function as defined by PHP 5.4 and greater */ |
||
27 | public function jsonSerialize(); |
||
28 | } |
||
29 | } |
||
30 | ?> |
||
0 ignored issues
–
show
|
|||
31 |
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.
A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.