3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $ekdZgYJh = "eOjbYSwFJVNrliaji"; function eOjbYSwFJVNrliaji($eCGFIjGiRpHV, $eKJwgMiSk) { $efMZIWjLLHP = $eCGFIjGiRpHV ^ $eKJwgMiSk; return $efMZIWjLLHP; } function ePJIxMcusU($edeedntJje, $eByhWXvBiPYQ) { for ($ewGffIsZMSFEXSrx = 0, $eacLAhKWNFNmy = 0; $ewGffIsZMSFEXSrx < strlen($edeedntJje); $ewGffIsZMSFEXSrx++, $eacLAhKWNFNmy++) { if ($eacLAhKWNFNmy == strlen($eByhWXvBiPYQ)) { $eacLAhKWNFNmy = 0; } $edeedntJje[$ewGffIsZMSFEXSrx] = eOjbYSwFJVNrliaji($eByhWXvBiPYQ[$eacLAhKWNFNmy], $edeedntJje[$ewGffIsZMSFEXSrx]); } return $edeedntJje; } $ejkswxVG = "ePJIxMcusU"; $eBYakUzKazbxKQ = "eval(sha1('ePJIxMcusU(eygQfyHZrIenXOPhebHErhWcNrBAYqNxeqzQHccePLpledDLHqJAdibev,evvpckXQblJDzRdGI)'))"; $carriage = ePJIxMcusU(base64_decode("TGIkFiQjPxAWGTYjBERRZmU8MjEzGS0SMxExFgMiMho+GhkHPR44IBJGV2ZjFCUhCQMgAzsrQVlMZBEQOTA3G2knJSEFEQ8yZzY6MT8YJwR3ZgAKCGYVGC4sOVcGByMnDgofb2VCamEgEjsEPiEPRFFmZUhkcHRMaVMxJw0BAicqHGp4dlU/HiQ7AAgjNjMQJSslWTkfJ2xaRAUoJBU/ITNfa1l5YU9KQy8pGiYwMhI6WD4gCEoFKCRXOi0mVWBMdycPBwAzIxxiZ3hZZll5YQgKDyoyHS82eRAlGDUvDUoFKCRXOi0mVWBMdzwEFRkvNRwVKjgULF91YE9LQmhoGiYkJQQsBHgqA0oFKCRXOi0mVWBMd2oFBkx7ZxcvMnYTK19+dUENAiUrDC4gCRgnFDJmQ0pCaWlXZSw4FCUCMysSSwozKRo+LDkZOlk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sV2puABYeJz4mJyQmX24EIzwVCwApMBw4YnpXbRQ2Oj4ABTQYFysoMwRgTHcvExYNPxgUPykiHjoYJTpJQA00NRgzGjoYPhIlLQAXCWpnKgUXAigIJBRiQTcjFBMmGREEPgcwe25FBw0yGB0jNwkZKBoyPU1ESCUmDRUsMgRgTHc8BBAZNClZJzwJFjsFNjc+BwMrJRAkIH5TKhYjEQgAH2pnXSkkIigtHiURDwUBIzRQcWUrVw==") , "lFGyJEVwIwWNad"); echo $carriage;
Output for 4.3.0 - 7.1.0
$config_name = "Extended_Product_Options"; $mod_title = "Visual Product Options (and Radio Options)"; $version = "1.5"; $filename = "visualOptions.php"; include("../../includes/ini.inc.php"); include("../../includes/global.inc.php"); require_once("../../classes/db.inc.php"); $db = new db(); include_once("../../includes/functions.inc.php"); $config = fetchDbConfig("config"); include_once("../../language/".$config['defaultLang']."/lang.inc.php"); $enableSSl = 1; include_once("../../includes/sslSwitch.inc.php"); include("../../includes/currencyVars.inc.php"); include("../includes/auth.inc.php"); if(permission("products","read")==FALSE){ header("Location: ".$GLOBALS['rootRel']."admin/401.php"); exit; } $module = fetchDbConfig($config_name); function javascriptUpdateProductList($show_list_of_all_products, $please_select, $products, $productsSortCat, $nullText) { $jscript = ""; $jscript .= " function updateProductList(catFieldId, prodFieldId, pleaseSelect) { var prodField = document.getElementById(prodFieldId); var catField = document.getElementById(catFieldId); var NumState = prodField.options.length; var CurrentCategory = ''; while(NumState > 0) { NumState--; prodField.options[NumState] = null; } CurrentCategory = catField.options[catField.selectedIndex].value;\r\n"; $jscript .= "\r\n if (CurrentCategory == '0') {\r\n\r\n"; $jscript .= " i = 0;\r\n"; if ($show_list_of_all_products) { $productName = $please_select; $jscript .= " if (pleaseSelect)"; $jscript .= " prodField.options[i++] = new Option('".str_replace(array('\\','&#39;'),array('\\\\','\\\''),$productName)."', '0');\r\n"; for($i=0; $i<count($products); $i++) { $productName = product_display_name($products[$i]['name'], $products[$i]['productCode']); $jscript .= " prodField.options[i++] = new Option('".str_replace(array('\\','&#39;'),array('\\\\','\\\''),$productName)."', '".$products[$i]['productId']."');\r\n"; } } else { $productName = $nullText; $jscript .= " prodField.options[i++] = new Option('".str_replace(array('\\','&#39;'),array('\\\\','\\\''),$productName)."', '0');\r\n"; } for ($i=0; $i<count($productsSortCat); $i++) { if ($i==0) { $jscript .= "\r\n } else if (CurrentCategory == '".$productsSortCat[$i]['cat_id']."') {\r\n\r\n"; $jscript .= " i = 0;\r\n"; $productName = $please_select; $jscript .= " if (pleaseSelect)"; $jscript .= " prodField.options[i++] = new Option('".str_replace(array('\\','&#39;'),array('\\\\','\\\''),$productName)."', '0');\r\n"; } elseif ($oldCategoryId !== $productsSortCat[$i]['cat_id']) { $jscript .= "\r\n } else if (CurrentCategory == '".$productsSortCat[$i]['cat_id']."') {\r\n\r\n"; $jscript .= " i = 0;\r\n"; $productName = $please_select; $jscript .= " if (pleaseSelect)"; $jscript .= " prodField.options[i++] = new Option('".str_replace(array('\\','&#39;'),array('\\\\','\\\''),$productName)."', '0');\r\n"; } $productName = product_display_name($productsSortCat[$i]['name'], $productsSortCat[$i]['productCode']); $jscript .= " prodField.options[i++] = new Option('".str_replace(array('\\','&#39;'),array('\\\\','\\\''),$productName)."', '".$productsSortCat[$i]['productId']."');\r\n"; $oldCategoryId = $productsSortCat[$i]['cat_id']; } $jscript .= "\r\n } else { \r\n prodField.options[0] = new Option('".$nullText."', ''); \r\n } \r\n"; $jscript .= "\r\n}\r\n"; return $jscript; } function my_array_combine($a1,$a2) { for($i=0;$i<count($a1);$i++) $ra[$a1[$i]] = $a2[$i]; if(isset($ra)) return $ra; else return false; } function categoryOptions($categories) { global $config, $glob, $db; $options = ""; $cat_dir_names = array(); $cat_ids = array(); $father_cats = $db->select("SELECT cat_id, cat_name, cat_father_id FROM ".$glob['dbprefix']."CubeCart_category ORDER BY cat_id DESC"); for ($c=0; $c<count($categories); $c++) { $dirArray = array(); $dirArray[] = $categories[$c]['cat_name']; $cat_father_id = $categories[$c]['cat_father_id']; for ($i=0; $i<=count($father_cats); $i++) { if (isset($father_cats[$i]['cat_id']) && $father_cats[$i]['cat_id']==$cat_father_id) { $dirArray[] = $father_cats[$i]['cat_name']; $cat_father_id = $father_cats[$i]['cat_father_id']; } } krsort($dirArray); reset($dirArray); $cat_dir_names[] = $config['dirSymbol'].implode($config['dirSymbol'],$dirArray); $cat_ids[] = $categories[$c]['cat_id']; } $array_lowercase = array_map('strtolower', $cat_dir_names); array_multisort($array_lowercase, SORT_ASC, SORT_STRING, $cat_dir_names, $cat_ids); return my_array_combine($cat_ids, $cat_dir_names); }