3v4l.org

run code in 500+ PHP versions simultaneously
<?php $result = new class('Ivan', 12) { public function __construct( public string $name, public int $age, ) { } }; var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lvV5h
function name:  (null)
number of ops:  10
compiled vars:  !0 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                                   <undef> 
          1        NEW                                                  $2      $1
          2        SEND_VAL_EX                                                  'Ivan'
          3        SEND_VAL_EX                                                  12
          4        DO_FCALL                                          0          
          5        ASSIGN                                                       !0, $2
   13     6        INIT_FCALL                                                   'var_dump'
          7        SEND_VAR                                                     !0
          8        DO_ICALL                                                     
          9      > RETURN                                                       1

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

End of function __construct

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.67 ms | 1656 KiB | 13 Q