3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(Callable $a) { echo "called\n"; } class A { private function foo1() {} public function foo2() {} } foo([new A, 'foo2']); foo([new A, 'foo2']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9Q21r
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'foo'
          1        NEW                                              $0      'A'
          2        DO_FCALL                                      0          
          3        INIT_ARRAY                                       ~2      $0
          4        ADD_ARRAY_ELEMENT                                ~2      'foo2'
          5        SEND_VAL                                                 ~2
          6        DO_FCALL                                      0          
   15     7        INIT_FCALL                                               'foo'
          8        NEW                                              $4      'A'
          9        DO_FCALL                                      0          
         10        INIT_ARRAY                                       ~6      $4
         11        ADD_ARRAY_ELEMENT                                ~6      'foo2'
         12        SEND_VAL                                                 ~6
         13        DO_FCALL                                      0          
         14      > RETURN                                                   1

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

End of function foo

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

End of function foo1

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

End of function foo2

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.25 ms | 1399 KiB | 15 Q