3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ const ♥ = "love"; } $class = new ReflectionClass("Test"); $constant = "♥"; if ( $class->hasConstant( $constant ) ) { $bad_char = "♥"; if ( mb_strpos( $constant, $bad_char) ) { exit( "Illegal identifier: $bad_char" ); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 18
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/RBVrf
function name:  (null)
number of ops:  19
compiled vars:  !0 = $class, !1 = $constant, !2 = $bad_char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $3      'ReflectionClass'
          1        SEND_VAL_EX                                              'Test'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    8     4        ASSIGN                                                   !1, '%E2%99%A5'
    9     5        INIT_METHOD_CALL                                         !0, 'hasConstant'
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0  $7      
          8      > JMPZ                                                     $7, ->18
   10     9    >   ASSIGN                                                   !2, '%E2%99%A5'
   11    10        INIT_FCALL                                               'mb_strpos'
         11        SEND_VAR                                                 !1
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $9      
         14      > JMPZ                                                     $9, ->18
   13    15    >   NOP                                                      
         16        FAST_CONCAT                                      ~10     'Illegal+identifier%3A+', !2
         17      > EXIT                                                     ~10
   16    18    > > RETURN                                                   1

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.41 ms | 1395 KiB | 15 Q