3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = 'abcdefghijklm'; for($i=strlen($s)-1, $j=0; $j<$i; $i--, $j++) { list($s[$j], $s[$i]) = array($s[$i], $s[$j]); } echo $s;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 6
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 6
Branch analysis from position: 21
Branch analysis from position: 6
filename:       /in/LOB5c
function name:  (null)
number of ops:  23
compiled vars:  !0 = $s, !1 = $i, !2 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'abcdefghijklm'
    4     1        STRLEN                                           ~4      !0
          2        SUB                                              ~5      ~4, 1
          3        ASSIGN                                                   !1, ~5
          4        ASSIGN                                                   !2, 0
          5      > JMP                                                      ->19
    5     6    >   FETCH_DIM_R                                      ~8      !0, !1
          7        INIT_ARRAY                                       ~9      ~8
          8        FETCH_DIM_R                                      ~10     !0, !2
          9        ADD_ARRAY_ELEMENT                                ~9      ~10
         10        FETCH_LIST_R                                     $11     ~9, 0
         11        ASSIGN_DIM                                               !0, !2
         12        OP_DATA                                                  $11
         13        FETCH_LIST_R                                     $13     ~9, 1
         14        ASSIGN_DIM                                               !0, !1
         15        OP_DATA                                                  $13
         16        FREE                                                     ~9
    4    17        PRE_DEC                                                  !1
         18        PRE_INC                                                  !2
         19    >   IS_SMALLER                                               !2, !1
         20      > JMPNZ                                                    ~17, ->6
    7    21    >   ECHO                                                     !0
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.7 ms | 1394 KiB | 13 Q