3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = microtime(true); for ($i = 0; $i < 10000; $i++) { $array = []; foreach ($_SERVER as $key => $value) { if (0 === strpos($key, 'SCRIPT_')) { $array[] = $key; } } } var_dump($array, microtime(true) - $time);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 6
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 20
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 20
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 19
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 6
Branch analysis from position: 24
Branch analysis from position: 6
Branch analysis from position: 20
filename:       /in/2rGNs
function name:  (null)
number of ops:  33
compiled vars:  !0 = $time, !1 = $i, !2 = $array, !3 = $value, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $5      
          3        ASSIGN                                                   !0, $5
    5     4        ASSIGN                                                   !1, 0
          5      > JMP                                                      ->22
    6     6    >   ASSIGN                                                   !2, <array>
    7     7        FETCH_R                      global              ~9      '_SERVER'
          8      > FE_RESET_R                                       $10     ~9, ->20
          9    > > FE_FETCH_R                                       ~11     $10, !3, ->20
         10    >   ASSIGN                                                   !4, ~11
    8    11        INIT_FCALL                                               'strpos'
         12        SEND_VAR                                                 !4
         13        SEND_VAL                                                 'SCRIPT_'
         14        DO_ICALL                                         $13     
         15        IS_IDENTICAL                                             $13, 0
         16      > JMPZ                                                     ~14, ->19
    9    17    >   ASSIGN_DIM                                               !2
         18        OP_DATA                                                  !4
    7    19    > > JMP                                                      ->9
         20    >   FE_FREE                                                  $10
    5    21        PRE_INC                                                  !1
         22    >   IS_SMALLER                                               !1, 10000
         23      > JMPNZ                                                    ~17, ->6
   14    24    >   INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !2
         26        INIT_FCALL                                               'microtime'
         27        SEND_VAL                                                 <true>
         28        DO_ICALL                                         $18     
         29        SUB                                              ~19     $18, !0
         30        SEND_VAL                                                 ~19
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.15 ms | 1396 KiB | 19 Q