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($a2,4); $a4 = ""; $a5 = 0; for($a5=0;$a5<strlen($a3);$a5+=6){ $a6 = ++$a; } $mul=$a6 * $a6; $a7=$mul ^ $hexdec('6E'); $ans = octdec(hexdec(substr($a3,0,6))) ^ hexdec('AFE43') ^ hexdec('399AA3') ^ $a7 ^ octdec(hexdec(substr($a3,0,6))); return $a4 . chr($ans); } echo decrypt('pass'); define('__FLAG__', 'flag{hidden_flag}'); if(decrypt('pass') == 'pwning_the_phpreverse!') { __FLAG__; } ?>
based on d7djg
Output for 7.1.3 - 7.3.0rc3
Warning: A non-numeric value encountered in /in/XvZ22 on line 12 Notice: Undefined variable: hexdec in /in/XvZ22 on line 13 Fatal error: Uncaught Error: Function name must be a string in /in/XvZ22:13 Stack trace: #0 /in/XvZ22(20): decrypt('past') #1 {main} thrown in /in/XvZ22 on line 13
Process exited with code 255.
Output for 7.1.0 - 7.1.2
Warning: A non-numeric value encountered in /in/XvZ22 on line 12 Warning: A non-numeric value encountered in /in/XvZ22 on line 12 Notice: Undefined variable: hexdec in /in/XvZ22 on line 13 Fatal error: Uncaught Error: Function name must be a string in /in/XvZ22:13 Stack trace: #0 /in/XvZ22(20): decrypt('past') #1 {main} thrown in /in/XvZ22 on line 13
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Notice: Undefined variable: hexdec in /in/XvZ22 on line 13 Fatal error: Uncaught Error: Function name must be a string in /in/XvZ22:13 Stack trace: #0 /in/XvZ22(20): decrypt('past') #1 {main} thrown in /in/XvZ22 on line 13
Process exited with code 255.
Output for hhvm-3.15.4
Notice: Undefined variable: hexdec in /in/XvZ22 on line 13 Fatal error: Uncaught Error: Function name must be a string in /in/XvZ22:13 Stack trace: #0 /in/XvZ22(20): decrypt() #1 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Notice: Undefined variable: hexdec in /in/XvZ22 on line 13 Fatal error: Function name must be a string in /in/XvZ22 on line 13
Process exited with code 255.