function main(state) {
  const js = state.text.replace(/\n\n\/\/ Result:[\s\S]*$/, '');
  let output = '';
  try {
    const result = new Function(`return ${js}`)();
    output = convert(result) + ';';
  } catch (error) {
    state.postError(error.message);
  }
  state.text = js + "\n\n// Result:\n\n" + output;
}
{
		"api":1,
		"name":"JS To PHP",
		"description":"Convert JS Object or Array to PHP.",
		"author":"jtolj",
		"icon":"elephant",
		"tags":"js,php,convert"
	}