3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function __construct() { $this->herp = 'derp'; } function bar($declared_arg) { return $this->herp; } function baz($declared_arg) { $x = $this->bar($declared_arg); var_dump(func_get_args()); var_dump($x); var_dump($declared_arg); } } (new Foo())->baz(1,2,3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nhB0G
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $0      'Foo'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'baz'
          3        SEND_VAL_EX                                              1
          4        SEND_VAL_EX                                              2
          5        SEND_VAL_EX                                              3
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nhB0G
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN_OBJ                                               'herp'
          1        OP_DATA                                                  'derp'
    6     2      > 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/nhB0G
function name:  bar
number of ops:  4
compiled vars:  !0 = $declared_arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        FETCH_OBJ_R                                      ~1      'herp'
          2      > RETURN                                                   ~1
   10     3*     > RETURN                                                   null

End of function bar

Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nhB0G
function name:  baz
number of ops:  16
compiled vars:  !0 = $declared_arg, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        INIT_METHOD_CALL                                         'bar'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !1, $2
   13     5        INIT_FCALL                                               'var_dump'
          6        FUNC_GET_ARGS                                    ~4      
          7        SEND_VAL                                                 ~4
          8        DO_ICALL                                                 
   14     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
   15    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
   16    15      > RETURN                                                   null

End of function baz

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.23 ms | 1392 KiB | 15 Q