3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $b; function __construct() { $this->b = new B; } function __call($method, $args) { $this->b->$method(...$args); } } class B { function work($p1, $p2, $p3) { var_dump($p1, $p2, $p3); } } (new B)->work(1, 2, 3); (new A)->work(4, 5, 6); (new A)->not();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eoXCP
function name:  (null)
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $0      'B'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'work'
          3        SEND_VAL_EX                                              1
          4        SEND_VAL_EX                                              2
          5        SEND_VAL_EX                                              3
          6        DO_FCALL                                      0          
   15     7        NEW                                              $3      'A'
          8        DO_FCALL                                      0          
          9        INIT_METHOD_CALL                                         $3, 'work'
         10        SEND_VAL_EX                                              4
         11        SEND_VAL_EX                                              5
         12        SEND_VAL_EX                                              6
         13        DO_FCALL                                      0          
   16    14        NEW                                              $6      'A'
         15        DO_FCALL                                      0          
         16        INIT_METHOD_CALL                                         $6, 'not'
         17        DO_FCALL                                      0          
         18      > RETURN                                                   1

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eoXCP
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'b'
          3        OP_DATA                                                  $1
          4      > RETURN                                                   null

End of function __construct

Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eoXCP
function name:  __call
number of ops:  8
compiled vars:  !0 = $method, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_OBJ_R                                      ~2      'b'
          3        INIT_METHOD_CALL                                         ~2, !0
          4        SEND_UNPACK                                              !1
          5        CHECK_UNDEF_ARGS                                         
          6        DO_FCALL                                      1          
          7      > RETURN                                                   null

End of function __call

End of class A.

Class B:
Function work:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eoXCP
function name:  work
number of ops:  9
compiled vars:  !0 = $p1, !1 = $p2, !2 = $p3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                                 
          8      > RETURN                                                   null

End of function work

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.2 ms | 1400 KiB | 15 Q