3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = '{ "form":{ "id":"2", "name":"Test" }, "elements":[ { "id":"2", "f_id":"2", "e_id":"4", "data":"{\"e_id\":\"4\",\"name\":\"Dropdown\",\"label\":\"Dropdown\",\"required\":\"0\",\"calculate_enabled\":\"1\",\"options\":[{\"value\":\"0\",\"text\":\"Option 0\"},{\"value\":\"1\",\"text\":\"Option 1\"},{\"value\":\"2\",\"text\":\"Option 2\"}],\"calculate\":[{\"operator\":\"0\",\"target\":\"0\",\"value\":\"\"}],\"overwrite_price\":\"0\",\"calculate_before\":\"0\",\"conditional\":[{\"action\":\"0\",\"target\":\"0\",\"operator\":\"0\",\"value\":\"\"}],\"discount\":[{\"range_min\":\"1\",\"range_max\":\"1\",\"operator\":\"add\",\"discount_value\":\"10\"},{\"range_min\":\"2\",\"range_max\":\"2\",\"operator\":\"add\",\"discount_value\":\"100\"}],\"class\":\"\",\"hidden\":\"0\",\"columns\":\"6\"}", "position":"4" }, { "id":"5", "f_id":"2", "e_id":"7", "data":"{\"e_id\":\"7\",\"name\":\"Numbers\",\"label\":\"Numbers\",\"required\":\"0\",\"calculate_enabled\":\"1\",\"factor\":\"1\",\"value\":\"\",\"min\":\"0\",\"max\":\"100\",\"slider\":\"0\",\"steps_slider\":\"1\",\"spinner\":\"0\",\"steps_spinner\":\"1\",\"calculate\":[{\"operator\":\"0\",\"target\":\"0\",\"value\":\"\"}],\"overwrite_price\":\"0\",\"calculate_before\":\"0\",\"conditional\":[{\"action\":\"0\",\"target\":\"0\",\"operator\":\"0\",\"value\":\"\"}],\"discount\":[{\"range_min\":\"\",\"range_max\":\"\",\"operator\":\"0\",\"discount_value\":\"\"}],\"placeholder\":\"\",\"class\":\"\",\"hidden\":\"0\",\"columns\":\"6\"}", "position":"3" }, { "id":"6", "f_id":"2", "e_id":"15", "data":"{\"e_id\":\"15\",\"name\":\"Subtotal\",\"label\":\"Subtotal\",\"calculate_enabled\":\"1\",\"calculate\":[{\"operator\":\"0\",\"target\":\"0\",\"value\":\"\"}],\"overwrite_price\":\"0\",\"conditional\":[{\"action\":\"0\",\"target\":\"0\",\"operator\":\"0\",\"value\":\"\"}],\"discount\":[{\"range_min\":\"50\",\"range_max\":\"\",\"operator\":\"percent_sub\",\"discount_value\":\"10\"}],\"class\":\"\",\"hidden\":\"0\",\"columns\":\"6\"}", "position":"2" }, { "id":"10", "f_id":"2", "e_id":"12", "data":"{\"e_id\":\"12\",\"name\":\"HTML\",\"html\":\"<a href=\\\"#\\\">bla'a<\\/a>\",\"hidden\":\"0\",\"columns\":\"6\"}", "position":"1" } ], "options":[ { "f_id":"2", "o_id":"1", "value":"", "name":"email_recipient", "type":"" }, { "f_id":"2", "o_id":"2", "value":"Thank you for your submission!", "name":"success_text", "type":"" }, { "f_id":"2", "o_id":"3", "value":"1", "name":"spam_time", "type":"" }, { "f_id":"2", "o_id":"4", "value":"1", "name":"show_required_char", "type":"yesno" }, { "f_id":"2", "o_id":"5", "value":"$", "name":"currency", "type":"" }, { "f_id":"2", "o_id":"6", "value":"Price", "name":"price_label", "type":"" }, { "f_id":"2", "o_id":"7", "value":"0", "name":"show_element_price", "type":"yesno" }, { "f_id":"2", "o_id":"8", "value":"1", "name":"submission_enabled", "type":"yesno" }, { "f_id":"2", "o_id":"9", "value":"1", "name":"show_price_position", "type":"select,Hidden|Below|Above|Below and above|Fixed left|Fixed right" }, { "f_id":"2", "o_id":"10", "value":"", "name":"email_admin_sender", "type":"" }, { "f_id":"2", "o_id":"11", "value":"Your submission", "name":"email_subject", "type":"" }, { "f_id":"2", "o_id":"12", "value":"Thank you for your submission, we will contact you soon!\r\n\r\n{{result}}", "name":"email_text", "type":"editor" }, { "f_id":"2", "o_id":"13", "value":"New submission", "name":"email_admin_subject", "type":"" }, { "f_id":"2", "o_id":"14", "value":"You have received a new submission:\r\n\r\n{{result}}", "name":"email_admin_text", "type":"editor" }, { "f_id":"2", "o_id":"15", "value":"Submit", "name":"submit_text", "type":"" }, { "f_id":"2", "o_id":"16", "value":"Add to cart", "name":"submit_text_woo", "type":"" }, { "f_id":"2", "o_id":"17", "value":"", "name":"submit_button_class", "type":"" }, { "f_id":"2", "o_id":"18", "value":"1", "name":"email_show_total_price", "type":"yesno" }, { "f_id":"2", "o_id":"19", "value":"1", "name":"theme", "type":"themes" }, { "f_id":"2", "o_id":"20", "value":"0", "name":"currency_position", "type":"select,Before|After" }, { "f_id":"2", "o_id":"21", "value":"mm/dd/yy", "name":"datepicker_format", "type":"" }, { "f_id":"2", "o_id":"22", "value":"0", "name":"pp_enabled", "type":"yesno" }, { "f_id":"2", "o_id":"23", "value":"Check out with PayPal", "name":"pp_submittext", "type":"" }, { "f_id":"2", "o_id":"24", "value":"Your submission", "name":"email_subject_pp", "type":"" }, { "f_id":"2", "o_id":"25", "value":"Thank you for your submission,\r\n\r\nwe have received your payment via PayPal.", "name":"email_text_pp", "type":"editor" }, { "f_id":"2", "o_id":"26", "value":"We have received your payment, thank you!", "name":"pp_paid_text", "type":"" }, { "f_id":"2", "o_id":"27", "value":"", "name":"redirect_url", "type":"" }, { "f_id":"2", "o_id":"28", "value":"0", "name":"min_submit_value", "type":"" }, { "f_id":"2", "o_id":"29", "value":"Minimum submission value is %s", "name":"min_submit_value_text", "type":"" }, { "f_id":"2", "o_id":"30", "value":"1", "name":"mailchimp_add", "type":"yesno" }, { "f_id":"2", "o_id":"31", "value":"-1", "name":"mailchimp_list", "type":"mailchimp_list" } ] }'; print_r(json_decode($a));
Output for 5.4.0 - 5.4.35
Parse error: syntax error, unexpected 'a' (T_STRING) in /in/l8PcY on line 34
Process exited with code 255.
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 T_STRING in /in/l8PcY on line 34
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 T_STRING in /in/l8PcY on line 34
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/l8PcY on line 34
Process exited with code 255.

preferences:
216.16 ms | 1395 KiB | 125 Q