3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('a', 'b', 'c', 'd', 'e', 'f'); //$str = implode(array_walk(array_reverse($arr), function($v,$k){if($k%3==0)$v.=';';})); //print_r(array_map(function($v){if($k%3==0)$v.=';';}), array_reverse($arr)); $str = str_reverse(chunk_split(implode(array_reverse($arr)), 3, ';')); echo $str;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2qhuj
function name:  (null)
number of ops:  18
compiled vars:  !0 = $arr, !1 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL_BY_NAME                                       'str_reverse'
          2        INIT_FCALL                                               'chunk_split'
          3        INIT_FCALL                                               'implode'
          4        INIT_FCALL                                               'array_reverse'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                         $4      
          9        SEND_VAR                                                 $4
         10        SEND_VAL                                                 3
         11        SEND_VAL                                                 '%3B'
         12        DO_ICALL                                         $5      
         13        SEND_VAR_NO_REF_EX                                       $5
         14        DO_FCALL                                      0  $6      
         15        ASSIGN                                                   !1, $6
    6    16        ECHO                                                     !1
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.65 ms | 1460 KiB | 16 Q