3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { private $name; public function __construct(string $name) { $this->name = $name; } public function __toString() { return $this->name; } } function f(string $a, C $b, int $c) : void { var_dump($a, $b, $c); } $a = new C('a'); $b = new C('b'); $c = new C('c'); f($a, $b, $c);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4lKFF
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'c'
   20     1        NEW                                              $3      'C'
          2        SEND_VAL_EX                                              'a'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $3
   21     5        NEW                                              $6      'C'
          6        SEND_VAL_EX                                              'b'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $6
   22     9        NEW                                              $9      'C'
         10        SEND_VAL_EX                                              'c'
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !2, $9
   24    13        INIT_FCALL                                               'f'
         14        SEND_VAR                                                 !0
         15        SEND_VAR                                                 !1
         16        SEND_VAR                                                 !2
         17        DO_FCALL                                      0          
         18      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4lKFF
function name:  f
number of ops:  9
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   17     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                                 
   18     8      > RETURN                                                   null

End of function f

Class C:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4lKFF
function name:  __construct
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN_OBJ                                               'name'
          2        OP_DATA                                                  !0
    8     3      > RETURN                                                   null

End of function __construct

Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4lKFF
function name:  __toString
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   FETCH_OBJ_R                                      ~0      'name'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
   12     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function __tostring

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.04 ms | 1403 KiB | 16 Q