3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Point { public function __construct( public float $x, public float $y = 0.0, public float $z = 0.0, ) {} } foreach ((new ReflectionClass(Point::class))->getProperties() as $property) { var_dump($property->name); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/JsbXT
function name:  (null)
number of ops:  14
compiled vars:  !0 = $property
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'ReflectionClass'
          1        SEND_VAL_EX                                              'Point'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $1, 'getProperties'
          4        DO_FCALL                                      0  $3      
          5      > FE_RESET_R                                       $4      $3, ->12
          6    > > FE_FETCH_R                                               $4, !0, ->12
   12     7    >   INIT_FCALL                                               'var_dump'
          8        FETCH_OBJ_R                                      ~5      !0, 'name'
          9        SEND_VAL                                                 ~5
         10        DO_ICALL                                                 
   11    11      > JMP                                                      ->6
         12    >   FE_FREE                                                  $4
   13    13      > RETURN                                                   1

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

End of function __construct

End of class Point.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.32 ms | 1011 KiB | 14 Q