3v4l.org

run code in 300+ PHP versions simultaneously
<?php $attr = '@C_1_2=Client'; $d = 'C_1_2: Client'; if (preg_match('/\@(.*)=(.*)/', $attr, $matches)) { // check corresponding values $tmp_attr = trim($matches[1]); $tmp_value = trim($matches[2]); if (preg_match("/$tmp_attr:$tmp_value/", $d)) { echo 'yes'; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 29
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 29
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
Branch analysis from position: 29
filename:       /in/C8Sas
function name:  (null)
number of ops:  30
compiled vars:  !0 = $attr, !1 = $d, !2 = $matches, !3 = $tmp_attr, !4 = $tmp_value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%40C_1_2%3DClient'
    4     1        ASSIGN                                                   !1, 'C_1_2%3A++Client'
    5     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAL                                                 '%2F%5C%40%28.%2A%29%3D%28.%2A%29%2F'
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !2
          6        DO_ICALL                                         $7      
          7      > JMPZ                                                     $7, ->29
    7     8    >   INIT_FCALL                                               'trim'
          9        FETCH_DIM_R                                      ~8      !2, 1
         10        SEND_VAL                                                 ~8
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !3, $9
    8    13        INIT_FCALL                                               'trim'
         14        FETCH_DIM_R                                      ~11     !2, 2
         15        SEND_VAL                                                 ~11
         16        DO_ICALL                                         $12     
         17        ASSIGN                                                   !4, $12
    9    18        INIT_FCALL                                               'preg_match'
         19        ROPE_INIT                                     5  ~15     '%2F'
         20        ROPE_ADD                                      1  ~15     ~15, !3
         21        ROPE_ADD                                      2  ~15     ~15, '%3A'
         22        ROPE_ADD                                      3  ~15     ~15, !4
         23        ROPE_END                                      4  ~14     ~15, '%2F'
         24        SEND_VAL                                                 ~14
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $18     
         27      > JMPZ                                                     $18, ->29
   10    28    >   ECHO                                                     'yes'
   12    29    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.31 ms | 1396 KiB | 17 Q