3v4l.org

run code in 300+ PHP versions simultaneously
<?php class bar { function baz() {} static function foo() {} } function foo(callable $bar) { var_dump($bar); } $closure = function () {}; foo("strpos"); foo("foo"); foo(array("bar", "baz")); foo(array("bar", "foo")); foo($closure);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8jh7W
function name:  (null)
number of ops:  18
compiled vars:  !0 = $closure
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F8jh7W%3A10%240'
          1        ASSIGN                                                   !0, ~1
   12     2        INIT_FCALL                                               'foo'
          3        SEND_VAL                                                 'strpos'
          4        DO_FCALL                                      0          
   13     5        INIT_FCALL                                               'foo'
          6        SEND_VAL                                                 'foo'
          7        DO_FCALL                                      0          
   14     8        INIT_FCALL                                               'foo'
          9        SEND_VAL                                                 <array>
         10        DO_FCALL                                      0          
   15    11        INIT_FCALL                                               'foo'
         12        SEND_VAL                                                 <array>
         13        DO_FCALL                                      0          
   16    14        INIT_FCALL                                               'foo'
         15        SEND_VAR                                                 !0
         16        DO_FCALL                                      0          
         17      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8jh7W
function name:  foo
number of ops:  5
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    9     4      > RETURN                                                   null

End of function foo

Function %00%7Bclosure%7D%2Fin%2F8jh7W%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8jh7W
function name:  {closure}
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F8jh7W%3A10%240

Class bar:
Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8jh7W
function name:  baz
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   null

End of function baz

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

End of function foo

End of class bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.58 ms | 1403 KiB | 20 Q