3v4l.org

run code in 500+ PHP versions simultaneously
<?php const REGEX = '/class=("gx-block"|"gx-block .*"|".* gx-block")/i'; const HTML1 = '<div class="gx-block">abc</div>'; const HTML2 = '<div class="xyz">abc (gx-block) def</div>'; const HTML3 = '<div class="gx-blockhhh">abc</div>'; echo preg_match(REGEX, HTML1) ? 'true' : 'false'; echo PHP_EOL; echo preg_match(REGEX, HTML2) ? 'true' : 'false'; echo PHP_EOL; echo preg_match(REGEX, HTML3) ? 'true' : 'false'; echo PHP_EOL;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 28
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 28
Branch analysis from position: 26
Branch analysis from position: 28
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
Branch analysis from position: 19
filename:       /in/ORKkR
function name:  (null)
number of ops:  32
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CONST                                                'REGEX', '%2Fclass%3D%28%22gx-block%22%7C%22gx-block+.%2A%22%7C%22.%2A+gx-block%22%29%2Fi'
    6     1        DECLARE_CONST                                                'HTML1', '%3Cdiv+class%3D%22gx-block%22%3Eabc%3C%2Fdiv%3E'
    7     2        DECLARE_CONST                                                'HTML2', '%3Cdiv+class%3D%22xyz%22%3Eabc+%28gx-block%29+def%3C%2Fdiv%3E'
    8     3        DECLARE_CONST                                                'HTML3', '%3Cdiv+class%3D%22gx-blockhhh%22%3Eabc%3C%2Fdiv%3E'
   11     4        FETCH_CONSTANT                                       ~0      'REGEX'
          5        FETCH_CONSTANT                                       ~1      'HTML1'
          6        FRAMELESS_ICALL_2                preg_match          ~2      ~0, ~1
          7      > JMPZ                                                         ~2, ->10
          8    >   QM_ASSIGN                                            ~3      'true'
          9      > JMP                                                          ->11
         10    >   QM_ASSIGN                                            ~3      'false'
         11    >   ECHO                                                         ~3
   12    12        ECHO                                                         '%0A'
   13    13        FETCH_CONSTANT                                       ~4      'REGEX'
         14        FETCH_CONSTANT                                       ~5      'HTML2'
         15        FRAMELESS_ICALL_2                preg_match          ~6      ~4, ~5
         16      > JMPZ                                                         ~6, ->19
         17    >   QM_ASSIGN                                            ~7      'true'
         18      > JMP                                                          ->20
         19    >   QM_ASSIGN                                            ~7      'false'
         20    >   ECHO                                                         ~7
   14    21        ECHO                                                         '%0A'
   15    22        FETCH_CONSTANT                                       ~8      'REGEX'
         23        FETCH_CONSTANT                                       ~9      'HTML3'
         24        FRAMELESS_ICALL_2                preg_match          ~10     ~8, ~9
         25      > JMPZ                                                         ~10, ->28
         26    >   QM_ASSIGN                                            ~11     'true'
         27      > JMP                                                          ->29
         28    >   QM_ASSIGN                                            ~11     'false'
         29    >   ECHO                                                         ~11
   16    30        ECHO                                                         '%0A'
   17    31      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.1 ms | 2076 KiB | 13 Q