3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = range(0, 1000); $time = microtime(true); array_map(function($el) { return $el; }, $a); var_dump(microtime(true) - $time); $time = microtime(true); foreach ($a as $el) { $b = $el; } var_dump(microtime(true) - $time);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 26, Position 2 = 29
Branch analysis from position: 26
2 jumps found. (Code = 78) Position 1 = 27, Position 2 = 29
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/pFgiC
function name:  (null)
number of ops:  38
compiled vars:  !0 = $a, !1 = $time, !2 = $el, !3 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 1000
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !0, $4
    5     5        INIT_FCALL                                               'microtime'
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !1, $6
    7     9        INIT_FCALL                                               'array_map'
         10        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FpFgiC%3A7%240'
         11        SEND_VAL                                                 ~8
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
    8    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'microtime'
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $10     
         18        SUB                                              ~11     $10, !1
         19        SEND_VAL                                                 ~11
         20        DO_ICALL                                                 
   10    21        INIT_FCALL                                               'microtime'
         22        SEND_VAL                                                 <true>
         23        DO_ICALL                                         $13     
         24        ASSIGN                                                   !1, $13
   12    25      > FE_RESET_R                                       $15     !0, ->29
         26    > > FE_FETCH_R                                               $15, !2, ->29
   13    27    >   ASSIGN                                                   !3, !2
   12    28      > JMP                                                      ->26
         29    >   FE_FREE                                                  $15
   16    30        INIT_FCALL                                               'var_dump'
         31        INIT_FCALL                                               'microtime'
         32        SEND_VAL                                                 <true>
         33        DO_ICALL                                         $17     
         34        SUB                                              ~18     $17, !1
         35        SEND_VAL                                                 ~18
         36        DO_ICALL                                                 
         37      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FpFgiC%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pFgiC
function name:  {closure}
number of ops:  3
compiled vars:  !0 = $el
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1      > RETURN                                                   !0
          2*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FpFgiC%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.45 ms | 1400 KiB | 21 Q