3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function bar($file) { include $file; } } $content = '<?php var_dump($this);'; $file = '/tmp/include-test-' . basename(__FILE__); file_put_contents($file, $content); Foo::bar($file);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nlCuU
function name:  (null)
number of ops:  14
compiled vars:  !0 = $content, !1 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, '%3C%3Fphp+var_dump%28%24this%29%3B'
   13     1        INIT_FCALL                                               'basename'
          2        SEND_VAL                                                 '%2Fin%2FnlCuU'
          3        DO_ICALL                                         $3      
          4        CONCAT                                           ~4      '%2Ftmp%2Finclude-test-', $3
          5        ASSIGN                                                   !1, ~4
   14     6        INIT_FCALL                                               'file_put_contents'
          7        SEND_VAR                                                 !1
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   16    10        INIT_STATIC_METHOD_CALL                                  'Foo', 'bar'
         11        SEND_VAR                                                 !1
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nlCuU
function name:  bar
number of ops:  3
compiled vars:  !0 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        INCLUDE_OR_EVAL                                          !0, INCLUDE
    8     2      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.08 ms | 1405 KiB | 17 Q