3v4l.org

run code in 300+ PHP versions simultaneously
<?php $context = array('test' => array()); // optionally fill-in the test value with lots of data for ($i = 0; $i < 100000; $i++) { $context['test'][$i] = $i; } // you can also just create a big string // $context = str_repeat(' ', 1000000); // benchmark $time = microtime(true); for ($i = 0; $i < 100; $i++) { // the snippet of code to benchmark $tmp = isset($context['test']) ? $context['test'] : ''; } printf("TIME: %0.2d\n", (microtime(true) - $time) * 1000);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 15
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 20
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 15
Branch analysis from position: 25
Branch analysis from position: 15
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 15
Branch analysis from position: 25
Branch analysis from position: 15
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
Branch analysis from position: 3
filename:       /in/QuDvY
function name:  (null)
number of ops:  35
compiled vars:  !0 = $context, !1 = $i, !2 = $time, !3 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    6     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->7
    7     3    >   FETCH_DIM_W                                      $6      !0, 'test'
          4        ASSIGN_DIM                                               $6, !1
          5        OP_DATA                                                  !1
    6     6        PRE_INC                                                  !1
          7    >   IS_SMALLER                                               !1, 100000
          8      > JMPNZ                                                    ~9, ->3
   13     9    >   INIT_FCALL                                               'microtime'
         10        SEND_VAL                                                 <true>
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !2, $10
   14    13        ASSIGN                                                   !1, 0
         14      > JMP                                                      ->23
   16    15    >   ISSET_ISEMPTY_DIM_OBJ                         0          !0, 'test'
         16      > JMPZ                                                     ~13, ->20
         17    >   FETCH_DIM_R                                      ~14     !0, 'test'
         18        QM_ASSIGN                                        ~15     ~14
         19      > JMP                                                      ->21
         20    >   QM_ASSIGN                                        ~15     ''
         21    >   ASSIGN                                                   !3, ~15
   14    22        PRE_INC                                                  !1
         23    >   IS_SMALLER                                               !1, 100
         24      > JMPNZ                                                    ~18, ->15
   18    25    >   INIT_FCALL                                               'printf'
         26        SEND_VAL                                                 'TIME%3A+%250.2d%0A'
         27        INIT_FCALL                                               'microtime'
         28        SEND_VAL                                                 <true>
         29        DO_ICALL                                         $19     
         30        SUB                                              ~20     $19, !2
         31        MUL                                              ~21     ~20, 1000
         32        SEND_VAL                                                 ~21
         33        DO_ICALL                                                 
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
134.59 ms | 1405 KiB | 17 Q