3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function decrypt($a) { $a1 = strtolower(strrev($a)); $a2 = hexdec(substr($a1,0,4)) ^ hexdec('BFF') ^ hexdec('D77D'); $a3 = substr($a1,4); $a5 = 0; unset($$ans); for($a5=0;$a5<strlen($a3);$a5+=6){ $a6 = ++$a5; } $mul=$a6 * $a6; $a7=$mul ^ hexdec('6E'); $ans = $ans . chr(octdec(hexdec(substr($a3,$a5,6))) ^ hexdec('AFE43') ^ hexdec('399AA3') ^ $a7 ^ octdec(hexdec(substr($a3,$a5,6)))); return $ans; } define('__FLAG__', 'flag{hidden_flag}'); if(decrypt($_REQUEST['pass']) == 'pwning_the_phpreverse!') { echo __FLAG__; } ?>
based on r9ZCk
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0rc3
Notice: Undefined index: pass in /in/eu3mP on line 23 Notice: Undefined variable: ans in /in/eu3mP on line 8 Notice: Undefined variable: a6 in /in/eu3mP on line 12 Notice: Undefined variable: a6 in /in/eu3mP on line 12 Notice: Undefined variable: ans in /in/eu3mP on line 15
Output for hhvm-3.15.4
Notice: Undefined index: pass in /in/eu3mP on line 23 Warning: strrev() expects parameter 1 to be string, null given in /in/eu3mP on line 4 Warning: strtolower() expects parameter 1 to be string, null given in /in/eu3mP on line 4 Warning: substr() expects parameter 1 to be string, null given in /in/eu3mP on line 5 Warning: substr() expects parameter 1 to be string, null given in /in/eu3mP on line 6 Notice: Undefined variable: ans in /in/eu3mP on line 8 Notice: Undefined variable: a6 in /in/eu3mP on line 12 Notice: Undefined variable: a6 in /in/eu3mP on line 12 Warning: substr() expects parameter 1 to be string, null given in /in/eu3mP on line 15 Warning: substr() expects parameter 1 to be string, null given in /in/eu3mP on line 15 Notice: Undefined variable: ans in /in/eu3mP on line 15