3v4l.org

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


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

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.31 ms | 1589 KiB | 14 Q