3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function __construct(string $v) { $this->v = $v; } } $a = new A("init string"); var_dump($a->v); // fill with integer $a->v = 5; var_dump($a->v);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tHRgE
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'A'
          1        SEND_VAL_EX                                              'init+string'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   12     4        INIT_FCALL                                               'var_dump'
          5        FETCH_OBJ_R                                      ~4      !0, 'v'
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   15     8        ASSIGN_OBJ                                               !0, 'v'
          9        OP_DATA                                                  5
   16    10        INIT_FCALL                                               'var_dump'
         11        FETCH_OBJ_R                                      ~7      !0, 'v'
         12        SEND_VAL                                                 ~7
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

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

End of function __construct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.25 ms | 1004 KiB | 14 Q