3v4l.org

run code in 300+ PHP versions simultaneously
<?php $class = new ReflectionClass("ArrayObject"); $method = $class->getMethod("__construct"); foreach ($method->getParameters() as $param) { $value = $param->isDefaultValueAvailable() ? $param->getDefaultValue() : ($param->isOptional() ? null : "error"); print $param->name . " = " . var_export($value, true) . PHP_EOL; } new ArrayObject(null, null, null);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 37
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 37
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/plOeU
function name:  (null)
number of ops:  45
compiled vars:  !0 = $class, !1 = $method, !2 = $param, !3 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'ReflectionClass'
          1        SEND_VAL_EX                                              'ArrayObject'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    4     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      > FE_RESET_R                                       $10     $9, ->37
         11    > > FE_FETCH_R                                               $10, !2, ->37
    7    12    >   INIT_METHOD_CALL                                         !2, 'isDefaultValueAvailable'
         13        DO_FCALL                                      0  $11     
         14      > JMPZ                                                     $11, ->19
         15    >   INIT_METHOD_CALL                                         !2, 'getDefaultValue'
         16        DO_FCALL                                      0  $12     
         17        QM_ASSIGN                                        ~13     $12
         18      > JMP                                                      ->26
         19    >   INIT_METHOD_CALL                                         !2, 'isOptional'
         20        DO_FCALL                                      0  $14     
         21      > JMPZ                                                     $14, ->24
         22    >   QM_ASSIGN                                        ~15     null
         23      > JMP                                                      ->25
         24    >   QM_ASSIGN                                        ~15     'error'
         25    >   QM_ASSIGN                                        ~13     ~15
         26    >   ASSIGN                                                   !3, ~13
    8    27        FETCH_OBJ_R                                      ~17     !2, 'name'
         28        CONCAT                                           ~18     ~17, '+%3D+'
         29        INIT_FCALL                                               'var_export'
         30        SEND_VAR                                                 !3
         31        SEND_VAL                                                 <true>
         32        DO_ICALL                                         $19     
         33        CONCAT                                           ~20     ~18, $19
         34        CONCAT                                           ~21     ~20, '%0A'
         35        ECHO                                                     ~21
    6    36      > JMP                                                      ->11
         37    >   FE_FREE                                                  $10
   11    38        NEW                                              $22     'ArrayObject'
         39        SEND_VAL_EX                                              null
         40        SEND_VAL_EX                                              null
         41        SEND_VAL_EX                                              null
         42        DO_FCALL                                      0          
         43        FREE                                                     $22
         44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.13 ms | 1431 KiB | 14 Q