3v4l.org

run code in 300+ PHP versions simultaneously
<?php $months = range(1, 12); $months = array_map(function ($element) { return str_pad($element, 2, 0, STR_PAD_LEFT); }, $months); $months = array_combine($months, $months); var_dump($month);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RD0cH
function name:  (null)
number of ops:  20
compiled vars:  !0 = $months, !1 = $month
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 12
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    4     5        INIT_FCALL                                               'array_map'
          6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FRD0cH%3A4%240'
    6     7        SEND_VAL                                                 ~4
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $5      
    4    10        ASSIGN                                                   !0, $5
    7    11        INIT_FCALL                                               'array_combine'
         12        SEND_VAR                                                 !0
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $7      
         15        ASSIGN                                                   !0, $7
    8    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FRD0cH%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RD0cH
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'str_pad'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 2
          4        SEND_VAL                                                 0
          5        SEND_VAL                                                 0
          6        DO_ICALL                                         $1      
          7      > RETURN                                                   $1
    6     8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FRD0cH%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.23 ms | 1401 KiB | 23 Q