3v4l.org

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

Function %00%7Bclosure%7D%2Fin%2FQO6li%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QO6li
function name:  {closure}
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'rand'
          1        DO_ICALL                                         $0      
          2        INIT_ARRAY                                       ~1      $0, 'derp'
          3        CAST                                          8  ~2      ~1
          4      > RETURN                                                   ~2
          5*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.56 ms | 1395 KiB | 21 Q