3v4l.org

run code in 300+ PHP versions simultaneously
<?php function revert($str) { $obtainStrList = explode(' ', $str); $revertStr = ''; foreach ($obtainStrList as $obtainStr) { $revertStr .= ' '; for ($i = 1; $i < mb_strlen($obtainStr) + 1; $i++) { $revertStr .= mb_substr($obtainStr, -$i, 1); } } return $revertStr; } echo revert('Delivery Club, ZakaZaka');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hZbQV
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'revert'
          1        SEND_VAL                                                 'Delivery+Club%2C+ZakaZaka'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function revert:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 27
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 27
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 12
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 12
Branch analysis from position: 26
Branch analysis from position: 12
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/hZbQV
function name:  revert
number of ops:  30
compiled vars:  !0 = $str, !1 = $obtainStrList, !2 = $revertStr, !3 = $obtainStr, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    5     6        ASSIGN                                                   !2, ''
    7     7      > FE_RESET_R                                       $8      !1, ->27
          8    > > FE_FETCH_R                                               $8, !3, ->27
    8     9    >   ASSIGN_OP                                     8          !2, '+'
    9    10        ASSIGN                                                   !4, 1
         11      > JMP                                                      ->20
   10    12    >   INIT_FCALL                                               'mb_substr'
         13        SEND_VAR                                                 !3
         14        MUL                                              ~11     !4, -1
         15        SEND_VAL                                                 ~11
         16        SEND_VAL                                                 1
         17        DO_ICALL                                         $12     
         18        ASSIGN_OP                                     8          !2, $12
    9    19        PRE_INC                                                  !4
         20    >   INIT_FCALL                                               'mb_strlen'
         21        SEND_VAR                                                 !3
         22        DO_ICALL                                         $15     
         23        ADD                                              ~16     $15, 1
         24        IS_SMALLER                                               !4, ~16
         25      > JMPNZ                                                    ~17, ->12
    7    26    > > JMP                                                      ->8
         27    >   FE_FREE                                                  $8
   15    28      > RETURN                                                   !2
   16    29*     > RETURN                                                   null

End of function revert

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.45 ms | 1403 KiB | 20 Q