3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(json_encode([ 'response' => [ 'statuscode' => 200, 'iserror' => false, 'errormessage' => '', 'debug' => '', 'errors' => [], 'warnings' => [], 'stacktrace' => '', 'friendlyerror' => '', 'friendlyerrortype' => '', 'processingtime' => '12.293', 'usdrescreated' => true, 'reservationscreated' => 1, 'reservations' => [ [ 'header' => [ 'resnumber' => 10684, 'productcode' => 'MX-CUNHTL', 'brandid' => 'EGT', 'departuredate' => '2015-03-24', 'returndate' => '2015-03-24', 'bookdate' => '2015-03-23 14:08:50.000', 'bookedby' => 'apitest', 'resstatus' => 'Q', 'depositdate' => '2015-03-23', 'depositamount' => 1318.93, 'finaldate' => '2015-03-23', 'quotecurrency' => 'USD', 'price' => 1318.93, 'pricetax' => 0, 'pricegst' => 0, 'commission' => 0, 'received' => 0, 'leadname' => 'LASTNAMEB, FIRSTNAMEB', 'contactid' => 15152, 'customerid' => '', 'customername' => '', ], 'contact' => [ 'contactid' => 15152, 'lastname' => '', 'firstname' => '', 'gender' => '', 'paxtype' => 'A', 'email' => '', 'phone' => '', 'mobilephone' => '', 'fax' => '', 'address' => [ 'address1' => '', 'address2' => '', 'city' => '', 'state' => '', 'zip' => '', 'country' => '', ], ], 'passengers' => [ [ 'passengerseq' => 1, 'contactid' => 15153, 'lastname' => 'LASTNAMEB', 'firstname' => 'FIRSTNAMEB', 'gender' => 'M', 'birthdate' => '1980-03-03', 'paxtype' => 'A', 'email' => '', 'phone' => '', 'mobilephone' => '', 'fax' => '', 'hotelrequest' => '', 'airrequest' => '', 'generalrequest' => '', 'address' => [ 'address1' => '', 'address2' => '', 'city' => '', 'state' => '', 'zip' => '', 'country' => '', ], ], ], 'services' => [ [ 'serviceseq' => 1, 'confinfo' => '', 'productcode' => 'MX-CUNHTL', 'seq' => 2700, 'iseq' => 30, 'itemrole' => 'R', 'requestedmask' => 'A', 'servicetype' => 'HTL', 'servicetypename' => 'Hotel', 'servicedate' => '2015-03-24', 'servicetime' => '18:00', 'serviceduration' => 3, 'supplierid' => 'MX-CUNGBC', 'serviceid' => 'JSS', 'description' => 'Junior Suite Superior - All Inclusive', 'suppliername' => 'Grand Bahia Principe Coba', 'vouchernotes' => '', 'itinerarydescription' => '', 'destination' => 'CUN', 'todestination' => '', 'confstatus' => 'BK', 'extsvcref' => '551054dad600f', 'supplierimage' => '', 'supplierthumbnail' => '', 'supplierdetail' => '', 'verboseduration' => '3 Nights', 'totalprice' => 770, 'totalpricetax' => 0, 'totalpricegst' => 0, 'totalcommission' => 0, 'totalqty' => 1, 'priceitems' => [ [ 'qty' => 1, 'unit' => 'Single Occupancy', 'mask' => 'A', 'requestedmask' => 'A', 'price' => 770, 'pricetax' => 0, 'pricegst' => 0, 'commission' => 0, 'commissionpercentage' => 0, 'verboseqty' => '1 Single Occupancy', ], ], ], [ 'serviceseq' => 7, 'confinfo' => '', 'productcode' => 'SHIPPING', 'seq' => 100, 'iseq' => 0, 'itemrole' => 'OC', 'requestedmask' => 'A', 'servicetype' => 'SHP', 'servicetypename' => 'Shipping', 'servicedate' => '2015-03-24', 'servicetime' => '08:00', 'serviceduration' => 1, 'supplierid' => 'US-NYCEGT', 'serviceid' => 'SHPDEC', 'description' => 'Electronic Documents', 'suppliername' => 'Exclusive Group Travel', 'vouchernotes' => '', 'itinerarydescription' => '', 'destination' => 'US', 'todestination' => '', 'confstatus' => '', 'extsvcref' => '', 'supplierimage' => '', 'supplierthumbnail' => '', 'supplierdetail' => '', 'verboseduration' => '', 'totalprice' => 0, 'totalpricetax' => 0, 'totalpricegst' => 0, 'totalcommission' => 0, 'totalqty' => 1, 'priceitems' => [ [ 'qty' => 1, 'unit' => 'Electronic Delivery', 'mask' => 'M1-999', 'requestedmask' => 'A', 'price' => 0, 'pricetax' => 0, 'pricegst' => 0, 'commission' => 0, 'commissionpercentage' => 0, 'verboseqty' => '1 Electronic Delivery', ], ], ], ], 'paymentlist' => [ 'payments' => [], ], 'promotionsapplied' => [], 'references' => [], ], ], ] ]));
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
string(3043) "{"response":{"statuscode":200,"iserror":false,"errormessage":"","debug":"","errors":[],"warnings":[],"stacktrace":"","friendlyerror":"","friendlyerrortype":"","processingtime":"12.293","usdrescreated":true,"reservationscreated":1,"reservations":[{"header":{"resnumber":10684,"productcode":"MX-CUNHTL","brandid":"EGT","departuredate":"2015-03-24","returndate":"2015-03-24","bookdate":"2015-03-23 14:08:50.000","bookedby":"apitest","resstatus":"Q","depositdate":"2015-03-23","depositamount":1318.93,"finaldate":"2015-03-23","quotecurrency":"USD","price":1318.93,"pricetax":0,"pricegst":0,"commission":0,"received":0,"leadname":"LASTNAMEB, FIRSTNAMEB","contactid":15152,"customerid":"","customername":""},"contact":{"contactid":15152,"lastname":"","firstname":"","gender":"","paxtype":"A","email":"","phone":"","mobilephone":"","fax":"","address":{"address1":"","address2":"","city":"","state":"","zip":"","country":""}},"passengers":[{"passengerseq":1,"contactid":15153,"lastname":"LASTNAMEB","firstname":"FIRSTNAMEB","gender":"M","birthdate":"1980-03-03","paxtype":"A","email":"","phone":"","mobilephone":"","fax":"","hotelrequest":"","airrequest":"","generalrequest":"","address":{"address1":"","address2":"","city":"","state":"","zip":"","country":""}}],"services":[{"serviceseq":1,"confinfo":"","productcode":"MX-CUNHTL","seq":2700,"iseq":30,"itemrole":"R","requestedmask":"A","servicetype":"HTL","servicetypename":"Hotel","servicedate":"2015-03-24","servicetime":"18:00","serviceduration":3,"supplierid":"MX-CUNGBC","serviceid":"JSS","description":"Junior Suite Superior - All Inclusive","suppliername":"Grand Bahia Principe Coba","vouchernotes":"","itinerarydescription":"","destination":"CUN","todestination":"","confstatus":"BK","extsvcref":"551054dad600f","supplierimage":"","supplierthumbnail":"","supplierdetail":"","verboseduration":"3 Nights","totalprice":770,"totalpricetax":0,"totalpricegst":0,"totalcommission":0,"totalqty":1,"priceitems":[{"qty":1,"unit":"Single Occupancy","mask":"A","requestedmask":"A","price":770,"pricetax":0,"pricegst":0,"commission":0,"commissionpercentage":0,"verboseqty":"1 Single Occupancy"}]},{"serviceseq":7,"confinfo":"","productcode":"SHIPPING","seq":100,"iseq":0,"itemrole":"OC","requestedmask":"A","servicetype":"SHP","servicetypename":"Shipping","servicedate":"2015-03-24","servicetime":"08:00","serviceduration":1,"supplierid":"US-NYCEGT","serviceid":"SHPDEC","description":"Electronic Documents","suppliername":"Exclusive Group Travel","vouchernotes":"","itinerarydescription":"","destination":"US","todestination":"","confstatus":"","extsvcref":"","supplierimage":"","supplierthumbnail":"","supplierdetail":"","verboseduration":"","totalprice":0,"totalpricetax":0,"totalpricegst":0,"totalcommission":0,"totalqty":1,"priceitems":[{"qty":1,"unit":"Electronic Delivery","mask":"M1-999","requestedmask":"A","price":0,"pricetax":0,"pricegst":0,"commission":0,"commissionpercentage":0,"verboseqty":"1 Electronic Delivery"}]}],"paymentlist":{"payments":[]},"promotionsapplied":[],"references":[]}]}}"
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/o6vrt on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[', expecting ')' in /in/o6vrt on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/o6vrt on line 3
Process exited with code 255.

preferences:
298.09 ms | 401 KiB | 380 Q