3v4l.org

run code in 300+ PHP versions simultaneously
<?php $class_names = get_declared_classes(); foreach ($class_names as $class_name) { $rc = new ReflectionClass($class_name); $constructor = $rc->getConstructor(); if ($constructor != NULL) { $params = $constructor->getParameters(); echo "new $class_name("; foreach ($params as $param) { $name = $param->getName(); $opt = $param->isOptional(); if ($opt) { echo "[$name], "; } else { echo "$name, "; } } if (empty($params)) { echo "[none or dynamic]"; } echo ")\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 45
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 45
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 44
Branch analysis from position: 14
2 jumps found. (Code = 77) Position 1 = 22, Position 2 = 39
Branch analysis from position: 22
2 jumps found. (Code = 78) Position 1 = 23, Position 2 = 39
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 35
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 42, Position 2 = 43
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 43
Branch analysis from position: 39
Branch analysis from position: 44
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 45
filename:       /in/2JEGF
function name:  (null)
number of ops:  47
compiled vars:  !0 = $class_names, !1 = $class_name, !2 = $rc, !3 = $constructor, !4 = $params, !5 = $param, !6 = $name, !7 = $opt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'get_declared_classes'
          1        DO_ICALL                                         $8      
          2        ASSIGN                                                   !0, $8
    5     3      > FE_RESET_R                                       $10     !0, ->45
          4    > > FE_FETCH_R                                               $10, !1, ->45
    6     5    >   NEW                                              $11     'ReflectionClass'
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $11
    7     9        INIT_METHOD_CALL                                         !2, 'getConstructor'
         10        DO_FCALL                                      0  $14     
         11        ASSIGN                                                   !3, $14
    9    12        IS_NOT_EQUAL                                             !3, null
         13      > JMPZ                                                     ~16, ->44
   10    14    >   INIT_METHOD_CALL                                         !3, 'getParameters'
         15        DO_FCALL                                      0  $17     
         16        ASSIGN                                                   !4, $17
   12    17        ROPE_INIT                                     3  ~20     'new+'
         18        ROPE_ADD                                      1  ~20     ~20, !1
         19        ROPE_END                                      2  ~19     ~20, '%28'
         20        ECHO                                                     ~19
   14    21      > FE_RESET_R                                       $22     !4, ->39
         22    > > FE_FETCH_R                                               $22, !5, ->39
   15    23    >   INIT_METHOD_CALL                                         !5, 'getName'
         24        DO_FCALL                                      0  $23     
         25        ASSIGN                                                   !6, $23
   16    26        INIT_METHOD_CALL                                         !5, 'isOptional'
         27        DO_FCALL                                      0  $25     
         28        ASSIGN                                                   !7, $25
   18    29      > JMPZ                                                     !7, ->35
   19    30    >   ROPE_INIT                                     3  ~28     '%5B'
         31        ROPE_ADD                                      1  ~28     ~28, !6
         32        ROPE_END                                      2  ~27     ~28, '%5D%2C+'
         33        ECHO                                                     ~27
         34      > JMP                                                      ->38
   21    35    >   NOP                                                      
         36        FAST_CONCAT                                      ~30     !6, '%2C+'
         37        ECHO                                                     ~30
   14    38    > > JMP                                                      ->22
         39    >   FE_FREE                                                  $22
   25    40        ISSET_ISEMPTY_CV                                         !4
         41      > JMPZ                                                     ~31, ->43
   26    42    >   ECHO                                                     '%5Bnone+or+dynamic%5D'
   28    43    >   ECHO                                                     '%29%0A'
    5    44    > > JMP                                                      ->4
         45    >   FE_FREE                                                  $10
   30    46      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
50.25 ms | 899 KiB | 7 Q