3v4l.org

run code in 500+ PHP versions simultaneously
<?php class X { public static int $int = 1; public string $string = 'abc'; } function foo() { $foo = new X(); $varString = &$foo->string; $varString = []; //Cannot assign array to reference held by property X::$string of type string $varInt = &X::$int; $varInt = 'abc'; //Cannot assign string to reference held by property X::$int of type int } foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H1uAS
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   21     0  E >   INIT_FCALL                                                   'foo'
          1        DO_FCALL                                          0          
          2      > RETURN                                                       1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H1uAS
function name:  foo
number of ops:  10
compiled vars:  !0 = $foo, !1 = $varString, !2 = $varInt
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   NEW                                                  $3      'X'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $3
   11     3        FETCH_OBJ_W                                          $6      !0, 'string'
          4        ASSIGN_REF                                                   !1, $6
   12     5        ASSIGN                                                       !1, <array>
   16     6        FETCH_STATIC_PROP_W              unknown             $9      'int'
          7        ASSIGN_REF                                                   !2, $9
   17     8        ASSIGN                                                       !2, 'abc'
   19     9      > RETURN                                                       null

End of function foo

Class X: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.27 ms | 1485 KiB | 14 Q