3v4l.org

run code in 500+ PHP versions simultaneously
<?php $words = ["apple", "sample", "app", "тоҷик", "отабек", "баҳодурбек"]; $find = "pap"; $find = str_split($find); sort($find); foreach($words as $word){ $temp = str_split($word); sort($temp); if($temp == $find){ echo "match " . $word . "\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 24
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 24
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 23
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 23
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/WbTUK
function name:  (null)
number of ops:  26
compiled vars:  !0 = $words, !1 = $find, !2 = $word, !3 = $temp
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        ASSIGN                                                       !1, 'pap'
    6     2        INIT_FCALL                                                   'str_split'
          3        SEND_VAR                                                     !1
          4        DO_ICALL                                             $6      
          5        ASSIGN                                                       !1, $6
    7     6        INIT_FCALL                                                   'sort'
          7        SEND_REF                                                     !1
          8        DO_ICALL                                                     
    8     9      > FE_RESET_R                                           $9      !0, ->24
         10    > > FE_FETCH_R                                                   $9, !2, ->24
    9    11    >   INIT_FCALL                                                   'str_split'
         12        SEND_VAR                                                     !2
         13        DO_ICALL                                             $10     
         14        ASSIGN                                                       !3, $10
   10    15        INIT_FCALL                                                   'sort'
         16        SEND_REF                                                     !3
         17        DO_ICALL                                                     
   11    18        IS_EQUAL                                                     !3, !1
         19      > JMPZ                                                         ~13, ->23
   12    20    >   CONCAT                                               ~14     'match+', !2
         21        CONCAT                                               ~15     ~14, '%0A'
         22        ECHO                                                         ~15
    8    23    > > JMP                                                          ->10
         24    >   FE_FREE                                                      $9
   14    25      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
154.39 ms | 2608 KiB | 15 Q