3v4l.org

run code in 500+ PHP versions simultaneously
<?php $text = "А Анна упала на лапу Азора"; $words = explode(' ', $text); foreach($words as &$word) { $reverse_word = utf8_strrev($word); if (strtolower($word) == strtolower($reverse_word)) { echo $word . " - поллиндром\n"; } else { echo $word . " - не поллиндром\n"; } } function utf8_strrev($str){ preg_match_all('/./us', $str, $ar); return join('',array_reverse($ar[0])); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 7, Position 2 = 26
Branch analysis from position: 7
2 jumps found. (Code = 126) Position 1 = 8, Position 2 = 26
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 23
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/Q8aQJ
function name:  (null)
number of ops:  28
compiled vars:  !0 = $text, !1 = $words, !2 = $word, !3 = $reverse_word
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, '%D0%90+%D0%90%D0%BD%D0%BD%D0%B0+%D1%83%D0%BF%D0%B0%D0%BB%D0%B0+%D0%BD%D0%B0+%D0%BB%D0%B0%D0%BF%D1%83+%D0%90%D0%B7%D0%BE%D1%80%D0%B0'
    3     1        INIT_FCALL                                                   'explode'
          2        SEND_VAL                                                     '+'
          3        SEND_VAR                                                     !0
          4        DO_ICALL                                             $5      
          5        ASSIGN                                                       !1, $5
    4     6      > FE_RESET_RW                                          $7      !1, ->26
          7    > > FE_FETCH_RW                                                  $7, !2, ->26
    5     8    >   INIT_FCALL_BY_NAME                                           'utf8_strrev'
          9        SEND_VAR_EX                                                  !2
         10        DO_FCALL                                          0  $8      
         11        ASSIGN                                                       !3, $8
    6    12        INIT_FCALL                                                   'strtolower'
         13        SEND_VAR                                                     !2
         14        DO_ICALL                                             $10     
         15        INIT_FCALL                                                   'strtolower'
         16        SEND_VAR                                                     !3
         17        DO_ICALL                                             $11     
         18        IS_EQUAL                                                     $10, $11
         19      > JMPZ                                                         ~12, ->23
    7    20    >   CONCAT                                               ~13     !2, '+-+%D0%BF%D0%BE%D0%BB%D0%BB%D0%B8%D0%BD%D0%B4%D1%80%D0%BE%D0%BC%0A'
         21        ECHO                                                         ~13
    6    22      > JMP                                                          ->25
    9    23    >   CONCAT                                               ~14     !2, '+-+%D0%BD%D0%B5+%D0%BF%D0%BE%D0%BB%D0%BB%D0%B8%D0%BD%D0%B4%D1%80%D0%BE%D0%BC%0A'
         24        ECHO                                                         ~14
    4    25    > > JMP                                                          ->7
         26    >   FE_FREE                                                      $7
   16    27      > RETURN                                                       1

Function utf8_strrev:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q8aQJ
function name:  utf8_strrev
number of ops:  16
compiled vars:  !0 = $str, !1 = $ar
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   RECV                                                 !0      
   14     1        INIT_FCALL                                                   'preg_match_all'
          2        SEND_VAL                                                     '%2F.%2Fus'
          3        SEND_VAR                                                     !0
          4        SEND_REF                                                     !1
          5        DO_ICALL                                                     
   15     6        INIT_FCALL                                                   'join'
          7        SEND_VAL                                                     ''
          8        INIT_FCALL                                                   'array_reverse'
          9        FETCH_DIM_R                                          ~3      !1, 0
         10        SEND_VAL                                                     ~3
         11        DO_ICALL                                             $4      
         12        SEND_VAR                                                     $4
         13        DO_ICALL                                             $5      
         14      > RETURN                                                       $5
   16    15*     > RETURN                                                       null

End of function utf8_strrev

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
234.69 ms | 2110 KiB | 18 Q