3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pdo = new ReflectionClass('MongoClient'); $constructor = $pdo->getMethod('__construct'); $parameters = $constructor->getParameters(); $option = $parameters[3]; var_dump($option->isOptional());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Ds0t
function name:  (null)
number of ops:  19
compiled vars:  !0 = $pdo, !1 = $constructor, !2 = $parameters, !3 = $option
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $4      'ReflectionClass'
          1        SEND_VAL_EX                                              'MongoClient'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    5     4        INIT_METHOD_CALL                                         !0, 'getMethod'
          5        SEND_VAL_EX                                              '__construct'
          6        DO_FCALL                                      0  $7      
          7        ASSIGN                                                   !1, $7
    6     8        INIT_METHOD_CALL                                         !1, 'getParameters'
          9        DO_FCALL                                      0  $9      
         10        ASSIGN                                                   !2, $9
    7    11        FETCH_DIM_R                                      ~11     !2, 3
         12        ASSIGN                                                   !3, ~11
    9    13        INIT_FCALL                                               'var_dump'
         14        INIT_METHOD_CALL                                         !3, 'isOptional'
         15        DO_FCALL                                      0  $13     
         16        SEND_VAR                                                 $13
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.41 ms | 1394 KiB | 15 Q