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]; } 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/dN2oo
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     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                                                 
   24     6      > RETURN                                                   1

Function ispalindrome:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 7
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 7
Branch analysis from position: 12
Branch analysis from position: 7
filename:       /in/dN2oo
function name:  isPalindrome
number of ops:  17
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                                                      ->10
   10     7    >   FETCH_DIM_R                                      ~10     !0, !2
          8        ASSIGN_DIM                                               !1, !3
          9        OP_DATA                                                  ~10
    8    10    >   IS_SMALLER_OR_EQUAL                                      0, !2
         11      > JMPNZ                                                    ~11, ->7
   13    12    >   IS_EQUAL                                                 !1, !0
         13      > JMPZ                                                     ~12, ->15
   15    14    > > RETURN                                                   <true>
   18    15    > > RETURN                                                   <false>
   20    16*     > RETURN                                                   null

End of function ispalindrome

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.59 ms | 1399 KiB | 16 Q