3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * PHP profile is a PHP profiling tool for your Web applications. * Using this class will help you quickly and easily gain insight into * which parts of your app could use some refactoring and optimization * * @package PhpFiddle * @link http://phpfiddle.org * @since 2012 */ require_once "profile.php"; class utils { public static function rc4($key, $str) { $s = array(); for ($i = 0; $i < 256; $i++) { $s[$i] = $i; } $j = 0; for ($i = 0; $i < 256; $i++) { $j = ($j + $s[$i] + ord($key[$i % strlen($key)])) % 256; $x = $s[$i]; $s[$i] = $s[$j]; $s[$j] = $x; } $i = 0; $j = 0; $res = ''; for ($y = 0; $y < strlen($str); $y++) { $i = ($i + 1) % 256; $j = ($j + $s[$i]) % 256; $x = $s[$i]; $s[$i] = $s[$j]; $s[$j] = $x; $res .= $str[$y] ^ chr($s[($s[$i] + $s[$j]) % 256]); } return $res; } } echo "<h1>Hello, PHP!</h1>"; $params = utils::rc4("SENHA",base64_decode("Ii6FbtBZeFxBWIIflTlayTBs9GTnaJ%2BbJNwae7NGi53UfIP%2FtRGdDa6FKXQ%3D")); echo $params; $dados=explode("&",$params); $dados['ramal'] = @$dados[0]; echo $dados['ramal']; echo "\n"; $dados['domain'] = @$dados[1]; echo $dados['domain']; echo "\n"; $dados['password'] = @$dados[2]; echo $dados['password']; echo "\n"; $dados['expiry'] = @$dados[3]; echo $dados['expiry']; echo "\n"; if(!isset($dados['domain'])){ echo "Não foi possivel validar o acesso!<br>Feche a janela e tente novamente."; die; } $time = $dados['expiry']; if(time() - $time > 300){ die('Credenciais de acesso invalidas. Recarregue a pagina e tente novamente.'); } ?>
Output for 7.1.20, 7.2.6
Warning: require_once(): open_basedir restriction in effect. File(profile.php) is not within the allowed path(s): (/tmp:/in) in /in/5ASEr on line 13 Warning: require_once(profile.php): failed to open stream: Operation not permitted in /in/5ASEr on line 13 Fatal error: require_once(): Failed opening required 'profile.php' (include_path='.:') in /in/5ASEr on line 13
Process exited with code 255.
Output for 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0
Warning: require_once(profile.php): failed to open stream: No such file or directory in /in/5ASEr on line 13 Fatal error: require_once(): Failed opening required 'profile.php' (include_path='.:') in /in/5ASEr on line 13
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Warning: main(profile.php): failed to open stream: No such file or directory in /in/5ASEr on line 13 Fatal error: main(): Failed opening required 'profile.php' (include_path='.:') in /in/5ASEr on line 13
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/5ASEr on line 16
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/5ASEr on line 16
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/5ASEr on line 16
Process exited with code 255.

preferences:
178.09 ms | 401 KiB | 217 Q