3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ const ♥ = "love"; } $bad_char = "♥"; $obj = new ReflectionClass( "Test" ); if( $obj->getconstant( $bad_char ) ) echo "illegal usage: $bad_char";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/Q9u3o
function name:  (null)
number of ops:  13
compiled vars:  !0 = $bad_char, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, '%E2%99%A5'
    6     1        NEW                                              $3      'ReflectionClass'
          2        SEND_VAL_EX                                              'Test'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $3
    7     5        INIT_METHOD_CALL                                         !1, 'getconstant'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $6      
          8      > JMPZ                                                     $6, ->12
          9    >   NOP                                                      
         10        FAST_CONCAT                                      ~7      'illegal+usage%3A+', !0
         11        ECHO                                                     ~7
         12    > > RETURN                                                   1

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.02 ms | 1393 KiB | 13 Q