3v4l.org

run code in 300+ PHP versions simultaneously
<?php $color='33333'; if (!preg_match("/^[A-Fa-f0-9]{6}$/", $color)) { var_dump(array("result"=>"error: Invalid Color $color")); } else { var_dump(array("result"=>"color is valid")); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Mp6f3
function name:  (null)
number of ops:  18
compiled vars:  !0 = $color
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '33333'
    4     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%5E%5BA-Fa-f0-9%5D%7B6%7D%24%2F'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        BOOL_NOT                                         ~3      $2
          6      > JMPZ                                                     ~3, ->14
    5     7    >   INIT_FCALL                                               'var_dump'
          8        NOP                                                      
          9        FAST_CONCAT                                      ~4      'error%3A+Invalid+Color+', !0
         10        INIT_ARRAY                                       ~5      ~4, 'result'
         11        SEND_VAL                                                 ~5
         12        DO_ICALL                                                 
         13      > JMP                                                      ->17
    7    14    >   INIT_FCALL                                               'var_dump'
         15        SEND_VAL                                                 <array>
         16        DO_ICALL                                                 
    8    17    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.67 ms | 1395 KiB | 17 Q