3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo; class Runner { function run($path) { eval($path); } } $a = new Runner(); $a = new Runner(); $a->run("echo \"One\n\";\n"); $a->run("namespace Bar;\n\necho \"Two\n\";\n"); $a->run("?><?php\necho \"Three\n\";\n"); $a->run("?><?php\nnamespace Bar;\n\necho \"Four\n\";\n");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H8Z9u
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'Foo%5CRunner'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   12     3        NEW                                              $4      'Foo%5CRunner'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $4
   13     6        INIT_METHOD_CALL                                         !0, 'run'
          7        SEND_VAL_EX                                              'echo+%22One%0A%22%3B%0A'
          8        DO_FCALL                                      0          
   14     9        INIT_METHOD_CALL                                         !0, 'run'
         10        SEND_VAL_EX                                              'namespace+Bar%3B%0A%0Aecho+%22Two%0A%22%3B%0A'
         11        DO_FCALL                                      0          
   15    12        INIT_METHOD_CALL                                         !0, 'run'
         13        SEND_VAL_EX                                              '%3F%3E%3C%3Fphp%0Aecho+%22Three%0A%22%3B%0A'
         14        DO_FCALL                                      0          
   16    15        INIT_METHOD_CALL                                         !0, 'run'
         16        SEND_VAL_EX                                              '%3F%3E%3C%3Fphp%0Anamespace+Bar%3B%0A%0Aecho+%22Four%0A%22%3B%0A'
         17        DO_FCALL                                      0          
         18      > RETURN                                                   1

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

End of function run

End of class Foo\Runner.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.79 ms | 1398 KiB | 13 Q