3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo '<pre>'; var_dump(json_encode(json_decode('{"objects":{"object":[ { "type" : "route", "link" : { "type" : "locator", "href" : "http://rest.db.ripe.net/ripe/route/213.239.160.0/20AS15703" }, "source" : { "id" : "ripe" }, "primary-key" : { "attribute" : [ { "name" : "route", "value" : "213.239.160.0/20" }, { "name" : "origin", "value" : "AS15703" } ] }, "attributes" : { "attribute" : [ { "name" : "route", "value" : "213.239.160.0/20" }, { "name" : "descr", "value" : "TrueServer BV" }, { "link" : { "type" : "locator", "href" : "http://rest.db.ripe.net/ripe/aut-num/AS15703" }, "name" : "origin", "value" : "AS15703", "referenced-type" : "aut-num" }, { "link" : { "type" : "locator", "href" : "http://rest.db.ripe.net/ripe/mntner/TRUESERVER-MNT" }, "name" : "mnt-by", "value" : "TRUESERVER-MNT", "referenced-type" : "mntner" }, { "name" : "created", "value" : "2002-04-10T11:20:37Z" }, { "name" : "last-modified", "value" : "2002-04-10T11:20:37Z" }, { "name" : "source", "value" : "RIPE", "comment" : "Filtered" } ] } } ] }, "terms-and-conditions" : { "type" : "locator", "href" : "http://www.ripe.net/db/support/db-terms-conditions.pdf" } }'))); echo '</pre>';
based on pIMrf
Output for 5.2.0 - 7.2.0
<pre>string(971) "{"objects":{"object":[{"type":"route","link":{"type":"locator","href":"http:\/\/rest.db.ripe.net\/ripe\/route\/213.239.160.0\/20AS15703"},"source":{"id":"ripe"},"primary-key":{"attribute":[{"name":"route","value":"213.239.160.0\/20"},{"name":"origin","value":"AS15703"}]},"attributes":{"attribute":[{"name":"route","value":"213.239.160.0\/20"},{"name":"descr","value":"TrueServer BV"},{"link":{"type":"locator","href":"http:\/\/rest.db.ripe.net\/ripe\/aut-num\/AS15703"},"name":"origin","value":"AS15703","referenced-type":"aut-num"},{"link":{"type":"locator","href":"http:\/\/rest.db.ripe.net\/ripe\/mntner\/TRUESERVER-MNT"},"name":"mnt-by","value":"TRUESERVER-MNT","referenced-type":"mntner"},{"name":"created","value":"2002-04-10T11:20:37Z"},{"name":"last-modified","value":"2002-04-10T11:20:37Z"},{"name":"source","value":"RIPE","comment":"Filtered"}]}}]},"terms-and-conditions":{"type":"locator","href":"http:\/\/www.ripe.net\/db\/support\/db-terms-conditions.pdf"}}" </pre>
Output for 5.0.0 - 5.1.6
<pre> Fatal error: Call to undefined function json_encode() in /in/YVnmr on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
<pre> Fatal error: Call to undefined function: json_encode() in /in/YVnmr on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
<pre> Fatal error: Call to undefined function: json_encode() in /in/YVnmr on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<pre> Fatal error: Call to undefined function: json_encode() in /in/YVnmr on line 3