3v4l.org

run code in 300+ PHP versions simultaneously
<?php function splitIntoWords(string $strText, string $strLocale) { $iterator = \IntlBreakIterator::createWordInstance($strLocale); $iterator->setText($strText); $words = array(); foreach ($iterator->getPartsIterator() as $part) { if ($iterator->getRuleStatus() !== \IntlBreakIterator::WORD_NONE) { $words[] = $part; } } return $words; } var_dump(splitIntoWords('Foƶ bar baz', 'de'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BiUYW
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'splitintowords'
          2        SEND_VAL                                                 'Fo%C3%B6+bar+baz'
          3        SEND_VAL                                                 'de'
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function splitintowords:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 22
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 22
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 21
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/BiUYW
function name:  splitIntoWords
number of ops:  25
compiled vars:  !0 = $strText, !1 = $strLocale, !2 = $iterator, !3 = $words, !4 = $part
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_STATIC_METHOD_CALL                                  'IntlBreakIterator', 'createWordInstance'
          3        SEND_VAR_EX                                              !1
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !2, $5
    5     6        INIT_METHOD_CALL                                         !2, 'setText'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
    6     9        ASSIGN                                                   !3, <array>
    7    10        INIT_METHOD_CALL                                         !2, 'getPartsIterator'
         11        DO_FCALL                                      0  $9      
         12      > FE_RESET_R                                       $10     $9, ->22
         13    > > FE_FETCH_R                                               $10, !4, ->22
    9    14    >   INIT_METHOD_CALL                                         !2, 'getRuleStatus'
         15        DO_FCALL                                      0  $11     
         16        FETCH_CLASS_CONSTANT                             ~12     'IntlBreakIterator', 'WORD_NONE'
         17        IS_NOT_IDENTICAL                                         $11, ~12
         18      > JMPZ                                                     ~13, ->21
   11    19    >   ASSIGN_DIM                                               !3
         20        OP_DATA                                                  !4
    7    21    > > JMP                                                      ->13
         22    >   FE_FREE                                                  $10
   14    23      > RETURN                                                   !3
   15    24*     > RETURN                                                   null

End of function splitintowords

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.94 ms | 1403 KiB | 16 Q