3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestClass { public function __construct( public readonly string $myString, public readonly int $myInt, public readonly array $myArray ) {} } $arr = [ 'myString' => "I am a string", 'myInt' => 123, 'myArray' => [], ]; new TestClass(...$arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Jj47T
function name:  (null)
number of ops:  7
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, <array>
   18     1        NEW                                              $2      'TestClass'
          2        SEND_UNPACK                                              !0
          3        CHECK_UNDEF_ARGS                                         
          4        DO_FCALL                                      1          
          5        FREE                                                     $2
          6      > RETURN                                                   1

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

End of function __construct

End of class TestClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.17 ms | 1001 KiB | 13 Q