3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = base64_encode(md5('')); $start = microtime(true); for ($i = 0; $i < 100; ++$i) { $soFar = ''; $callback = function ($value) use (&$soFar) { return $soFar .= $value; }; $result = array_map($callback, str_split($value)); } $end = microtime(true); echo $i/($end - $start), ' op/s'; var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 13
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 13
Branch analysis from position: 28
Branch analysis from position: 13
filename:       /in/D968f
function name:  (null)
number of ops:  40
compiled vars:  !0 = $value, !1 = $start, !2 = $i, !3 = $soFar, !4 = $callback, !5 = $result, !6 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'base64_encode'
          1        INIT_FCALL                                               'md5'
          2        SEND_VAL                                                 ''
          3        DO_ICALL                                         $7      
          4        SEND_VAR                                                 $7
          5        DO_ICALL                                         $8      
          6        ASSIGN                                                   !0, $8
    4     7        INIT_FCALL                                               'microtime'
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                         $10     
         10        ASSIGN                                                   !1, $10
    5    11        ASSIGN                                                   !2, 0
         12      > JMP                                                      ->26
    6    13    >   ASSIGN                                                   !3, ''
    7    14        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FD968f%3A7%240'
         15        BIND_LEXICAL                                             ~14, !3
         16        ASSIGN                                                   !4, ~14
   10    17        INIT_FCALL                                               'array_map'
         18        SEND_VAR                                                 !4
         19        INIT_FCALL                                               'str_split'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $16     
         22        SEND_VAR                                                 $16
         23        DO_ICALL                                         $17     
         24        ASSIGN                                                   !5, $17
    5    25        PRE_INC                                                  !2
         26    >   IS_SMALLER                                               !2, 100
         27      > JMPNZ                                                    ~20, ->13
   13    28    >   INIT_FCALL                                               'microtime'
         29        SEND_VAL                                                 <true>
         30        DO_ICALL                                         $21     
         31        ASSIGN                                                   !6, $21
   14    32        SUB                                              ~23     !6, !1
         33        DIV                                              ~24     !2, ~23
         34        ECHO                                                     ~24
         35        ECHO                                                     '+op%2Fs'
   15    36        INIT_FCALL                                               'var_dump'
         37        SEND_VAR                                                 !5
         38        DO_ICALL                                                 
         39      > RETURN                                                   1

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.14 ms | 1400 KiB | 25 Q