3v4l.org

run code in 200+ PHP versions simultaneously
<?php $datastr = <<<'JSON' {"domain":"App.domain.nl","extraAccountDomains":["domain.nl","domain.be","domain2.nl"],"defaultUserRoles":["guest","webgebruiker"],"baseUri":"https:\/\/App.domain.nl","timezone":"Europe\/Amsterdam","locale":{"force":false,"fallback":"nl_NL","detect":"auto"},"intervalFormat":"%R %Y-%M-%D %H:%I:%S","timestampFormat":"EE d MMM yyyy H:mm:ss","datetimeFormat":"EE d MMM yyyy H:mm:ss","dateFormat":"dd-MM-yyyy","timeFormat":"H:mm:ss","firstDayOfWeek":"1","humanTimestampFormat":"EE d MMM yyyy H:mm:ss","humanDateTimeFormat":"EE d MMM yyyy H:mm","humanTimeFormat":"H:mm:ss","humanDateFormat":"EE d MMM yyyy","db":{"timestampFormat":"yyyy-MM-dd HH:mm:ss","datetimeFormat":"yyyy-MM-dd HH:mm:ss","dateFormat":"yyyy-MM-dd","timeFormat":"HH:mm:ss"},"userStorageClass":"Framewrk\\Table\\User","errorAction":"Framewrk\\Controller\\Error::index","pageNotExist":"Framewrk\\Controller\\Error::pageNotExist","panicAction":"Framewrk\\Controller\\Error::panic","request":{"className":"Framewrk\\Http\\PhpEnvironment\\Request"},"response":{"className":"Framewrk\\Http\\Response","messagesBackend":"Framewrk\\Response\\Messages\\SessionBackend","postProcessors":{"static":"Framewrk\\Response\\PostProcessor\\Statics","Handlebars":null}},"translator":{"enabled":true,"cacheDir":"D:\\henk\\Workspace\\Appb\\applications\/App\/data\/translator-cache"},"routes":{"default":{"route":"\/:module\/:controller\/:action\/*","priority":1000,"defaults":{"action":"index","controller":"index","module":"App"}},"staticFile":{"route":"\/:sourceStoreAlias\/*","priority":1001,"defaults":{"module":"Framewrk","controller":"StaticFile","action":"index"},"controllerConstructArgs":{"targetStoreAlias":null,"processors":{"less":{"class":"Framewrk\\Statics\\Processor\\Less","enabled":true},"js":null,"html":null,"css":null}},"trailingSlash":false,"urlEncodeType":"urlencode"},"autocomplete":{"route":"\/autocomplete\/suggest\/:moduleName\/:tableName\/:columnName\/:value\/:limit\/:extraData\/*","priority":998,"defaults":{"module":"Framewrk","controller":"AutoComplete","action":"suggest","value":"","limit":"","extraData":""}},"autocomplete-id":{"route":"\/autocomplete\/primary-key\/:moduleName\/:tableName\/:columnName\/:value","priority":998,"defaults":{"module":"Framewrk","controller":"AutoComplete","action":"primaryKey"}},"autocomplete-string-id":{"route":"\/autocomplete\/string-id\/:moduleName\/:tableName\/:value","priority":998,"defaults":{"module":"Framewrk","controller":"AutoComplete","action":"stringId","value":""}},"oauth2":{"route":"\/auth\/oauth2\/:providerName","priority":100,"defaults":{"module":"Framewrk","controller":"Auth","action":"loginOauth2"}},"login":{"route":"\/login\/*","priority":1,"defaults":{"action":"login","controller":"Auth","module":"App"}},"slogin":{"route":"\/slogin\/*","priority":1,"defaults":{"action":"loginStandard","controller":"Auth","module":"App"}},"ologin":{"route":"\/ologin\/:providerName\/*","priority":1,"defaults":{"action":"loginOauth2","controller":"Auth","module":"Framewrk"}},"logout":{"route":"\/logout\/*","priority":1,"defaults":{"action":"logout","controller":"Auth","module":"App"}},"admin":{"route":"\/admin","priority":2,"defaults":{"module":"App","controller":"Admin","action":"index"}},"book-it":{"route":"\/book-it\/:controller\/:action\/*","priority":2,"defaults":{"module":"BookIt","controller":"Index","action":"index"}},"user-content":{"route":"\/user-content","priority":2,"defaults":{"module":"App","controller":"UserContent","action":"index"}},"wiki":{"route":"\/iwiki\/*","priority":3,"defaults":{"module":"App","controller":"Wiki","action":"index"}},"wikiAdmin":{"route":"\/iwiki-admin\/:action\/*","priority":2,"defaults":{"module":"App","controller":"Wiki","action":"index"}},"webshop-admin":{"route":"\/webshop-admin","priority":2,"defaults":{"module":"App","controller":"WebshopAdmin","action":"index"}},"presentation":{"route":"\/presentation\/:controller\/:action\/*","priority":2,"defaults":{"module":"Presentation","controller":"Admin","action":"index"}},"dev-tools":{"route":"\/dev-tools\/:action\/*","priority":2,"defaults":{"module":"App","controller":"DevTools","action":"index"}},"flight-ticket-api":{"route":"\/flight-ticket\/api\/:action","priority":99,"defaults":{"module":"FlightTicket","controller":"Api","action":"index"}},"mail":{"route":"\/mail\/:controller\/:action\/*","priority":500,"defaults":{"action":"index","controller":"index","module":"webmail"}}},"viewTmpDir":"D:\\henk\\Workspace\\Appb\\applications\/App\/data\/view-tmp","view":{"processors":{"md":{"class":"Framewrk\\View\\Processor\\Markdown","args":[]},"hbs":{"class":"Framewrk\\View\\Processor\\Handlebars","args":[]}},"tmpDir":"D:\\henk\\Workspace\\Appb\\applications\/App\/data\/view-tmp"}, "databases":{},"cli":{"migrate":{"dir":"migrate"}},"auth":{"login":{"class":"App\\Controller\\Auth","method":"login","reauthorize":false,"basicEnabled":true},"accessDenied":{"class":"App\\Controller\\Auth","method":"accessDenied","reauthorize":false},"redirectToAfterLogin":"\/","session_lifetime":7200,"persistentHexEncryptionKey":"55438a7f9c0c78ed057f04a8f3e4da27ef149f171bb7b7947625e29b659af6c2","persistentLifetime":5184000,"persistentCookieName":"persistent_login","resetPassword":{"expiresAfter":3600,"from":{"address":"App@domain.nl","name":"App"}}},"smartValueLevelSeparator":" @ ","smartValueColumnSeparator":" - ","loggers":{"default":{"retentionInSeconds":1814400,"handlers":[{"class":"RotatingFile","filename":"D:\\henk\\Workspace\\Appb\\applications\/App\/data\/error.log","someval":"D:\\henk\\Workspace\\Appb\\applications\/App\/data\/error.log","level":200,"processors":[{"class":"Web"}]}]}},"datatype":{"bit":{"input":{"type":"text","classes":["input-bit"]},"empty_as_null":true,"nullable":true,"length":1,"asarray":false},"bit-varying":{"input":{"type":"text","classes":["input-bit-varying"]},"empty_as_null":true,"nullable":true,"asarray":false},"blob":{"input":{"type":"file","classes":["input-blob"]},"empty_as_null":true,"nullable":true,"asarray":false},"bool-type":{"input":{"type":"checkbox","classes":["input-bool"]},"empty_as_null":true,"nullable":true,"asarray":false},"character":{"input":{"type":"text","classes":["input-character"]},"empty_as_null":true,"nullable":true,"asarray":false},"character-varying":{"input":{"type":"text","classes":["input-character-varying"]},"empty_as_null":true,"nullable":true,"asarray":false},"cidr":{"input":{"type":"text"},"empty_as_null":true,"nullable":true,"asarray":false},"datatype-custom":{"input":{"type":"text"},"empty_as_null":true,"nullable":true,"asarray":false},"date":{"input":{"type":"text","classes":["input-date"]},"empty_as_null":true,"nullable":true,"format":null,"localize":true,"asarray":false},"date-time":{"input":{"type":"text","classes":["input-date-time"]},"empty_as_null":true,"nullable":true,"timezone":false,"format":null,"localize":true,"asarray":false},"earth":{"input":{"type":"text","classes":["input-earth"]},"empty_as_null":true,"nullable":true,"asarray":false},"float-type":{"input":{"type":"text","classes":["input-float"]},"empty_as_null":true,"nullable":true,"asarray":false},"integer":{"input":{"type":"text","classes":["input-integer"],"step":1},"empty_as_null":true,"nullable":true,"asarray":false},"interval":{"input":{"type":"text","classes":["input-interval"]},"empty_as_null":true,"nullable":true,"asarray":false},"json":{"input":{"type":"text"},"empty_as_null":true,"nullable":true,"asarray":false,"asbinary":false},"many-to-many":{"asarray":true},"numeric":{"input":{"type":"text","classes":["input-numeric"]},"empty_as_null":true,"nullable":true,"asarray":false},"path":{"input":{"type":"text"},"empty_as_null":true,"nullable":true,"asarray":false},"php-array":{"input":{"type":"text"},"empty_as_null":true,"nullable":true,"asarray":false},"point":{"input":{"type":"text","classes":["input-point"]},"empty_as_null":true,"nullable":true,"asarray":false},"set":{"input":{"tag":"select","classes":["input-set"]},"empty_as_null":true,"nullable":true,"asarray":false,"set":[]},"text":{"input":{"tag":"textarea","classes":["input-text"]},"empty_as_null":true,"nullable":true,"asarray":false},"time":{"input":{"type":"text","classes":["input-time"]},"empty_as_null":true,"nullable":true,"timezone":false,"format":null,"precision":0,"localize":true,"asarray":false},"timestamp":{"input":{"type":"text","classes":["input-timestamp"]},"empty_as_null":true,"nullable":true,"timezone":false,"format":null,"localize":false,"asarray":false},"file":{"input":{"type":"file","classes":["input-file"]},"empty_as_null":true,"nullable":true,"asarray":false}},"mailer":{"class":"Mail\\FramewrkMailer","config":{"type":"Sendmail"}},"session":{"remember":false,"name":"PHPSESSID","lifetime":172800,"path":"\/","domain":null,"secure":false,"httponly":true},"microsoft":{"visionAnalyze":{"url":"https:\/\/westeurope.api.cognitive.microsoft.com\/vision\/v1.0\/analyze?visualFeatures=categories,tags,description,faces,imagetype,color&details=Landmarks,Celebrities","apiKey":""}},"csvLoadTable":{"uri":null,"delimiter":",","escape":"\\","quote":"\"","maxFileAge":86400,"tmp":"D:\\henk\\Workspace\\Appb\\applications\/App\/data\/tmp","transaction":true,"update":true,"insert":true,"delete":false,"truncate":false,"immutableColumns":"id","dropInvalidConstraintRows":true,"dropForeignKeys":true,"batchSize":500000,"updateModified":"modified_at","reindex":true,"transform":null,"optimize":null},"secureFiles":{"extension":"secured","paths":["D:\\henk\\Workspace\\Appb\/applications\/settings\/common","D:\\henk\\Workspace\\Appb\/applications\/Api\/settings\/common","D:\\henk\\Workspace\\Appb\/applications\/domain2\/settings\/common","D:\\henk\\Workspace\\Appb\/applications\/Go2Florida\/settings\/common","D:\\henk\\Workspace\\Appb\/applications\/App\/settings\/common","D:\\henk\\Workspace\\Appb\/applications\/Presentation\/settings\/common","D:\\henk\\Workspace\\Appb\/applications\/domain\/settings\/common","D:\\henk\\Workspace\\Appb\/applications\/domainBe\/settings\/common"]},"FileStores":{"static":{"alias":".static","allow_browse":false,"allow_read":false,"allow_upload":false,"use_uuid":false,"analyzers":[],"adapter":{"class":"League\\Flysystem\\Adapter\\Local","config":{"root":"D:\\henk\\Workspace\\Appb\/.static"}}}},"analyzers":{"Exif":{"class":"Framewrk\\Analyzer\\Exif","priority":100},"ImgFing":{"class":"Framewrk\\Analyzer\\ImgFing","config":{"input":"{{File.getAnalyzerResults.img.result.preview}}"},"priority":100},"MicrosoftVisionAnalyze":{"class":"Framewrk\\Analyzer\\Microsoft\\VisionAnalyze","config":{"input":"{{File.getAnalyzerResults.img.result.preview}}"},"priority":100},"img":{"class":"Framewrk\\Analyzer\\Image","config":{"thumb":{"steps":[{"method":"fit","args":[150]}],"path":".Framewrk\/thmb\/{{File.store_dir}}\/{{File.store_name}}.png"},"preview":{"steps":[{"method":"resize","args":[800,800]}],"path":".Framewrk\/prvw\/{{File.store_dir}}\/{{File.store_name}}.png"}},"priority":1}},"AssetPacker":{"root":"D:\\henk\\Workspace\\Appb\/data\/asset-packer","enabled":true},"resizeFormats":{"thumb":[120,null],"lightbox":[1600,800],"banner":[1200,432],"quarter-column":[112,null],"column":[450,null],"presentation-background":[1920,null],"presentation-thumb":[80,80]},"img":{"quality":70},"applicationName":"App","fileStore":{"Framewrk.os":{"class":"\\Framewrk\\FileStore\\ObjectStore", "config":{}}}} JSON; $data = json_decode($datastr, true); if ($data === null) { die(json_last_error_msg()); } $o = new ArrayObject($data, ArrayObject::ARRAY_AS_PROPS); $makeRecursive = function (ArrayObject $a) use (&$makeRecursive) { foreach ($a as $k => $v) { if (true === is_array($v)) { $a->$k = new ArrayObject($v, ArrayObject::ARRAY_AS_PROPS); $makeRecursive($a->$k); } } }; $makeRecursive($o); $str = serialize($o); $data2 = unserialize($str); die('success');
based on KqJq1
Output for 7.1.25 - 7.4.0
success