3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '42 = 42 OR `1+1:3 * 4/2 = 1 \ abc` =2 AND field1=2 AND `column_x` <> "lorem 1" OR a= \'2_\' AND '; echo json_encode((bool)preg_match( '/^('. '(?:`?\w+`?|`[\w+=:\/\*\-\\\ ]+`)\s*'. // column name '([!><]?=|[><]|<>)\s*'. // operator '([\'"][\w\s\.\,]+[\'"]|\d+(\.\d+)?)'. // value '(\s+(AND|OR)\s+)'. // logical operator ')+$/i', $str));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/33pgj
function name:  (null)
number of ops:  11
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '42+%3D+42+OR+%601%2B1%3A3+%2A+4%2F2+%3D+1+%5C+abc%60++%3D2+AND+field1%3D2+AND+%60column_x%60+%3C%3E+%22lorem+1%22+OR+a%3D+%272_%27+AND+'
    3     1        INIT_FCALL                                               'json_encode'
          2        INIT_FCALL                                               'preg_match'
    9     3        SEND_VAL                                                 '%2F%5E%28%28%3F%3A%60%3F%5Cw%2B%60%3F%7C%60%5B%5Cw%2B%3D%3A%5C%2F%5C%2A%5C-%5C%5C+%5D%2B%60%29%5Cs%2A%28%5B%21%3E%3C%5D%3F%3D%7C%5B%3E%3C%5D%7C%3C%3E%29%5Cs%2A%28%5B%27%22%5D%5B%5Cw%5Cs%5C.%5C%2C%5D%2B%5B%27%22%5D%7C%5Cd%2B%28%5C.%5Cd%2B%29%3F%29%28%5Cs%2B%28AND%7COR%29%5Cs%2B%29%29%2B%24%2Fi'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        BOOL                                             ~3      $2
          7        SEND_VAL                                                 ~3
          8        DO_ICALL                                         $4      
          9        ECHO                                                     $4
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.57 ms | 1394 KiB | 17 Q