3v4l.org

run code in 500+ PHP versions simultaneously
<?php $rule = [ "c" => "d", "a" => "o", "t" => "g", "h" => "a", "1" => "@", "e" => "n", "n" => "t" ]; $order = str_split("cat1hen"); $str =""; foreach($order as $key){ $str .= $rule[$key]; } $str = preg_replace("/(.*?)(@)(.)(.*)/", "$1$3$2$4", $str); echo $str; //doga@nt
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/fk4VF
function name:  (null)
number of ops:  17
compiled vars:  !0 = $rule, !1 = $order, !2 = $str, !3 = $key
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   14     1        INIT_FCALL                                                   'str_split'
          2        SEND_VAL                                                     'cat1hen'
          3        DO_ICALL                                             $5      
          4        ASSIGN                                                       !1, $5
   16     5        ASSIGN                                                       !2, ''
   17     6      > FE_RESET_R                                           $8      !1, ->11
          7    > > FE_FETCH_R                                                   $8, !3, ->11
   18     8    >   FETCH_DIM_R                                          ~9      !0, !3
          9        ASSIGN_OP                                         8          !2, ~9
   17    10      > JMP                                                          ->7
         11    >   FE_FREE                                                      $8
   21    12        FRAMELESS_ICALL_3                preg_replace        ~11     '%2F%28.%2A%3F%29%28%40%29%28.%29%28.%2A%29%2F', '%241%243%242%244'
         13        OP_DATA                                                      !2
         14        ASSIGN                                                       !2, ~11
   22    15        ECHO                                                         !2
         16      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.2 ms | 1982 KiB | 14 Q