3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $v = null; public function test() { var_dump( $this->v ); } } class Bar extends Foo { public function gert($id) { $this->v = $id; call_user_func_array(array('parent', 'test'), func_get_args()); call_user_func_array(array($this, 'parent::test'), func_get_args()); } } $gert = new Bar(); $gert->gert(1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/N8A92
function name:  (null)
number of ops:  7
compiled vars:  !0 = $gert
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'Bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_METHOD_CALL                                         !0, 'gert'
          4        SEND_VAL_EX                                              1
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class Foo:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/N8A92
function name:  test
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_OBJ_R                                      ~0      'v'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
    7     4      > RETURN                                                   null

End of function test

End of class Foo.

Class Bar:
Function gert:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/N8A92
function name:  gert
number of ops:  17
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        ASSIGN_OBJ                                               'v'
          2        OP_DATA                                                  !0
   13     3        INIT_USER_CALL                                0          'call_user_func_array', <array>
          4        FUNC_GET_ARGS                                    ~2      
          5        SEND_ARRAY                                               ~2
          6        CHECK_UNDEF_ARGS                                         
          7        DO_FCALL                                      0          
   14     8        FETCH_THIS                                       ~4      
          9        INIT_ARRAY                                       ~5      ~4
         10        ADD_ARRAY_ELEMENT                                ~5      'parent%3A%3Atest'
         11        INIT_USER_CALL                                0          'call_user_func_array', ~5
         12        FUNC_GET_ARGS                                    ~6      
         13        SEND_ARRAY                                               ~6
         14        CHECK_UNDEF_ARGS                                         
         15        DO_FCALL                                      0          
   15    16      > RETURN                                                   null

End of function gert

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/N8A92
function name:  test
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_OBJ_R                                      ~0      'v'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
    7     4      > RETURN                                                   null

End of function test

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.91 ms | 1400 KiB | 15 Q