3v4l.org

run code in 300+ PHP versions simultaneously
<?php function someOp($i) { usleep(1); return $i; } $arr = array_fill(0, 1000, ''); $newarr = []; $start_time = microtime(true); $newarr = array_map('someOp', $arr); $time = microtime(true) - $start_time; echo $time."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/48Yan
function name:  (null)
number of ops:  24
compiled vars:  !0 = $arr, !1 = $newarr, !2 = $start_time, !3 = $time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'array_fill'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 1000
          3        SEND_VAL                                                 ''
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !0, $4
    9     6        ASSIGN                                                   !1, <array>
   10     7        INIT_FCALL                                               'microtime'
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                         $7      
         10        ASSIGN                                                   !2, $7
   11    11        INIT_FCALL                                               'array_map'
         12        SEND_VAL                                                 'someOp'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $9      
         15        ASSIGN                                                   !1, $9
   12    16        INIT_FCALL                                               'microtime'
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $11     
         19        SUB                                              ~12     $11, !2
         20        ASSIGN                                                   !3, ~12
   14    21        CONCAT                                           ~14     !3, '%0A'
         22        ECHO                                                     ~14
         23      > RETURN                                                   1

Function someop:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/48Yan
function name:  someOp
number of ops:  6
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'usleep'
          2        SEND_VAL                                                 1
          3        DO_ICALL                                                 
    5     4      > RETURN                                                   !0
    6     5*     > RETURN                                                   null

End of function someop

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.7 ms | 1396 KiB | 21 Q