3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = []; for ($i = 0, $j = 100; $i < $j; ++$i) { $array[] = new DateTimeImmutable(); } $t1 = microtime(true); for ($i = 0; $i < 100; ++$i) { function () use (&$array) { }; } $t3 = microtime(true); echo (1000000 * ($t3 - $t1)) . "\n\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 4
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 17
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 17
Branch analysis from position: 23
Branch analysis from position: 17
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 4
Branch analysis from position: 11
Branch analysis from position: 4
filename:       /in/Z47r1
function name:  (null)
number of ops:  32
compiled vars:  !0 = $array, !1 = $i, !2 = $j, !3 = $t1, !4 = $t3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 0
          2        ASSIGN                                                   !2, 100
          3      > JMP                                                      ->9
    6     4    >   NEW                                              $9      'DateTimeImmutable'
          5        DO_FCALL                                      0          
          6        ASSIGN_DIM                                               !0
          7        OP_DATA                                                  $9
    5     8        PRE_INC                                                  !1
          9    >   IS_SMALLER                                               !1, !2
         10      > JMPNZ                                                    ~12, ->4
    9    11    >   INIT_FCALL                                               'microtime'
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $13     
         14        ASSIGN                                                   !3, $13
   10    15        ASSIGN                                                   !1, 0
         16      > JMP                                                      ->21
   11    17    >   DECLARE_LAMBDA_FUNCTION                          ~16     [0]
         18        BIND_LEXICAL                                             ~16, !0
   12    19        FREE                                                     ~16
   10    20        PRE_INC                                                  !1
         21    >   IS_SMALLER                                               !1, 100
         22      > JMPNZ                                                    ~18, ->17
   15    23    >   INIT_FCALL                                               'microtime'
         24        SEND_VAL                                                 <true>
         25        DO_ICALL                                         $19     
         26        ASSIGN                                                   !4, $19
   17    27        SUB                                              ~21     !4, !3
         28        MUL                                              ~22     ~21, 1000000
         29        CONCAT                                           ~23     ~22, '%0A%0A'
         30        ECHO                                                     ~23
         31      > 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/Z47r1
function name:  {closure}
number of ops:  2
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   BIND_STATIC                                              !0
   12     1      > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.26 ms | 1002 KiB | 14 Q