3v4l.org

run code in 500+ PHP versions simultaneously
<?php mb_internal_encoding ('utf-8'); $text = "А роза упала на лапу азора"; $result = "палиндром"; $text = mb_strtolower($text); $text = str_replace (" ", "", $text); $a = mb_strlen ($text); $x = floor ($a/2); for ($i =0 ; $i <=$x; $i++) { $wordEnd = substr ($x, -1); $wordStart = substr ($x, 0); if ($wordEnd != $wordStart){ break; echo "Не палиндром"; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 23
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 23
Branch analysis from position: 34
Branch analysis from position: 23
filename:       /in/SZo4b
function name:  (null)
number of ops:  35
compiled vars:  !0 = $text, !1 = $result, !2 = $a, !3 = $x, !4 = $i, !5 = $wordEnd, !6 = $wordStart
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'mb_internal_encoding'
          1        SEND_VAL                                                     'utf-8'
          2        DO_ICALL                                                     
    5     3        ASSIGN                                                       !0, '%D0%90+%D1%80%D0%BE%D0%B7%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%B0%D0%B7%D0%BE%D1%80%D0%B0'
    6     4        ASSIGN                                                       !1, '%D0%BF%D0%B0%D0%BB%D0%B8%D0%BD%D0%B4%D1%80%D0%BE%D0%BC'
    8     5        INIT_FCALL                                                   'mb_strtolower'
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                             $10     
          8        ASSIGN                                                       !0, $10
    9     9        FRAMELESS_ICALL_3                str_replace         ~12     '+', ''
         10        OP_DATA                                                      !0
         11        ASSIGN                                                       !0, ~12
   11    12        INIT_FCALL                                                   'mb_strlen'
         13        SEND_VAR                                                     !0
         14        DO_ICALL                                             $14     
         15        ASSIGN                                                       !2, $14
   12    16        INIT_FCALL                                                   'floor'
         17        DIV                                                  ~16     !2, 2
         18        SEND_VAL                                                     ~16
         19        DO_ICALL                                             $17     
         20        ASSIGN                                                       !3, $17
   14    21        ASSIGN                                                       !4, 0
         22      > JMP                                                          ->32
   15    23    >   FRAMELESS_ICALL_2                substr              ~20     !3, -1
         24        ASSIGN                                                       !5, ~20
   16    25        FRAMELESS_ICALL_2                substr              ~22     !3, 0
         26        ASSIGN                                                       !6, ~22
   18    27        IS_NOT_EQUAL                                                 !5, !6
         28      > JMPZ                                                         ~24, ->31
   19    29    > > JMP                                                          ->34
   20    30*       ECHO                                                         '%D0%9D%D0%B5+%D0%BF%D0%B0%D0%BB%D0%B8%D0%BD%D0%B4%D1%80%D0%BE%D0%BC'
   14    31    >   PRE_INC                                                      !4
         32    >   IS_SMALLER_OR_EQUAL                                          !4, !3
         33      > JMPNZ                                                        ~26, ->23
   22    34    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.17 ms | 2108 KiB | 21 Q