3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ref = new ReflectionFunction('gmmktime'); $params = $ref->getParameters(); var_dump(reset($params)->isOptional(), reset($params)->isDefaultValueAvailable());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EcLgr
function name:  (null)
number of ops:  22
compiled vars:  !0 = $ref, !1 = $params
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'ReflectionFunction'
          1        SEND_VAL_EX                                              'gmmktime'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    4     4        INIT_METHOD_CALL                                         !0, 'getParameters'
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !1, $5
    6     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'reset'
          9        SEND_REF                                                 !1
         10        DO_ICALL                                         $7      
         11        INIT_METHOD_CALL                                         $7, 'isOptional'
         12        DO_FCALL                                      0  $8      
         13        SEND_VAR                                                 $8
         14        INIT_FCALL                                               'reset'
         15        SEND_REF                                                 !1
         16        DO_ICALL                                         $9      
         17        INIT_METHOD_CALL                                         $9, 'isDefaultValueAvailable'
         18        DO_FCALL                                      0  $10     
         19        SEND_VAR                                                 $10
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.33 ms | 1395 KiB | 17 Q