3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); // Отклоняем запросы с IP-адресов, которые не принадлежат Payeer //if (!in_array($_SERVER['REMOTE_ADDR'], array('185.71.65.92', '185.71.65.189','149.202.17.210'))) return; header("Content-type: text/html; charset=windows-1251"); require("".$_SERVER['DOCUMENT_ROOT']."/config.php"); require("".$_SERVER['DOCUMENT_ROOT']."/merchant/func_mysql.php"); require("".$_SERVER['DOCUMENT_ROOT']."/merchant/payeer/payeer_config.php"); require("".$_SERVER['DOCUMENT_ROOT']."/config.php"); define('PATH_TO_LOG', dirname(__FILE__).'/'); $m_operation_id = (isset($_REQUEST["m_operation_id"])) ? htmlspecialchars(trim($_REQUEST["m_operation_id"])) : false; $m_operation_ps = (isset($_REQUEST["m_operation_ps"])) ? htmlspecialchars(trim($_REQUEST["m_operation_ps"])) : false; $m_operation_date = (isset($_REQUEST["m_operation_date"])) ? htmlspecialchars(trim($_REQUEST["m_operation_date"])) : false; $m_operation_pay_date = (isset($_REQUEST["m_operation_pay_date"])) ? htmlspecialchars(trim($_REQUEST["m_operation_pay_date"])) : false; $m_shop = (isset($_REQUEST["m_shop"])) ? htmlspecialchars(trim($_REQUEST["m_shop"])) : false; $m_orderid = (isset($_REQUEST["m_orderid"])) ? htmlspecialchars(trim($_REQUEST["m_orderid"])) : false; $merch_amount = (isset($_REQUEST["m_amount"])) ? htmlspecialchars(trim($_REQUEST["m_amount"])) : false; $m_curr = (isset($_REQUEST["m_curr"])) ? htmlspecialchars(trim($_REQUEST["m_curr"])) : false; $m_desc = (isset($_REQUEST["m_desc"])) ? htmlspecialchars(trim($_REQUEST["m_desc"])) : false; $m_status = (isset($_REQUEST["m_status"])) ? htmlspecialchars(trim($_REQUEST["m_status"])) : false; $m_sign = (isset($_REQUEST["m_sign"])) ? strtoupper(htmlspecialchars(trim($_REQUEST["m_sign"]))) : false; $arHash = [$m_operation_id,$m_operation_ps,$m_operation_date,$m_operation_pay_date,$m_shop,$m_orderid,$merch_amount,$m_curr,$m_desc,$m_status,$m_key]; $sign = strtoupper(hash('sha256', implode(":", $arHash))); if($m_orderid!=false) { $exp = explode(":", $m_orderid); $shp_item = $exp[0]; $merch_tran_id = $exp[1]; }else{ $merch_tran_id = 0; $shp_item = 0; } $shp_item = (isset($shp_item) && preg_match("|^[\d]{1,11}$|", htmlspecialchars(trim($shp_item))) ) ? intval(htmlspecialchars(trim($shp_item))) : false; $merch_tran_id = (isset($merch_tran_id) && preg_match("|^[\d]{1,11}$|", htmlspecialchars(trim($merch_tran_id))) ) ? intval(htmlspecialchars(trim($merch_tran_id))) : false; $TABLE_ARR = [ 1 => "tb_add_pay", 2 => "tb_ads_dlink", 3 => "tb_ads_psevdo", 4 => "tb_ads_bs", 5 => "tb_ads_auto", 6 => "tb_ads_slink", 7 => "tb_ads_kontext", 8 => "tb_ads_banner", 9 => "tb_ads_txt", 10 => "tb_ads_frm", 11 => "tb_ads_mails", 12 => "tb_ads_rc", 13 => "tb_ads_downloads", 14 => "tb_ads_questions", 15 => "tb_ads_emails", 16 => "tb_ads_packet", 20 => "tb_ads_beg_stroka", 21 => "tb_ads_tests", 22 => "tb_ads_catalog", 23 => "tb_ads_youtube" ]; $STAT_PAY_ARR = [ 1 => "money_in", 2 => "dlink", 3 => "psevdo", 4 => "bserf", 5 => "autoserf", 6 => "statlink", 7 => "kontext", 8 => "banners", 9 => "txtob", 10 => "frmlink", 11 => "mails", 12 => "rekcep", 13 => "files", 14 => "quest", 15 => "sent_mails", 16 => "packet", 20 => "bstroka", 21 => "tests", 22 => "catalog", 23 => "youtube" ]; if($sign==$m_sign && $m_status=="success") { if($shp_item!= 0 && array_key_exists($shp_item, $TABLE_ARR)) { $sql = mysql_query("SELECT `id`,`username`,`money` FROM `".$TABLE_ARR[$shp_item]."` WHERE `status`='0' AND `merch_tran_id`='$merch_tran_id' LIMIT 1"); $row = mysql_fetch_array($sql); $username = $row["username"]; if($shp_item==3 | $shp_item==6 | $shp_item==8 | $shp_item==9 | $shp_item==10) { $DATE_END = ", `date_end`=`plan`*'".(24*60*60)."'+'".time()."'"; }else{ $DATE_END = false; } if(floatval($row["money"])!=floatval($merch_amount)) { exit("$m_orderid|error"); }elseif($shp_item==1) { if($username!=false) { echo "$m_orderid|success"; $bon = mysql_query("SELECT `price` FROM `tb_config` WHERE `item`='bon_popoln' AND `howmany`='1'") or die(mysql_error()); $b = number_format(mysql_result($bon,0), 0, ".", ""); $bonus=($merch_amount/100)*$b; $merch_amount1=$merch_amount+$bonus; mysql_query("UPDATE `tb_users` SET `money_rb`=`money_rb`+'$merch_amount1', `money_in`=`money_in`+'$merch_amount1' WHERE `username`='$username'") or die(mysql_error()); mysql_query("INSERT INTO `tb_history` (`user`, `date`, `amount`, `method`, `status`, `tipo`) VALUES('$username', '".DATE("d.m.Y H:i")."', '$merch_amount1', 'Пополнение рекламного баланса через Payeer','Зачислено', 'popoln')") or die(mysql_error()); mysql_query("UPDATE `tb_add_pay` SET `status`='1', `date`='".time()."' WHERE `merch_tran_id`='$merch_tran_id' AND`username`='$username'") or die(mysql_error()); stat_pay($STAT_PAY_ARR[$shp_item], $merch_amount); }elseif($shp_item==16) { mysql_query("UPDATE `".$TABLE_ARR[$shp_item]."` SET `status`='1', `date`='".time()."' WHERE `status`='0' AND `merch_tran_id`='$merch_tran_id' ORDER BY `id` DESC LIMIT 1") or die(mysql_error()); stat_pay($STAT_PAY_ARR[$shp_item], $merch_amount); $merch_user_wmid = false; konkurs_ads_new($merch_user_wmid, $username, $merch_amount); require_once("".$_SERVER['DOCUMENT_ROOT']."/merchant/add_adv_packet.php"); require_once("".$_SERVER['DOCUMENT_ROOT']."/merchant/func_cache.php"); cache_stat_links(); cache_frm_links(); cache_txt_links(); cache_banners(); }elseif($shp_item==21) { mysql_query("UPDATE `".$TABLE_ARR[$shp_item]."` SET `status`='1', `date`='".time()."',`money`='$merch_amount',`balance`='$merch_amount' WHERE `status`='0' AND `merch_tran_id`='$merch_tran_id' ORDER BY `id` DESC LIMIT 1") or die(mysql_error()); }elseif($shp_item==30) { mysql_query("UPDATE `".$TABLE_ARR[$shp_item]."` SET `status`='2', `date`='".time()."' WHERE `status`='0' AND `merch_tran_id`='$merch_tran_id' ORDER BY `id` DESC LIMIT 1") or die(mysql_error()); }else{ mysql_query("UPDATE `".$TABLE_ARR[$shp_item]."` SET `status`='1', `date`='".time()."' $DATE_END WHERE `status`='0' AND `merch_tran_id`='$merch_tran_id' ORDER BY `id` DESC LIMIT 1") or die(mysql_error()); } mysql_query("UPDATE `tb_users` SET `money_rek`=`money_rek`+'$merch_amount' WHERE `username`='$username'") or die(mysql_error()); echo "$m_orderid|success"; stat_pay($STAT_PAY_ARR[$shp_item], $merch_amount); $merch_user_wmid = false; if($shp_item!=21){ konkurs_rek_ed($merch_user_wmid, $username, $merch_amount); konkurs_rek_ed($merch_user_wmid, $username, $merch_amount); } if($shp_item==6 | $shp_item==7 | $shp_item==8 | $shp_item==9 | $shp_item==10 | $shp_item==12 | $shp_item==20) { require_once($_SERVER['DOCUMENT_ROOT']."/merchant/func_cache.php"); cache_stat_links(); cache_kontext(); cache_frm_links(); cache_txt_links(); cache_rek_cep(); cache_banners(); cache_beg_stroka(); } } }else{ exit("$m_orderid|error"); } }else{ exit("$m_orderid|error"); } ?>

Abusive script

This script was stopped while abusing our resources

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.110.0050.00320.94
8.3.100.0210.00830.80
8.3.90.0240.00432.15
8.3.80.0260.00327.13
8.3.70.0220.01427.33
8.3.60.0230.01127.21
8.3.50.0180.00928.33
8.3.40.0170.00929.67
8.3.30.0230.00628.25
8.3.20.0150.00730.86
8.3.10.0150.00331.10
8.3.00.0120.00431.85
8.2.230.0030.00622.58
8.2.220.0090.00937.54
8.2.210.0180.00632.15
8.2.200.0180.00627.27
8.2.190.0180.01027.21
8.2.180.0200.00931.73
8.2.170.0250.00828.25
8.2.160.0220.00730.25
8.2.150.0200.00631.60
8.2.140.0240.00331.10
8.2.130.0210.00431.85
8.2.120.0150.00531.94
8.2.110.0140.00829.73
8.2.100.0120.00527.76
8.2.90.0080.00727.97
8.2.80.0120.00127.85
8.2.70.0090.00627.64
8.2.60.0130.00127.71
8.2.50.0100.00427.79
8.2.40.0060.01027.94
8.2.30.0200.00227.91
8.2.20.0120.00627.89
8.2.10.0140.00428.43
8.2.00.0150.00528.54
8.1.290.0110.00428.21
8.1.280.0120.00731.73
8.1.270.0180.00230.67
8.1.260.0110.00432.81
8.1.250.0110.00332.81
8.1.240.0160.00530.75
8.1.230.0180.00930.13
8.1.220.0210.00427.79
8.1.210.0210.00528.32
8.1.200.0220.00527.39
8.1.190.0260.00327.51
8.1.180.0120.00927.82
8.1.170.0170.00928.21
8.1.160.0210.00428.28
8.1.150.0200.00128.28
8.1.140.0100.00328.27
8.1.130.0090.00328.98
8.1.120.0080.00427.54
8.1.110.0100.00327.50
8.1.100.0100.00227.55
8.1.90.0100.00927.55
8.1.80.0100.00527.59
8.1.70.0100.01027.59
8.1.60.0110.00427.63
8.1.50.0100.00427.63
8.1.40.0080.00627.62
8.1.30.0080.00727.65
8.1.20.0100.00427.60
8.1.10.0080.00627.59
8.1.00.0090.00527.62
8.0.300.0150.00328.93
8.0.290.0160.00627.27
8.0.280.0060.00728.05
8.0.270.0090.00427.93
8.0.260.0200.00228.92
8.0.250.0110.00327.42
8.0.240.0090.00427.35
8.0.230.0120.00227.40
8.0.220.0050.00827.36
8.0.210.0150.00427.36
8.0.200.0110.00727.37
8.0.190.0140.00927.40
8.0.180.0210.00427.38
8.0.170.0200.00427.33
8.0.160.0180.00627.40
8.0.150.0180.00727.34
8.0.140.0160.00727.30
8.0.130.0180.00125.59
8.0.120.0080.01022.80
8.0.110.0150.00422.82
8.0.100.0130.00422.73
8.0.90.0080.00522.71
8.0.80.0110.00421.38
8.0.70.0060.00722.78
8.0.60.0130.00322.77
8.0.50.0090.00622.72
8.0.30.0160.00622.80
8.0.20.0150.00821.44
8.0.10.0130.00522.77
8.0.00.0140.00822.73
7.4.330.0180.00326.54
7.4.320.0170.00527.11
7.4.300.0170.00327.18
7.4.290.0160.00627.15
7.4.280.0150.00827.13
7.4.270.0150.00727.16
7.4.260.0170.00325.50
7.4.250.0170.00422.59
7.4.240.0230.00522.59
7.4.230.0130.00722.59
7.4.220.0100.00621.19
7.4.210.0150.00620.27
7.4.200.0120.00722.60
7.4.190.0170.00825.59
7.4.180.0170.00825.51
7.4.160.0210.00325.53
7.4.150.0120.00325.49
7.4.140.0130.00525.46
7.4.130.0110.00621.05
7.4.120.0100.00922.54
7.4.110.0100.00622.47
7.4.100.0090.00722.59
7.4.90.0150.00622.50
7.4.80.0190.00422.59
7.4.70.0140.00622.48
7.4.60.0130.00722.55
7.4.50.0140.00822.50
7.4.40.0170.00422.46
7.4.30.0140.00722.56
7.4.20.0160.00522.57
7.4.10.0150.00622.45
7.4.00.0120.00822.50
7.3.330.0140.00827.14
7.3.320.0180.00425.43
7.3.310.0080.00522.50
7.3.300.0070.00422.54
7.3.290.0100.00520.12
7.3.280.0140.00725.50
7.3.270.0150.00625.46
7.3.260.0140.00722.50
7.3.250.0280.00225.53
7.3.240.0240.00425.46
7.3.230.0150.00622.38
7.3.220.0180.00422.45
7.3.210.0160.00522.51
7.3.200.0160.00522.50
7.3.190.0140.00822.49
7.3.180.0150.00622.46
7.3.170.0160.00522.53
7.3.160.0160.00622.52
7.3.150.0170.00422.49
7.3.140.0150.00622.48
7.3.130.0130.00822.47
7.3.120.0140.00522.53
7.3.110.0120.00722.49
7.3.100.0090.01222.39
7.3.90.0120.00722.46
7.3.80.0130.00622.47
7.3.70.0140.00822.40
7.3.60.0200.00222.42
7.3.50.0150.00722.45
7.3.40.0110.01022.40
7.3.30.0130.00322.47
7.3.20.0120.00223.00
7.3.10.0130.00423.04
7.3.00.0310.00422.99
7.2.340.0130.00922.47
7.2.330.0170.00622.62
7.2.320.0140.01022.58
7.2.310.0140.00822.55
7.2.300.0180.00522.62
7.2.290.0150.00922.53
7.2.280.0160.00622.67
7.2.270.0190.00622.52
7.2.260.0160.00722.62
7.2.250.0150.00822.54
7.2.240.0160.00822.61
7.2.230.0110.00922.54
7.2.220.0110.00522.55
7.2.210.0150.00322.63
7.2.200.0190.00422.49
7.2.190.0210.00222.52
7.2.180.0150.00522.55
7.2.170.0110.01122.50
7.2.160.0120.00822.52
7.2.150.0170.00823.00
7.2.140.0170.00423.15
7.2.130.0150.00623.14
7.2.120.0150.00723.09
7.2.110.0200.00423.12
7.2.100.0150.00923.13
7.2.90.0180.00523.16
7.2.80.0170.00623.14
7.2.70.0150.00823.09
7.2.60.0150.00723.11
7.2.50.0130.00723.11
7.2.40.0110.00523.12
7.2.30.0120.00723.15
7.2.20.0180.00623.24
7.2.10.0190.00423.18
7.2.00.0170.00623.01

preferences:
18.65 ms | 403 KiB | 5 Q