3v4l.org

run code in 300+ PHP versions simultaneously
<?php //initial test setup mkdir($a = sys_get_temp_dir() . '/A'); mkdir($b = sys_get_temp_dir() . '/A/B'); mkdir($c = sys_get_temp_dir() . '/A/B/C'); $template = <<<EOL <?php var_dump(__FILE__); EOL; $incTemplate = <<<EOL <?php include '../do_a.php'; include '../do_b.php'; EOL; file_put_contents($b . '/do_a.php', $template); file_put_contents($b . '/do_b.php', $template); file_put_contents($c . '/do.php', $incTemplate); ini_set('display_errors', 'on'); ini_set('error_reporting', -1); //end test setup if ($doAllThings = realpath($c . '/do.php')) { include $doAllThings; //warnings echo '---------------------' . PHP_EOL; chdir(dirname($doAllThings)); include $doAllThings; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 52, Position 2 = 61
Branch analysis from position: 52
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 61
filename:       /in/D0Tn6
function name:  (null)
number of ops:  62
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $template, !4 = $incTemplate, !5 = $doAllThings
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'mkdir'
          1        INIT_FCALL                                               'sys_get_temp_dir'
          2        DO_ICALL                                         $6      
          3        CONCAT                                           ~7      $6, '%2FA'
          4        ASSIGN                                           ~8      !0, ~7
          5        SEND_VAL                                                 ~8
          6        DO_ICALL                                                 
    6     7        INIT_FCALL                                               'mkdir'
          8        INIT_FCALL                                               'sys_get_temp_dir'
          9        DO_ICALL                                         $10     
         10        CONCAT                                           ~11     $10, '%2FA%2FB'
         11        ASSIGN                                           ~12     !1, ~11
         12        SEND_VAL                                                 ~12
         13        DO_ICALL                                                 
    7    14        INIT_FCALL                                               'mkdir'
         15        INIT_FCALL                                               'sys_get_temp_dir'
         16        DO_ICALL                                         $14     
         17        CONCAT                                           ~15     $14, '%2FA%2FB%2FC'
         18        ASSIGN                                           ~16     !2, ~15
         19        SEND_VAL                                                 ~16
         20        DO_ICALL                                                 
    9    21        ASSIGN                                                   !3, '%3C%3Fphp%0Avar_dump%28__FILE__%29%3B'
   14    22        ASSIGN                                                   !4, '%3C%3Fphp+%0Ainclude+%27..%2Fdo_a.php%27%3B%0Ainclude+%27..%2Fdo_b.php%27%3B'
   20    23        INIT_FCALL                                               'file_put_contents'
         24        CONCAT                                           ~20     !1, '%2Fdo_a.php'
         25        SEND_VAL                                                 ~20
         26        SEND_VAR                                                 !3
         27        DO_ICALL                                                 
   21    28        INIT_FCALL                                               'file_put_contents'
         29        CONCAT                                           ~22     !1, '%2Fdo_b.php'
         30        SEND_VAL                                                 ~22
         31        SEND_VAR                                                 !3
         32        DO_ICALL                                                 
   22    33        INIT_FCALL                                               'file_put_contents'
         34        CONCAT                                           ~24     !2, '%2Fdo.php'
         35        SEND_VAL                                                 ~24
         36        SEND_VAR                                                 !4
         37        DO_ICALL                                                 
   24    38        INIT_FCALL                                               'ini_set'
         39        SEND_VAL                                                 'display_errors'
         40        SEND_VAL                                                 'on'
         41        DO_ICALL                                                 
   25    42        INIT_FCALL                                               'ini_set'
         43        SEND_VAL                                                 'error_reporting'
         44        SEND_VAL                                                 -1
         45        DO_ICALL                                                 
   31    46        INIT_FCALL                                               'realpath'
         47        CONCAT                                           ~28     !2, '%2Fdo.php'
         48        SEND_VAL                                                 ~28
         49        DO_ICALL                                         $29     
         50        ASSIGN                                           ~30     !5, $29
         51      > JMPZ                                                     ~30, ->61
   32    52    >   INCLUDE_OR_EVAL                                          !5, INCLUDE
   34    53        ECHO                                                     '---------------------%0A'
   36    54        INIT_FCALL                                               'chdir'
         55        INIT_FCALL                                               'dirname'
         56        SEND_VAR                                                 !5
         57        DO_ICALL                                         $32     
         58        SEND_VAR                                                 $32
         59        DO_ICALL                                                 
   38    60        INCLUDE_OR_EVAL                                          !5, INCLUDE
   39    61    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.99 ms | 1017 KiB | 20 Q