3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php /* $a = '011'; var_dump($a); var_dump(is_numeric($a)); var_dump(is_int($a)); var_dump(ctype_digit($a)); echo PHP_EOL; $a = 011; var_dump($a); var_dump(is_numeric($a)); var_dump(is_int($a)); var_dump(ctype_digit($a)); echo PHP_EOL; $a = '11'; var_dump($a); var_dump(is_numeric($a)); var_dump(is_int($a)); var_dump(ctype_digit($a)); */ /* $b = 2; $c = 0; $a = $b ?: 1; $d = $c ?: 3; echo $a . $d; */ $a = array ( 'swap' => '0', 'observations' => '', 'date' => '2015-04-15 13:25:25', 'notes' => '', 'emag_id' => '309', 'id' => '', 'vendor_id' => '9', 'return_address_id' => '', 'order_id' => '2001495428', 'return_reason' => '1', 'return_type' => '1', 'pickup_method' => '1', 'return_tax_value' => '', 'request_status' => '2', 'replacement_product_id' => '', 'replacement_product_name' => '', 'replacement_product_quantity' => '', 'customer_name' => 'Botez Ovidiu Cristinel', 'customer_phone' => '0755337903', 'customer_company' => '', 'customer_email' => 'botezovidiucristinel@yahoo.com', 'customer_account_iban' => '', 'customer_account_bank' => '', 'pickup_suburb' => 'Bacau', 'pickup_city' => '2387', 'pickup_address' => 'Culturi nr3 bl3 scC ap9', 'pickup_zipcode' => '', 'pickup_date' => '', 'products' => array ( 0 => array ( 'quantity' => '1', 'diagnostic' => '', 'product_id' => '107618', 'product_name' => 'Pachet promo Carespot Punga - Cadou Femei', 'product_status' => '1', 'reject_reason' => '', 'refund_value' => '', ), ), ); echo json_encode($a);
based on q2pp4
Output for 5.2.0 - 7.2.0
{"swap":"0","observations":"","date":"2015-04-15 13:25:25","notes":"","emag_id":"309","id":"","vendor_id":"9","return_address_id":"","order_id":"2001495428","return_reason":"1","return_type":"1","pickup_method":"1","return_tax_value":"","request_status":"2","replacement_product_id":"","replacement_product_name":"","replacement_product_quantity":"","customer_name":"Botez Ovidiu Cristinel","customer_phone":"0755337903","customer_company":"","customer_email":"botezovidiucristinel@yahoo.com","customer_account_iban":"","customer_account_bank":"","pickup_suburb":"Bacau","pickup_city":"2387","pickup_address":"Culturi nr3 bl3 scC ap9","pickup_zipcode":"","pickup_date":"","products":[{"quantity":"1","diagnostic":"","product_id":"107618","product_name":"Pachet promo Carespot Punga - Cadou Femei","product_status":"1","reject_reason":"","refund_value":""}]}
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_encode() in /in/d8lbH on line 34
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_encode() in /in/d8lbH on line 34
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_encode() in /in/d8lbH on line 34
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_encode() in /in/d8lbH on line 34