3v4l.org

run code in 200+ PHP versions simultaneously
<?php function IsCasiPalindromo($str){ $count = 0; $idx1 = 0; $idx2 = strlen($str)-1; while($idx1 <= $idx2){ if($str[$idx1] != $str[$idx2]){ $count++; echo 'false'; } $idx1++; $idx2--; } return true; } echo IsCasiPalindromo("abccba") . '<br>'; echo IsCasiPalindromo("abccbx") . '<br>'; echo IsCasiPalindromo("abccfg") . '<br>';
based on K0PEU
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AF4Np
function name:  (null)
number of ops:  17
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  18     1        INIT_FCALL                                               'iscasipalindromo'
         2        SEND_VAL                                                 'abccba'
         3        DO_FCALL                                      0  $0      
         4        CONCAT                                           ~1      $0, '%3Cbr%3E'
         5        ECHO                                                     ~1
  19     6        INIT_FCALL                                               'iscasipalindromo'
         7        SEND_VAL                                                 'abccbx'
         8        DO_FCALL                                      0  $2      
         9        CONCAT                                           ~3      $2, '%3Cbr%3E'
        10        ECHO                                                     ~3
  20    11        INIT_FCALL                                               'iscasipalindromo'
        12        SEND_VAL                                                 'abccfg'
        13        DO_FCALL                                      0  $4      
        14        CONCAT                                           ~5      $4, '%3Cbr%3E'
        15        ECHO                                                     ~5
        16      > RETURN                                                   1

Function iscasipalindromo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 7
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 7
Branch analysis from position: 20
Branch analysis from position: 7
Branch analysis from position: 14
filename:       /in/AF4Np
function name:  IsCasiPalindromo
number of ops:  22
compiled vars:  !0 = $str, !1 = $count, !2 = $idx1, !3 = $idx2
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   RECV                                             !0      
   4     1        ASSIGN                                                   !1, 0
   5     2        ASSIGN                                                   !2, 0
   6     3        STRLEN                                           ~6      !0
         4        SUB                                              ~7      ~6, 1
         5        ASSIGN                                                   !3, ~7
   7     6      > JMP                                                      ->18
   8     7    >   FETCH_DIM_R                                      ~9      !0, !2
         8        FETCH_DIM_R                                      ~10     !0, !3
         9        IS_NOT_EQUAL                                     ~11     ~9, ~10
        10      > JMPZ                                                     ~11, ->14
   9    11    >   POST_INC                                         ~12     !1
        12        FREE                                                     ~12
  10    13        ECHO                                                     'false'
  12    14    >   POST_INC                                         ~13     !2
        15        FREE                                                     ~13
  13    16        POST_DEC                                         ~14     !3
        17        FREE                                                     ~14
   7    18    >   IS_SMALLER_OR_EQUAL                              ~15     !2, !3
        19      > JMPNZ                                                    ~15, ->7
  15    20    > > RETURN                                                   <true>
  16    21*     > RETURN                                                   null

End of function iscasipalindromo

Generated using Vulcan Logic Dumper, using php 7.3.0