3v4l.org

run code in 500+ PHP versions simultaneously
<?php if ((new ReflectionParameter(['DateInterval', '__construct'], 0))->isOptional()) { echo 'optional'; } else { echo 'non optional'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HBIB5
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $0      'ReflectionParameter'
          1        SEND_VAL_EX                                                  <array>
          2        SEND_VAL_EX                                                  0
          3        DO_FCALL                                          0          
          4        INIT_METHOD_CALL                                             $0, 'isOptional'
          5        DO_FCALL                                          0  $2      
          6      > JMPZ                                                         $2, ->9
    4     7    >   ECHO                                                         'optional'
    3     8      > JMP                                                          ->10
    6     9    >   ECHO                                                         'non+optional'
    7    10    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
242.45 ms | 3294 KiB | 13 Q