3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X{} function f(?X $x) {} $r = new ReflectionFunction('f'); $p = $r->getParameters()[0]; var_dump($p->getTypehintText(), $p->getTypeText());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XE9a6
function name:  (null)
number of ops:  17
compiled vars:  !0 = $r, !1 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $2      'ReflectionFunction'
          1        SEND_VAL_EX                                              'f'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    6     4        INIT_METHOD_CALL                                         !0, 'getParameters'
          5        DO_FCALL                                      0  $5      
          6        FETCH_DIM_R                                      ~6      $5, 0
          7        ASSIGN                                                   !1, ~6
    7     8        INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !1, 'getTypehintText'
         10        DO_FCALL                                      0  $8      
         11        SEND_VAR                                                 $8
         12        INIT_METHOD_CALL                                         !1, 'getTypeText'
         13        DO_FCALL                                      0  $9      
         14        SEND_VAR                                                 $9
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XE9a6
function name:  f
number of ops:  2
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function f

Class X: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.62 ms | 1395 KiB | 15 Q