3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function __construct () { $this->bar('1'); } private function bar ( $param ) { echo 'Called function foo:bar('.$param.');<br>'; } } $foo = new foo(); call_user_func_array( array( $foo , 'bar' ) , array( '2' ) ); $foo->bar('3');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7b1CR
function name:  (null)
number of ops:  13
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     3        INIT_ARRAY                                       ~4      !0
          4        ADD_ARRAY_ELEMENT                                ~4      'bar'
          5        INIT_USER_CALL                                0          'call_user_func_array', ~4
          6        SEND_ARRAY                                               <array>
          7        CHECK_UNDEF_ARGS                                         
          8        DO_FCALL                                      0          
   15     9        INIT_METHOD_CALL                                         !0, 'bar'
         10        SEND_VAL_EX                                              '3'
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Class foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7b1CR
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_METHOD_CALL                                         'bar'
          1        SEND_VAL_EX                                              '1'
          2        DO_FCALL                                      0          
    5     3      > RETURN                                                   null

End of function __construct

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7b1CR
function name:  bar
number of ops:  5
compiled vars:  !0 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        CONCAT                                           ~1      'Called+function+foo%3Abar%28', !0
          2        CONCAT                                           ~2      ~1, '%29%3B%3Cbr%3E'
          3        ECHO                                                     ~2
    8     4      > RETURN                                                   null

End of function bar

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.92 ms | 1394 KiB | 13 Q