3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "abcdefghijklmnopqrstuvwxyz"; // just used as an example // $string becomes "badcfehgjilknmporqtsvuxwzy" $now_in_pairs = str_split($string, 2); $reverse = array_map('strrev', $now_in_pairs); foreach($reverse as $r) { $new_string .= $r; } echo $new_string;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/3c17q
function name:  (null)
number of ops:  18
compiled vars:  !0 = $string, !1 = $now_in_pairs, !2 = $reverse, !3 = $r, !4 = $new_string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'abcdefghijklmnopqrstuvwxyz'
    8     1        INIT_FCALL                                               'str_split'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 2
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
   10     6        INIT_FCALL                                               'array_map'
          7        SEND_VAL                                                 'strrev'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !2, $8
   12    11      > FE_RESET_R                                       $10     !2, ->15
         12    > > FE_FETCH_R                                               $10, !3, ->15
   14    13    >   ASSIGN_OP                                     8          !4, !3
   12    14      > JMP                                                      ->12
         15    >   FE_FREE                                                  $10
   18    16        ECHO                                                     !4
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.44 ms | 1395 KiB | 17 Q