3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ['轻型飞', '机无人', '机广告飞', '艇无人飞', '艇遥控飞', '艇航拍飞', '艇载人气', '球三角', '翼动力三角', '翼滑翔', '机测绘无人', '机大疆无人', '机遥控无人', '机航拍飞行', '器航拍无人', '机飞', '艇滑翔', '伞遥控飞', '机动力滑翔', '伞载人飞', '艇动力', '伞运动飞', '机三角翼飞', '机飞行航', '模四轴飞', '行遥控四', '轴燃油遥控飞', '机燃油遥控直升', '机油动遥控飞', '机油动遥控直升', '机四旋翼飞行', '器四旋翼无人', '机遥控航', '模无人驾驶自由气', '球系留气', '球四轴飞行', '器超轻型飞', '机轻型直升机', '超轻型直升机', '四轴无人机', '四轴航模']; $sqls = []; $head = 'select id,goods_name,content,goods_description from shop_goods where '; foreach ($arr as $v) { $fields = ['goods_name' => "'%$v%'", 'content' => "'%$v%'", 'goods_description' => "'%$v%'"]; $sql = (http_build_str($fields)); $sql = str_replace('=', ' like ', $sql); $wheres = explode('&', $sql); foreach ($wheres as $where) { $sqls[] = $head.$where; } } foreach ($sqls as $sql) { echo $sql."\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 41
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 41
Branch analysis from position: 5
2 jumps found. (Code = 77) Position 1 = 34, Position 2 = 39
Branch analysis from position: 34
2 jumps found. (Code = 78) Position 1 = 35, Position 2 = 39
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 39
Branch analysis from position: 41
2 jumps found. (Code = 77) Position 1 = 43, Position 2 = 47
Branch analysis from position: 43
2 jumps found. (Code = 78) Position 1 = 44, Position 2 = 47
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
Branch analysis from position: 41
filename:       /in/hfvFc
function name:  (null)
number of ops:  49
compiled vars:  !0 = $arr, !1 = $sqls, !2 = $head, !3 = $v, !4 = $fields, !5 = $sql, !6 = $wheres, !7 = $where
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, 'select+id%2Cgoods_name%2Ccontent%2Cgoods_description+from+shop_goods+where+'
    7     3      > FE_RESET_R                                       $11     !0, ->41
          4    > > FE_FETCH_R                                               $11, !3, ->41
    8     5    >   ROPE_INIT                                     3  ~13     '%27%25'
          6        ROPE_ADD                                      1  ~13     ~13, !3
          7        ROPE_END                                      2  ~12     ~13, '%25%27'
          8        INIT_ARRAY                                       ~15     ~12, 'goods_name'
          9        ROPE_INIT                                     3  ~17     '%27%25'
         10        ROPE_ADD                                      1  ~17     ~17, !3
         11        ROPE_END                                      2  ~16     ~17, '%25%27'
         12        ADD_ARRAY_ELEMENT                                ~15     ~16, 'content'
         13        ROPE_INIT                                     3  ~20     '%27%25'
         14        ROPE_ADD                                      1  ~20     ~20, !3
         15        ROPE_END                                      2  ~19     ~20, '%25%27'
         16        ADD_ARRAY_ELEMENT                                ~15     ~19, 'goods_description'
         17        ASSIGN                                                   !4, ~15
   10    18        INIT_FCALL_BY_NAME                                       'http_build_str'
         19        SEND_VAR_EX                                              !4
         20        DO_FCALL                                      0  $23     
         21        ASSIGN                                                   !5, $23
   11    22        INIT_FCALL                                               'str_replace'
         23        SEND_VAL                                                 '%3D'
         24        SEND_VAL                                                 '+like+'
         25        SEND_VAR                                                 !5
         26        DO_ICALL                                         $25     
         27        ASSIGN                                                   !5, $25
   13    28        INIT_FCALL                                               'explode'
         29        SEND_VAL                                                 '%26'
         30        SEND_VAR                                                 !5
         31        DO_ICALL                                         $27     
         32        ASSIGN                                                   !6, $27
   15    33      > FE_RESET_R                                       $29     !6, ->39
         34    > > FE_FETCH_R                                               $29, !7, ->39
   16    35    >   CONCAT                                           ~31     !2, !7
         36        ASSIGN_DIM                                               !1
         37        OP_DATA                                                  ~31
   15    38      > JMP                                                      ->34
         39    >   FE_FREE                                                  $29
    7    40      > JMP                                                      ->4
         41    >   FE_FREE                                                  $11
   20    42      > FE_RESET_R                                       $32     !1, ->47
         43    > > FE_FETCH_R                                               $32, !5, ->47
   21    44    >   CONCAT                                           ~33     !5, '%0A'
         45        ECHO                                                     ~33
   20    46      > JMP                                                      ->43
         47    >   FE_FREE                                                  $32
   23    48      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.03 ms | 1392 KiB | 17 Q