3v4l.org

run code in 300+ 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 = 41
Branch analysis from position: 41
2 jumps found. (Code = 44) Position 1 = 43, Position 2 = 26
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 43, Position 2 = 26
Branch analysis from position: 43
Branch analysis from position: 26
filename:       /in/SZo4b
function name:  (null)
number of ops:  44
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        INIT_FCALL                                               'str_replace'
         10        SEND_VAL                                                 '+'
         11        SEND_VAL                                                 ''
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $12     
         14        ASSIGN                                                   !0, $12
   11    15        INIT_FCALL                                               'mb_strlen'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $14     
         18        ASSIGN                                                   !2, $14
   12    19        INIT_FCALL                                               'floor'
         20        DIV                                              ~16     !2, 2
         21        SEND_VAL                                                 ~16
         22        DO_ICALL                                         $17     
         23        ASSIGN                                                   !3, $17
   14    24        ASSIGN                                                   !4, 0
         25      > JMP                                                      ->41
   15    26    >   INIT_FCALL                                               'substr'
         27        SEND_VAR                                                 !3
         28        SEND_VAL                                                 -1
         29        DO_ICALL                                         $20     
         30        ASSIGN                                                   !5, $20
   16    31        INIT_FCALL                                               'substr'
         32        SEND_VAR                                                 !3
         33        SEND_VAL                                                 0
         34        DO_ICALL                                         $22     
         35        ASSIGN                                                   !6, $22
   18    36        IS_NOT_EQUAL                                             !5, !6
         37      > JMPZ                                                     ~24, ->40
   19    38    > > JMP                                                      ->43
   20    39*       ECHO                                                     '%D0%9D%D0%B5+%D0%BF%D0%B0%D0%BB%D0%B8%D0%BD%D0%B4%D1%80%D0%BE%D0%BC'
   14    40    >   PRE_INC                                                  !4
         41    >   IS_SMALLER_OR_EQUAL                                      !4, !3
         42      > JMPNZ                                                    ~26, ->26
   22    43    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.43 ms | 1008 KiB | 19 Q