3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myfile = fopen("newfile.php", "w") or die("Unable to open file!"); $txt = "<?php require('fpdf.php'); \$pdf = new FPDF(); \$pdf->AddPage(); \$pdf->SetFont('Arial','B',16); \$pdf->Cell(40,10,'{$_POST['customerName']}'); \$pdf->Output(); ?>"; echo $txt; fwrite($myfile, $txt); $txt = "Minnie Mouse\n"; fwrite($myfile, $txt); fclose($myfile); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pId8H
function name:  (null)
number of ops:  28
compiled vars:  !0 = $myfile, !1 = $txt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'fopen'
          1        SEND_VAL                                                 'newfile.php'
          2        SEND_VAL                                                 'w'
          3        DO_ICALL                                         $2      
          4        ASSIGN                                           ~3      !0, $2
          5      > JMPNZ_EX                                         ~3      ~3, ->8
          6    > > EXIT                                                     'Unable+to+open+file%21'
          7*       BOOL                                             ~3      <true>
    3     8    >   ROPE_INIT                                     3  ~7      '%3C%3Fphp%0Arequire%28%27fpdf.php%27%29%3B%0A%24pdf+%3D+new+FPDF%28%29%3B%0A%24pdf-%3EAddPage%28%29%3B%0A%24pdf-%3ESetFont%28%27Arial%27%2C%27B%27%2C16%29%3B%0A%24pdf-%3ECell%2840%2C10%2C%27'
    8     9        FETCH_R                      global              ~4      '_POST'
         10        FETCH_DIM_R                                      ~5      ~4, 'customerName'
         11        ROPE_ADD                                      1  ~7      ~7, ~5
         12        ROPE_END                                      2  ~6      ~7, '%27%29%3B%0A%24pdf-%3EOutput%28%29%3B%0A%3F%3E'
    3    13        ASSIGN                                                   !1, ~6
   11    14        ECHO                                                     !1
   12    15        INIT_FCALL                                               'fwrite'
         16        SEND_VAR                                                 !0
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
   13    19        ASSIGN                                                   !1, 'Minnie+Mouse%0A'
   14    20        INIT_FCALL                                               'fwrite'
         21        SEND_VAR                                                 !0
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                                 
   15    24        INIT_FCALL                                               'fclose'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                                 
   16    27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.5 ms | 1396 KiB | 19 Q