3v4l.org

run code in 300+ PHP versions simultaneously
<?php function TRIM_SEARCH_TABLE_UNIQ($column,$what) { $Find=0; $e1=strpos('0'.trim(strtolower($column)),trim(strtolower($what))); $e2=strpos('0'.trim(($what)),trim(strtolower($column))); if(($e1>0)||($e2>0)) { $Find=1; return " YES "; } return " NO "; } //example 1 : $column="smith"; $what="mike smith"; echo(TRIM_SEARCH_TABLE_UNIQ($column,$what)); //example 2 : $column="mike smith"; $what="smith"; echo(TRIM_SEARCH_TABLE_UNIQ($column,$what)); //example 3 : $column="andreas"; $what="smith"; echo(TRIM_SEARCH_TABLE_UNIQ($column,$what)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eUOS1
function name:  (null)
number of ops:  22
compiled vars:  !0 = $column, !1 = $what
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   ASSIGN                                                   !0, 'smith'
   19     1        ASSIGN                                                   !1, 'mike+smith'
   20     2        INIT_FCALL                                               'trim_search_table_uniq'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
   24     7        ASSIGN                                                   !0, 'mike+smith'
   25     8        ASSIGN                                                   !1, 'smith'
   26     9        INIT_FCALL                                               'trim_search_table_uniq'
         10        SEND_VAR                                                 !0
         11        SEND_VAR                                                 !1
         12        DO_FCALL                                      0  $7      
         13        ECHO                                                     $7
   30    14        ASSIGN                                                   !0, 'andreas'
   31    15        ASSIGN                                                   !1, 'smith'
   32    16        INIT_FCALL                                               'trim_search_table_uniq'
         17        SEND_VAR                                                 !0
         18        SEND_VAR                                                 !1
         19        DO_FCALL                                      0  $10     
         20        ECHO                                                     $10
   34    21      > RETURN                                                   1

Function trim_search_table_uniq:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 43
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
filename:       /in/eUOS1
function name:  TRIM_SEARCH_TABLE_UNIQ
number of ops:  45
compiled vars:  !0 = $column, !1 = $what, !2 = $Find, !3 = $e1, !4 = $e2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        ASSIGN                                                   !2, 0
    7     3        INIT_FCALL                                               'strpos'
          4        INIT_FCALL                                               'trim'
          5        INIT_FCALL                                               'strtolower'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $6      
          8        SEND_VAR                                                 $6
          9        DO_ICALL                                         $7      
         10        CONCAT                                           ~8      '0', $7
         11        SEND_VAL                                                 ~8
         12        INIT_FCALL                                               'trim'
         13        INIT_FCALL                                               'strtolower'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $9      
         16        SEND_VAR                                                 $9
         17        DO_ICALL                                         $10     
         18        SEND_VAR                                                 $10
         19        DO_ICALL                                         $11     
         20        ASSIGN                                                   !3, $11
    8    21        INIT_FCALL                                               'strpos'
         22        INIT_FCALL                                               'trim'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                         $13     
         25        CONCAT                                           ~14     '0', $13
         26        SEND_VAL                                                 ~14
         27        INIT_FCALL                                               'trim'
         28        INIT_FCALL                                               'strtolower'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                         $15     
         31        SEND_VAR                                                 $15
         32        DO_ICALL                                         $16     
         33        SEND_VAR                                                 $16
         34        DO_ICALL                                         $17     
         35        ASSIGN                                                   !4, $17
    9    36        IS_SMALLER                                       ~19     0, !3
         37      > JMPNZ_EX                                         ~19     ~19, ->40
         38    >   IS_SMALLER                                       ~20     0, !4
         39        BOOL                                             ~19     ~20
         40    > > JMPZ                                                     ~19, ->43
   11    41    >   ASSIGN                                                   !2, 1
   12    42      > RETURN                                                   '+YES+'
   15    43    > > RETURN                                                   '+NO+'
   16    44*     > RETURN                                                   null

End of function trim_search_table_uniq

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
129.87 ms | 1407 KiB | 22 Q