3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "abcd"; $len = strlen($str); $pos = floor($len/2); for($i = $len; $i > $pos; $i--) { echo ord($str[$pos+$i-1]).">>>".ord($str[$pos+$i-1])."\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 10
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 10
Branch analysis from position: 29
Branch analysis from position: 10
filename:       /in/4mWij
function name:  (null)
number of ops:  30
compiled vars:  !0 = $str, !1 = $len, !2 = $pos, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'abcd'
    3     1        STRLEN                                           ~5      !0
          2        ASSIGN                                                   !1, ~5
    4     3        INIT_FCALL                                               'floor'
          4        DIV                                              ~7      !1, 2
          5        SEND_VAL                                                 ~7
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !2, $8
    6     8        ASSIGN                                                   !3, !1
          9      > JMP                                                      ->27
    7    10    >   INIT_FCALL                                               'ord'
         11        ADD                                              ~11     !2, !3
         12        SUB                                              ~12     ~11, 1
         13        FETCH_DIM_R                                      ~13     !0, ~12
         14        SEND_VAL                                                 ~13
         15        DO_ICALL                                         $14     
         16        CONCAT                                           ~15     $14, '%3E%3E%3E'
         17        INIT_FCALL                                               'ord'
         18        ADD                                              ~16     !2, !3
         19        SUB                                              ~17     ~16, 1
         20        FETCH_DIM_R                                      ~18     !0, ~17
         21        SEND_VAL                                                 ~18
         22        DO_ICALL                                         $19     
         23        CONCAT                                           ~20     ~15, $19
         24        CONCAT                                           ~21     ~20, '%0A'
         25        ECHO                                                     ~21
    6    26        PRE_DEC                                                  !3
         27    >   IS_SMALLER                                               !2, !3
         28      > JMPNZ                                                    ~23, ->10
    8    29    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
194.09 ms | 1396 KiB | 17 Q