3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $rc = new ReflectionClass('Exception'); $rps = $rc->getConstructor()->getParameters(); foreach ($rps as $rp) { echo '$', $rp->getName(), PHP_EOL; echo "\t isOptional : ", var_export($rp->isOptional(), true), PHP_EOL; echo "\t isDefaultValueAvailable : ", var_export($rp->isDefaultValueAvailable(), true), PHP_EOL; if ($rp->isDefaultValueAvailable()) { echo "\t getDefaultValue : ", var_export($rp->getDefaultValue(), true), PHP_EOL; } echo PHP_EOL, PHP_EOL; }
based on nXQ38
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 10, Position 2 = 49
Branch analysis from position: 10
Jump found. Position 1 = 11, Position 2 = 49
Branch analysis from position: 11
Jump found. Position 1 = 37, Position 2 = 46
Branch analysis from position: 37
Jump found. Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 46
Branch analysis from position: 49
Jump found. Position 1 = -2
Branch analysis from position: 49
filename:       /in/BSofi
function name:  (null)
number of ops:  51
compiled vars:  !0 = $rc, !1 = $rps, !2 = $rp
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   NEW                                              $3      :-6
         1        SEND_VAL_EX                                              'Exception'
         2        DO_FCALL                                      0          
         3        ASSIGN                                                   !0, $3
   3     4        INIT_METHOD_CALL                                         !0, 'getConstructor'
         5        DO_FCALL                                      0  $6      
         6        INIT_METHOD_CALL                                         $6, 'getParameters'
         7        DO_FCALL                                      0  $7      
         8        ASSIGN                                                   !1, $7
   4     9      > FE_RESET_R                                       $9      !1, ->49
        10    > > FE_FETCH_R                                               $9, !2, ->49
   5    11    >   ECHO                                                     '%24'
        12        INIT_METHOD_CALL                                         !2, 'getName'
        13        DO_FCALL                                      0  $10     
        14        ECHO                                                     $10
        15        ECHO                                                     '%0A'
   6    16        ECHO                                                     '%09+isOptional+%3A+'
        17        INIT_FCALL                                               'var_export'
        18        INIT_METHOD_CALL                                         !2, 'isOptional'
        19        DO_FCALL                                      0  $11     
        20        SEND_VAR                                                 $11
        21        SEND_VAL                                                 <true>
        22        DO_ICALL                                         $12     
        23        ECHO                                                     $12
        24        ECHO                                                     '%0A'
   7    25        ECHO                                                     '%09+isDefaultValueAvailable+%3A+'
        26        INIT_FCALL                                               'var_export'
        27        INIT_METHOD_CALL                                         !2, 'isDefaultValueAvailable'
        28        DO_FCALL                                      0  $13     
        29        SEND_VAR                                                 $13
        30        SEND_VAL                                                 <true>
        31        DO_ICALL                                         $14     
        32        ECHO                                                     $14
        33        ECHO                                                     '%0A'
   8    34        INIT_METHOD_CALL                                         !2, 'isDefaultValueAvailable'
        35        DO_FCALL                                      0  $15     
        36      > JMPZ                                                     $15, ->46
   9    37    >   ECHO                                                     '%09+getDefaultValue+%3A+'
        38        INIT_FCALL                                               'var_export'
        39        INIT_METHOD_CALL                                         !2, 'getDefaultValue'
        40        DO_FCALL                                      0  $16     
        41        SEND_VAR                                                 $16
        42        SEND_VAL                                                 <true>
        43        DO_ICALL                                         $17     
        44        ECHO                                                     $17
        45        ECHO                                                     '%0A'
  11    46    >   ECHO                                                     '%0A'
        47        ECHO                                                     '%0A'
        48      > JMP                                                      ->10
        49    >   FE_FREE                                                  $9
        50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0