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) { var_dump($word); var_dump($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/oZUWZ
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     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                                                 
   19     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 = 19
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 19
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/oZUWZ
function name:  checkWords
number of ops:  22
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, ->19
          3    > > FE_FETCH_R                                               $4, !2, ->19
    7     4    >   INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
    8     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
    9    10        INIT_FCALL                                               'mb_strpos'
         11        SEND_VAR                                                 !0
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $7      
         14        TYPE_CHECK                                  1018          $7
         15      > JMPZ                                                     ~8, ->18
   10    16    >   FE_FREE                                                  $4
         17      > RETURN                                                   <true>
    6    18    > > JMP                                                      ->3
         19    >   FE_FREE                                                  $4
   13    20      > RETURN                                                   <false>
   15    21*     > RETURN                                                   null

End of function checkwords

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.51 ms | 1403 KiB | 18 Q