3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { function foo() { print "foo\n"; } function bar() { $this->baz(function() { $this->foo(); }); } function baz($func) { $func(); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jVBQ3
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FjVBQ3%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jVBQ3
function name:  {closure}
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_THIS                                       $0      
          1        INIT_METHOD_CALL                                         $0, 'foo'
          2        DO_FCALL                                      0          
   11     3      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FjVBQ3%3A9%240

Class a:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jVBQ3
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'foo%0A'
    6     1      > RETURN                                                   null

End of function foo

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jVBQ3
function name:  bar
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_METHOD_CALL                                         'baz'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FjVBQ3%3A9%240'
   11     2        SEND_VAL_EX                                              ~0
          3        DO_FCALL                                      0          
   13     4      > RETURN                                                   null

End of function bar

Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jVBQ3
function name:  baz
number of ops:  4
compiled vars:  !0 = $func
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   16     1        INIT_DYNAMIC_CALL                                        !0
          2        DO_FCALL                                      0          
   17     3      > RETURN                                                   null

End of function baz

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.84 ms | 1399 KiB | 13 Q