3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isPalindrome($str) { $strCheck = ''; $length = strlen($str)- 1; $i=0; while($length >= 0) { $strCheck[$i] = $str[$length]; $length--; $i++; } if($strCheck == $str) { return true; } return false; } var_dump(isPalindrome('hello')); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p3Mcr
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'ispalindrome'
          2        SEND_VAL                                                 'hello'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   26     6      > RETURN                                                   1

Function ispalindrome:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 17
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
Branch analysis from position: 7
filename:       /in/p3Mcr
function name:  isPalindrome
number of ops:  19
compiled vars:  !0 = $str, !1 = $strCheck, !2 = $length, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, ''
    5     2        STRLEN                                           ~5      !0
          3        SUB                                              ~6      ~5, 1
          4        ASSIGN                                                   !2, ~6
    6     5        ASSIGN                                                   !3, 0
    8     6      > JMP                                                      ->12
   10     7    >   FETCH_DIM_R                                      ~10     !0, !2
          8        ASSIGN_DIM                                               !1, !3
          9        OP_DATA                                                  ~10
   11    10        PRE_DEC                                                  !2
   12    11        PRE_INC                                                  !3
    8    12    >   IS_SMALLER_OR_EQUAL                                      0, !2
         13      > JMPNZ                                                    ~13, ->7
   15    14    >   IS_EQUAL                                                 !1, !0
         15      > JMPZ                                                     ~14, ->17
   17    16    > > RETURN                                                   <true>
   20    17    > > RETURN                                                   <false>
   22    18*     > RETURN                                                   null

End of function ispalindrome

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.87 ms | 1399 KiB | 16 Q