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 = strrev(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/GMuSu
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                                               'strrev'
          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                                                 $5
         14        DO_ICALL                                         $6      
         15        ASSIGN                                                   !1, $6
    6    16        ECHO                                                     !1
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.86 ms | 1394 KiB | 21 Q