3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $tags1 = array("##ORDER_TABLE##", "##USERNAME##", "##TOTAL_PRICE##"); $values1 = array("suck", "my", "dick"); $tags2 = array("##MAIL_FROM##", "##ITEM_NAME##", "##ITEM_LINK##", "##ITEM_IMG##", "##MESSAGE##"); $values2 = array($mailfrom, $itemname, $itemlink, $itemimage, $message); $json1 = array_combine($tags1, $values1); $json2 = array_combine($tags2, $values2); $json = json_encode($json1, $json2); print_r($json); print_r(json_decode($json));
based on KlO3E
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: mailfrom in /in/ZcqLE on line 6 Notice: Undefined variable: itemname in /in/ZcqLE on line 6 Notice: Undefined variable: itemlink in /in/ZcqLE on line 6 Notice: Undefined variable: itemimage in /in/ZcqLE on line 6 Notice: Undefined variable: message in /in/ZcqLE on line 6 Warning: json_encode() expects parameter 2 to be integer, array given in /in/ZcqLE on line 9
Output for 5.5.0 - 5.6.28
Notice: Undefined variable: mailfrom in /in/ZcqLE on line 6 Notice: Undefined variable: itemname in /in/ZcqLE on line 6 Notice: Undefined variable: itemlink in /in/ZcqLE on line 6 Notice: Undefined variable: itemimage in /in/ZcqLE on line 6 Notice: Undefined variable: message in /in/ZcqLE on line 6 Warning: json_encode() expects parameter 2 to be long, array given in /in/ZcqLE on line 9