3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(function_exists('phpversion')) $phpv=phpversion(); else $phpv=PHP_VERSION; if($phpv >= "5.2.1") $td = sys_get_temp_dir(); else $td = "/tmp"; $tmp1=$td.'/sess_'.'md5(date("YmdH"))'; $tmp2=$td.'/sess_'.'md5(date("YmdHs"))'; $tmp3=$td.'/sess_'.'md5(date("YmdHsM"))'; $cntnt="ZWNobyAncmFkaSA6RCc7"; $bb64=chr(98).chr(97).chr(115).chr(101).chr(54).chr(52).chr(95).chr(100).chr(101).chr(99).chr(111).chr(100).chr(101); $f=fopen($tmp1,"w"); fwrite($f, '<?php $g=fopen("' . $tmp2 . '","w"); fwrite($g,\'<?php $h=fopen("' . $tmp3 . '","w"); fwrite($h,"<?php " . ' . $bb64 . '("'.$cntnt.'") . ";"); fclose($h);\' ); fclose($g); ' ); fclose($f); #echo "---1--"; #echo file_get_contents($tmp1); echo "--12---"; include($tmp1); #echo file_get_contents($tmp2); echo "--23---"; include($tmp2); #echo file_get_contents($tmp3); echo "--3---"; include($tmp3); unlink($tmp1); unlink($tmp2); unlink($tmp3);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
Branch analysis from position: 15
filename:       /in/OA9Nf
function name:  (null)
number of ops:  60
compiled vars:  !0 = $phpv, !1 = $td, !2 = $tmp1, !3 = $tmp2, !4 = $tmp3, !5 = $cntnt, !6 = $bb64, !7 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'function_exists'
          1        SEND_VAL                                                 'phpversion'
          2        DO_ICALL                                         $8      
          3      > JMPZ                                                     $8, ->8
    4     4    >   INIT_FCALL                                               'phpversion'
          5        DO_ICALL                                         $9      
          6        ASSIGN                                                   !0, $9
          7      > JMP                                                      ->9
    6     8    >   ASSIGN                                                   !0, '8.0.0'
    8     9    >   IS_SMALLER_OR_EQUAL                                      '5.2.1', !0
         10      > JMPZ                                                     ~12, ->15
    9    11    >   INIT_FCALL                                               'sys_get_temp_dir'
         12        DO_ICALL                                         $13     
         13        ASSIGN                                                   !1, $13
         14      > JMP                                                      ->16
   11    15    >   ASSIGN                                                   !1, '%2Ftmp'
   13    16    >   CONCAT                                           ~16     !1, '%2Fsess_'
         17        CONCAT                                           ~17     ~16, 'md5%28date%28%22YmdH%22%29%29'
         18        ASSIGN                                                   !2, ~17
   14    19        CONCAT                                           ~19     !1, '%2Fsess_'
         20        CONCAT                                           ~20     ~19, 'md5%28date%28%22YmdHs%22%29%29'
         21        ASSIGN                                                   !3, ~20
   15    22        CONCAT                                           ~22     !1, '%2Fsess_'
         23        CONCAT                                           ~23     ~22, 'md5%28date%28%22YmdHsM%22%29%29'
         24        ASSIGN                                                   !4, ~23
   16    25        ASSIGN                                                   !5, 'ZWNobyAncmFkaSA6RCc7'
   17    26        ASSIGN                                                   !6, 'base64_decode'
   19    27        INIT_FCALL                                               'fopen'
         28        SEND_VAR                                                 !2
         29        SEND_VAL                                                 'w'
         30        DO_ICALL                                         $27     
         31        ASSIGN                                                   !7, $27
   20    32        INIT_FCALL                                               'fwrite'
         33        SEND_VAR                                                 !7
   22    34        CONCAT                                           ~29     '%3C%3Fphp%0A+++++%24g%3Dfopen%28%22', !3
         35        CONCAT                                           ~30     ~29, '%22%2C%22w%22%29%3B%0A+++++fwrite%28%24g%2C%27%3C%3Fphp%0A+++++++++++%24h%3Dfopen%28%22'
   24    36        CONCAT                                           ~31     ~30, !4
         37        CONCAT                                           ~32     ~31, '%22%2C%22w%22%29%3B%0A+++++++++++fwrite%28%24h%2C%22%3C%3Fphp+%22+.+'
   25    38        CONCAT                                           ~33     ~32, !6
         39        CONCAT                                           ~34     ~33, '%28%22'
         40        CONCAT                                           ~35     ~34, !5
         41        CONCAT                                           ~36     ~35, '%22%29+.+%22%3B%22%29%3B%0A+++++++++++fclose%28%24h%29%3B%27+%0A+++%29%3B%0A+++++fclose%28%24g%29%3B%0A'
         42        SEND_VAL                                                 ~36
         43        DO_ICALL                                                 
   31    44        INIT_FCALL                                               'fclose'
         45        SEND_VAR                                                 !7
         46        DO_ICALL                                                 
   35    47        INCLUDE_OR_EVAL                                          !2, INCLUDE
   37    48        INCLUDE_OR_EVAL                                          !3, INCLUDE
   39    49        INCLUDE_OR_EVAL                                          !4, INCLUDE
   40    50        INIT_FCALL                                               'unlink'
         51        SEND_VAR                                                 !2
         52        DO_ICALL                                                 
   41    53        INIT_FCALL                                               'unlink'
         54        SEND_VAR                                                 !3
         55        DO_ICALL                                                 
   42    56        INIT_FCALL                                               'unlink'
         57        SEND_VAR                                                 !4
         58        DO_ICALL                                                 
         59      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.27 ms | 1400 KiB | 27 Q