3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [178, 89, 1]; echo array_reduce($array, function ($acc, $byte) { return $acc.strrev(str_pad(decbin($byte), 8, 0, STR_PAD_LEFT)); });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D4qGr
function name:  (null)
number of ops:  8
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_reduce'
          2        SEND_VAR                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
    6     4        SEND_VAL                                                 ~2
    4     5        DO_ICALL                                         $3      
    6     6        ECHO                                                     $3
          7      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D4qGr
function name:  {closure}
number of ops:  17
compiled vars:  !0 = $acc, !1 = $byte
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        INIT_FCALL                                               'strrev'
          3        INIT_FCALL                                               'str_pad'
          4        INIT_FCALL                                               'decbin'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        SEND_VAL                                                 8
          9        SEND_VAL                                                 0
         10        SEND_VAL                                                 0
         11        DO_ICALL                                         $3      
         12        SEND_VAR                                                 $3
         13        DO_ICALL                                         $4      
         14        CONCAT                                           ~5      !0, $4
         15      > RETURN                                                   ~5
    6    16*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142 ms | 1456 KiB | 17 Q