3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $policy = <<<STRING { "expiration": "2013-3-14T23:20:33.000Z", "conditions": [{"bucket": "clientvids_in"}, ["starts-with", "$key", "233326"], {"acl": "public-read"}, ["starts-with", "$Filename", ""]]} STRING; echo $policy . "\n"; echo preg_replace('/\s\s+|\\f|\\n|\\r|\\t|\\v/', '', $policy);
Output for 5.2.4 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: key in /in/TTXPP on line 4 Notice: Undefined variable: Filename in /in/TTXPP on line 4 { "expiration": "2013-3-14T23:20:33.000Z", "conditions": [{"bucket": "clientvids_in"}, ["starts-with", "", "233326"], {"acl": "public-read"}, ["starts-with", "", ""]]} { "expiration": "2013-3-14T23:20:33.000Z", "conditions": [{"bucket": "clientvids_in"}, ["starts-with", "", "233326"], {"acl": "public-read"}, ["starts-with", "", ""]]}
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: key in /in/TTXPP on line 5 Notice: Undefined variable: Filename in /in/TTXPP on line 5 { "expiration": "2013-3-14T23:20:33.000Z", "conditions": [{"bucket": "clientvids_in"}, ["starts-with", "", "233326"], {"acl": "public-read"}, ["starts-with", "", ""]]} { "expiration": "2013-3-14T23:20:33.000Z", "conditions": [{"bucket": "clientvids_in"}, ["starts-with", "", "233326"], {"acl": "public-read"}, ["starts-with", "", ""]]}
Output for 5.0.4 - 5.2.3
Notice: Undefined variable: key in /in/TTXPP on line 4 Notice: Undefined variable: Filename in /in/TTXPP on line 4 { "expiration": "2013-3-14T23:20:33.000Z", "conditions": [{"bucket": "clientvids_in"}, ["starts-with", "", "233326"], {"acl": "public-read"}, ["starts-with", "", ""]]} { "expiration": "2013-3-14T23:20:33.000Z", "conditions": [{"bucket": "clientids_in"}, ["starts-with", "", "233326"], {"acl": "public-read"}, ["starts-with", "", ""]]}
Output for 4.3.0 - 4.4.8, 5.0.0 - 5.0.3
Notice: Undefined variable: key in /in/TTXPP on line 4 Notice: Undefined variable: Filename in /in/TTXPP on line 4 { "expiration": "2013-3-14T23:20:33.000Z", "conditions": [{"bucket": "clientvids_in"}, ["starts-with", "", "233326"], {"acl": "public-read"}, ["starts-with", "", ""]]} { "expiration": "2013-3-14T23:20:33.000Z", "conditions": [{"bucket": "clientids_in"}, ["starts-with", "", "233326"], {"acl": "public-read"}, ["starts-with", "", ""]]}
Output for 4.4.9
Notice: Undefined variable: key in /in/TTXPP on line 4 Notice: Undefined variable: Filename in /in/TTXPP on line 4 { "expiration": "2013-3-14T23:20:33.000Z", "conditions": [{"bucket": "clientvids_in"}, ["starts-with", "", "233326"], {"acl": "public-read"}, ["starts-with", "", ""]]} { "expiration": "2013-3-14T23:20:33.000Z", "conditions": [{"bucket": "clientvids_in"}, ["starts-with", "", "233326"], {"acl": "public-read"}, ["starts-with", "", ""]]}