3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ref = new ReflectionClass('PDO'); foreach ($ref->getConstants() as $constant) { printf("%s => %s\n", $contant->getName(), $constant->getValue()); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 18
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 18
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/E00vB
function name:  (null)
number of ops:  20
compiled vars:  !0 = $ref, !1 = $constant, !2 = $contant
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'ReflectionClass'
          1        SEND_VAL_EX                                              'PDO'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    4     4        INIT_METHOD_CALL                                         !0, 'getConstants'
          5        DO_FCALL                                      0  $6      
          6      > FE_RESET_R                                       $7      $6, ->18
          7    > > FE_FETCH_R                                               $7, !1, ->18
    5     8    >   INIT_FCALL                                               'printf'
          9        SEND_VAL                                                 '%25s+%3D%3E+%25s%0A'
         10        INIT_METHOD_CALL                                         !2, 'getName'
         11        DO_FCALL                                      0  $8      
         12        SEND_VAR                                                 $8
         13        INIT_METHOD_CALL                                         !1, 'getValue'
         14        DO_FCALL                                      0  $9      
         15        SEND_VAR                                                 $9
         16        DO_ICALL                                                 
    4    17      > JMP                                                      ->7
         18    >   FE_FREE                                                  $7
    6    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.88 ms | 1395 KiB | 15 Q