3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { public function __construct(public readonly int $bar) {} public function __set($var, $val) { echo '__set called'; } } $foo = new Foo(42); $foo->bar = 69;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8PioE
function name:  (null)
number of ops:  7
compiled vars:  !0 = $foo
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   NEW                                                  $1      'Foo'
          1        SEND_VAL_EX                                                  42
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $1
   12     4        ASSIGN_OBJ                                                   !0, 'bar'
          5        OP_DATA                                                      69
   13     6      > RETURN                                                       1

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

End of function __construct

Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8PioE
function name:  __set
number of ops:  4
compiled vars:  !0 = $var, !1 = $val
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    7     2        ECHO                                                         '__set+called'
    8     3      > RETURN                                                       null

End of function __set

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
156.25 ms | 1596 KiB | 13 Q