3v4l.org

run code in 500+ PHP versions simultaneously
<?php class X { public string $p { set(string|A|null $value) { $this->p = (string) $value; } get => $this-p . ' more'; } } class A { function __toString() { return 'abc'; } } $x = new X; $x->p = new A;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vuKfQ
function name:  (null)
number of ops:  9
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   DECLARE_CLASS                                                'a'
   20     1        NEW                                                  $1      'X'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $1
   21     4        NEW                                                  $5      'A'
          5        DO_FCALL                                          0          
          6        ASSIGN_OBJ                                                   !0, 'p'
          7        OP_DATA                                                      $5
   22     8      > RETURN                                                       1

Class X: [no user functions]
Property p:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vuKfQ
function name:  $p::get
number of ops:  8
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   FETCH_THIS                                           ~0      
          1        FETCH_CONSTANT                                       ~1      'p'
          2        SUB                                                  ~2      ~0, ~1
          3        CONCAT                                               ~3      ~2, '+more'
          4        VERIFY_RETURN_TYPE                                           ~3
          5      > RETURN                                                       ~3
          6*       VERIFY_RETURN_TYPE                                           
          7*     > RETURN                                                       null

End of property p:

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

End of property p:

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

End of function __tostring

End of class A.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
153.29 ms | 543 KiB | 8 Q