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]).">>>".ord($str[$pos-$i])."\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 10
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 10
Branch analysis from position: 27
Branch analysis from position: 10
filename:       /in/jp00o
function name:  (null)
number of ops:  28
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                                                      ->25
    7    10    >   INIT_FCALL                                               'ord'
         11        ADD                                              ~11     !2, !3
         12        FETCH_DIM_R                                      ~12     !0, ~11
         13        SEND_VAL                                                 ~12
         14        DO_ICALL                                         $13     
         15        CONCAT                                           ~14     $13, '%3E%3E%3E'
         16        INIT_FCALL                                               'ord'
         17        SUB                                              ~15     !2, !3
         18        FETCH_DIM_R                                      ~16     !0, ~15
         19        SEND_VAL                                                 ~16
         20        DO_ICALL                                         $17     
         21        CONCAT                                           ~18     ~14, $17
         22        CONCAT                                           ~19     ~18, '%0A'
         23        ECHO                                                     ~19
    6    24        PRE_DEC                                                  !3
         25    >   IS_SMALLER                                               !2, !3
         26      > JMPNZ                                                    ~21, ->10
    8    27    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.66 ms | 1395 KiB | 17 Q