3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "Some test text string with stop-words: stw stw2 stopword stw3stw stopword2c"; $stopwords = array( 'stw', 'stopword' ); $regexp = '/'; $regexp.= '(' . implode('|', $stopwords) . ')' . '/'; var_dump($regexp); mb_regex_encoding('UTF-8'); mb_ereg_search_init($text); $totalResult = mb_ereg_search($regexp, "imz"); var_dump($totalResult); var_dump(mb_regex_encoding());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/14eRR
function name:  (null)
number of ops:  34
compiled vars:  !0 = $text, !1 = $stopwords, !2 = $regexp, !3 = $totalResult
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Some+test+text+string+with+stop-words%3A+stw+stw2+stopword+stw3stw+stopword2c'
    5     1        ASSIGN                                                   !1, <array>
   10     2        ASSIGN                                                   !2, '%2F'
   11     3        INIT_FCALL                                               'implode'
          4        SEND_VAL                                                 '%7C'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $7      
          7        CONCAT                                           ~8      '%28', $7
          8        CONCAT                                           ~9      ~8, '%29'
          9        CONCAT                                           ~10     ~9, '%2F'
         10        ASSIGN_OP                                     8          !2, ~10
   13    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
   15    14        INIT_FCALL                                               'mb_regex_encoding'
         15        SEND_VAL                                                 'UTF-8'
         16        DO_ICALL                                                 
   17    17        INIT_FCALL                                               'mb_ereg_search_init'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
   18    20        INIT_FCALL                                               'mb_ereg_search'
         21        SEND_VAR                                                 !2
         22        SEND_VAL                                                 'imz'
         23        DO_ICALL                                         $15     
         24        ASSIGN                                                   !3, $15
   20    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !3
         27        DO_ICALL                                                 
   22    28        INIT_FCALL                                               'var_dump'
         29        INIT_FCALL                                               'mb_regex_encoding'
         30        DO_ICALL                                         $18     
         31        SEND_VAR                                                 $18
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.35 ms | 1396 KiB | 23 Q