3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function do_foo() { $var = 'a default value'; echo "Doing foo."; echo $this->var; } } $bar = new foo; $bar -> do_foo(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gg7id
function name:  (null)
number of ops:  6
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     3        INIT_METHOD_CALL                                         !0, 'do_foo'
          4        DO_FCALL                                      0          
   14     5      > RETURN                                                   1

Class foo:
Function do_foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gg7id
function name:  do_foo
number of ops:  5
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 'a+default+value'
    7     1        ECHO                                                     'Doing+foo.'
    8     2        FETCH_OBJ_R                                      ~2      'var'
          3        ECHO                                                     ~2
    9     4      > RETURN                                                   null

End of function do_foo

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.87 ms | 1393 KiB | 13 Q