3v4l.org

run code in 500+ PHP versions simultaneously
<?php $result = array_map(function () { return rand(0, 100); }, array_fill(0, rand(0, 10), null) ); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FffN6
function name:  (null)
number of ops:  19
compiled vars:  !0 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'array_map'
          1        DECLARE_LAMBDA_FUNCTION                              ~1      [0]
    5     2        SEND_VAL                                                     ~1
          3        INIT_FCALL                                                   'array_fill'
          4        SEND_VAL                                                     0
          5        INIT_FCALL                                                   'rand'
          6        SEND_VAL                                                     0
          7        SEND_VAL                                                     10
          8        DO_ICALL                                             $2      
          9        SEND_VAR                                                     $2
         10        SEND_VAL                                                     null
         11        DO_ICALL                                             $3      
         12        SEND_VAR                                                     $3
    3    13        DO_ICALL                                             $4      
         14        ASSIGN                                                       !0, $4
    8    15        INIT_FCALL                                                   'var_dump'
         16        SEND_VAR                                                     !0
         17        DO_ICALL                                                     
         18      > 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/FffN6
function name:  {closure:/in/FffN6:3}
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                                   'rand'
          1        SEND_VAL                                                     0
          2        SEND_VAL                                                     100
          3        DO_ICALL                                             $0      
          4      > RETURN                                                       $0
    5     5*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.45 ms | 1749 KiB | 17 Q