3v4l.org

run code in 500+ PHP versions simultaneously
<?php class x { private string $p = 'a' { get => 'c'; set => $value; } } $x = new x; $b = $x->f = 'b'; print_r($x->f); print_r($b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bD8OB
function name:  (null)
number of ops:  14
compiled vars:  !0 = $x, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   NEW                                                  $2      'x'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
   11     3        ASSIGN_OBJ                                           ~5      !0, 'f'
          4        OP_DATA                                                      'b'
          5        ASSIGN                                                       !1, ~5
   13     6        INIT_FCALL                                                   'print_r'
          7        FETCH_OBJ_R                                          ~7      !0, 'f'
          8        SEND_VAL                                                     ~7
          9        DO_ICALL                                                     
   14    10        INIT_FCALL                                                   'print_r'
         11        SEND_VAR                                                     !1
         12        DO_ICALL                                                     
         13      > RETURN                                                       1

Class x: [no user functions]
Property :
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bD8OB
function name:  $p::get
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                       'c'
          1*       VERIFY_RETURN_TYPE                                           
          2*     > RETURN                                                       null

End of property :

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

End of property :

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
136.12 ms | 1107 KiB | 14 Q