3v4l.org

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

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.43 ms | 1395 KiB | 17 Q