3v4l.org

run code in 300+ PHP versions simultaneously
<?php function checkWords($word) { $list = array('extinção','desativação','obrigatório'); foreach($list as $l) { if (mb_strpos($word, $l) !== false) { return true; } } return false; } var_dump(checkWords('Físicaem desativação/extinção voluntária:23000.010237/2012-46')); //returns var_dump(mb_strpos('Físicaem desativaç', 'desativa'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hBhO7
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'checkwords'
          2        SEND_VAL                                                 'Fi%CC%81sicaem+desativac%CC%A7a%CC%83o%2Fextinc%CC%A7a%CC%83o+volunta%CC%81ria%3A23000.010237%2F2012-46'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   17     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'mb_strpos'
          8        SEND_VAL                                                 'Fi%CC%81sicaem+desativac%CC%A7'
          9        SEND_VAL                                                 'desativa'
         10        DO_ICALL                                         $2      
         11        SEND_VAR                                                 $2
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Function checkwords:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 13
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 13
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/hBhO7
function name:  checkWords
number of ops:  16
compiled vars:  !0 = $word, !1 = $list, !2 = $l
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, <array>
    6     2      > FE_RESET_R                                       $4      !1, ->13
          3    > > FE_FETCH_R                                               $4, !2, ->13
    7     4    >   INIT_FCALL                                               'mb_strpos'
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $5      
          8        TYPE_CHECK                                  1018          $5
          9      > JMPZ                                                     ~6, ->12
    8    10    >   FE_FREE                                                  $4
         11      > RETURN                                                   <true>
    6    12    > > JMP                                                      ->3
         13    >   FE_FREE                                                  $4
   11    14      > RETURN                                                   <false>
   13    15*     > RETURN                                                   null

End of function checkwords

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.98 ms | 1390 KiB | 18 Q