3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ const ABC♥ = "alphabet"; } $class = new ReflectionClass("Test"); $bad_char = "♥"; $constants = $class->getConstants(); for ($i = 0, $max = count($constants); $i < $max; $i++) { if ( mb_strpos( $constants[$i], $bad_char) !== false ) { trigger_error( "'$bad_char' in '$constant'" ); } } // Notice: '♥' in 'ABC♥' ...
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 12
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 27
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 12
Branch analysis from position: 30
Branch analysis from position: 12
Branch analysis from position: 27
filename:       /in/IOFLf
function name:  (null)
number of ops:  31
compiled vars:  !0 = $class, !1 = $bad_char, !2 = $constants, !3 = $i, !4 = $max, !5 = $constant
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $6      'ReflectionClass'
          1        SEND_VAL_EX                                              'Test'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $6
    4     4        ASSIGN                                                   !1, '%E2%99%A5'
    7     5        INIT_METHOD_CALL                                         !0, 'getConstants'
          6        DO_FCALL                                      0  $10     
          7        ASSIGN                                                   !2, $10
    8     8        ASSIGN                                                   !3, 0
          9        COUNT                                            ~13     !2
         10        ASSIGN                                                   !4, ~13
         11      > JMP                                                      ->28
   10    12    >   INIT_FCALL                                               'mb_strpos'
         13        FETCH_DIM_R                                      ~15     !2, !3
         14        SEND_VAL                                                 ~15
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $16     
         17        TYPE_CHECK                                  1018          $16
         18      > JMPZ                                                     ~17, ->27
   11    19    >   INIT_FCALL                                               'trigger_error'
         20        ROPE_INIT                                     5  ~19     '%27'
         21        ROPE_ADD                                      1  ~19     ~19, !1
         22        ROPE_ADD                                      2  ~19     ~19, '%27+in+%27'
         23        ROPE_ADD                                      3  ~19     ~19, !5
         24        ROPE_END                                      4  ~18     ~19, '%27'
         25        SEND_VAL                                                 ~18
         26        DO_ICALL                                                 
    8    27    >   PRE_INC                                                  !3
         28    >   IS_SMALLER                                               !3, !4
         29      > JMPNZ                                                    ~24, ->12
   13    30    > > RETURN                                                   1

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.02 ms | 1396 KiB | 17 Q