3v4l.org

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

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

End of function __construct

End of class Foo.

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

End of function __construct

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.67 ms | 1396 KiB | 15 Q