3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = <<<END { "Pet": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64" } } }, "Dog": { "type": "object", "allOf": [ { "$ref": "#/definitions/Pet" }, { "required": [ "name" ], "properties": { "name": { "type": "string" } } } ], "x-vendor-ext": "some data" } } END; echo str_replace("\t", " ", $str);
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: ref in /in/gsTCJ on line 21 { "Pet": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64" } } }, "Dog": { "type": "object", "allOf": [ { "": "#/definitions/Pet" }, { "required": [ "name" ], "properties": { "name": { "type": "string" } } } ], "x-vendor-ext": "some data" } }
Output for 5.3.21 - 5.6.28
Notice: Undefined variable: ref in /in/gsTCJ on line 36 { "Pet": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64" } } }, "Dog": { "type": "object", "allOf": [ { "": "#/definitions/Pet" }, { "required": [ "name" ], "properties": { "name": { "type": "string" } } } ], "x-vendor-ext": "some data" } }