3v4l.org

run code in 300+ PHP versions simultaneously
<?php $zahlen = array(1, 4, 8, 12); $zahlen = drehum($zahlen); function drehum($array, $key = 0, &$neu = null) { if(!isset($neu)) { $neu = array(); } if($key <= count($array) - 1) { $neu[count($array) - $key] = $array[$key]; drehum($array, $key++, $neu); } return $neu; } var_dump($zahlen);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cSJvi
function name:  (null)
number of ops:  9
compiled vars:  !0 = $zahlen
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL_BY_NAME                                       'drehum'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !0, $2
   14     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function drehum:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 22
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
Branch analysis from position: 7
filename:       /in/cSJvi
function name:  drehum
number of ops:  24
compiled vars:  !0 = $array, !1 = $key, !2 = $neu
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      0
          2        RECV_INIT                                        !2      null
    5     3        ISSET_ISEMPTY_CV                                 ~3      !2
          4        BOOL_NOT                                         ~4      ~3
          5      > JMPZ                                                     ~4, ->7
    6     6    >   ASSIGN                                                   !2, <array>
    8     7    >   COUNT                                            ~6      !0
          8        SUB                                              ~7      ~6, 1
          9        IS_SMALLER_OR_EQUAL                                      !1, ~7
         10      > JMPZ                                                     ~8, ->22
    9    11    >   COUNT                                            ~9      !0
         12        SUB                                              ~10     ~9, !1
         13        FETCH_DIM_R                                      ~12     !0, !1
         14        ASSIGN_DIM                                               !2, ~10
         15        OP_DATA                                                  ~12
   10    16        INIT_FCALL_BY_NAME                                       'drehum'
         17        SEND_VAR_EX                                              !0
         18        POST_INC                                         ~13     !1
         19        SEND_VAL_EX                                              ~13
         20        SEND_VAR_EX                                              !2
         21        DO_FCALL                                      0          
   12    22    > > RETURN                                                   !2
   13    23*     > RETURN                                                   null

End of function drehum

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.02 ms | 1396 KiB | 15 Q