3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = "abcdefgh"; for ($i = 0, $len = mb_strlen($s)-1; $i < $len; $i++, $len--) { $s[$i] = $s[$i] ^ $s[$len]; $s[$len] = $s[$len] ^ $s[$i]; $s[$i] = $s[$i] ^ $s[$len]; } echo $s;
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 = 8
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 8
Branch analysis from position: 27
Branch analysis from position: 8
filename:       /in/2W3Ei
function name:  (null)
number of ops:  29
compiled vars:  !0 = $s, !1 = $i, !2 = $len
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'abcdefgh'
    5     1        ASSIGN                                                   !1, 0
          2        INIT_FCALL                                               'mb_strlen'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        SUB                                              ~6      $5, 1
          6        ASSIGN                                                   !2, ~6
          7      > JMP                                                      ->25
    6     8    >   FETCH_DIM_R                                      ~9      !0, !1
          9        FETCH_DIM_R                                      ~10     !0, !2
         10        BW_XOR                                           ~11     ~9, ~10
         11        ASSIGN_DIM                                               !0, !1
         12        OP_DATA                                                  ~11
    7    13        FETCH_DIM_R                                      ~13     !0, !2
         14        FETCH_DIM_R                                      ~14     !0, !1
         15        BW_XOR                                           ~15     ~13, ~14
         16        ASSIGN_DIM                                               !0, !2
         17        OP_DATA                                                  ~15
    8    18        FETCH_DIM_R                                      ~17     !0, !1
         19        FETCH_DIM_R                                      ~18     !0, !2
         20        BW_XOR                                           ~19     ~17, ~18
         21        ASSIGN_DIM                                               !0, !1
         22        OP_DATA                                                  ~19
    5    23        PRE_INC                                                  !1
         24        PRE_DEC                                                  !2
         25    >   IS_SMALLER                                               !1, !2
         26      > JMPNZ                                                    ~22, ->8
   11    27    >   ECHO                                                     !0
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.28 ms | 1396 KiB | 15 Q