3v4l.org

run code in 300+ PHP versions simultaneously
<?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__; } ?>
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /in/63l75 on line 5 Fatal error: Uncaught TypeError: Unsupported operand types: string * string in /in/63l75:12 Stack trace: #0 /in/63l75(20): decrypt('past') #1 {main} thrown in /in/63l75 on line 12
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /in/63l75 on line 5 Fatal error: Uncaught TypeError: Unsupported operand types: string * string in /in/63l75:12 Stack trace: #0 /in/63l75(20): decrypt('past') #1 {main} thrown in /in/63l75 on line 12
Process exited with code 255.
Output for 7.4.0 - 7.4.25, 7.4.27 - 7.4.33
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /in/63l75 on line 5 Warning: A non-numeric value encountered in /in/63l75 on line 12 � Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /in/63l75 on line 5 Warning: A non-numeric value encountered in /in/63l75 on line 12
Output for 7.1.3 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.26
Warning: A non-numeric value encountered in /in/63l75 on line 12 � Warning: A non-numeric value encountered in /in/63l75 on line 12
Output for 7.1.0 - 7.1.2
Warning: A non-numeric value encountered in /in/63l75 on line 12 Warning: A non-numeric value encountered in /in/63l75 on line 12 � Warning: A non-numeric value encountered in /in/63l75 on line 12 Warning: A non-numeric value encountered in /in/63l75 on line 12
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33

preferences:
222.37 ms | 402 KiB | 291 Q