3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* $term= '1234'; $term= 'diego 1234'; $term= 'diego rodriguez'; */ $term= 'diego rodriguez 1234'; $terms=explode(' ',$term); var_dump(count($terms)); $where=" AND ("; $i=0; foreach ($terms as $value) { var_dump(is_numeric($value)); } /* foreach ($terms as $value) { if($i!=0) $where.=" AND "; $where.=" (firstname LIKE '%".$value."%' OR lastname LIKE '%".$value."%')"; $where.=" ) OR ci LIKE '%".$value."%'"; $where.=" OR nroanterior LIKE '%".$value."%'"; $i++; } var_dump($where); */
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 21
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 21
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/PhksQ
function name:  (null)
number of ops:  23
compiled vars:  !0 = $term, !1 = $terms, !2 = $where, !3 = $i, !4 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, 'diego+rodriguez+1234'
   10     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
   11     6        INIT_FCALL                                               'var_dump'
          7        COUNT                                            ~8      !1
          8        SEND_VAL                                                 ~8
          9        DO_ICALL                                                 
   12    10        ASSIGN                                                   !2, '+AND+%28'
   13    11        ASSIGN                                                   !3, 0
   14    12      > FE_RESET_R                                       $12     !1, ->21
         13    > > FE_FETCH_R                                               $12, !4, ->21
   15    14    >   INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'is_numeric'
         16        SEND_VAR                                                 !4
         17        DO_ICALL                                         $13     
         18        SEND_VAR                                                 $13
         19        DO_ICALL                                                 
   14    20      > JMP                                                      ->13
         21    >   FE_FREE                                                  $12
   26    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.17 ms | 1395 KiB | 19 Q