3v4l.org

run code in 300+ PHP versions simultaneously
<?php //iterator $array = array('Obst' => 'Banane','Gemüse' => 'Tomate','Teigwaren' => 'Nudeln'); $beginn = microtime(true); #end($array); for(current($array); key($array) !== Null; next($array)) { echo key($array). " -> "; echo current($array)."<br />"; } $dauer = microtime(true) - $beginn; echo "Verarbeitung des Skripts (iterator): $dauer Sek.<br />"; //for each $array = array('Obst' => 'Banane','Gemüse' => 'Tomate','Teigwaren' => 'Nudeln'); $beginn = microtime(true); #$reverse = array_reverse($array); foreach($array as $key => $value) { echo $key. " -> "; echo $value."<br />"; } $dauer = microtime(true) - $beginn; echo "Verarbeitung des Skripts (klassisch): $dauer Sek."; ?>
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 = 27, Position 2 = 9
Branch analysis from position: 27
2 jumps found. (Code = 77) Position 1 = 42, Position 2 = 49
Branch analysis from position: 42
2 jumps found. (Code = 78) Position 1 = 43, Position 2 = 49
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 49
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 9
Branch analysis from position: 27
Branch analysis from position: 9
filename:       /in/PedOV
function name:  (null)
number of ops:  60
compiled vars:  !0 = $array, !1 = $beginn, !2 = $dauer, !3 = $value, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !1, $6
    6     5        INIT_FCALL                                               'current'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > JMP                                                      ->22
    7     9    >   INIT_FCALL                                               'key'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $9      
         12        CONCAT                                           ~10     $9, '+-%3E+'
         13        ECHO                                                     ~10
    8    14        INIT_FCALL                                               'current'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $11     
         17        CONCAT                                           ~12     $11, '%3Cbr+%2F%3E'
         18        ECHO                                                     ~12
    6    19        INIT_FCALL                                               'next'
         20        SEND_REF                                                 !0
         21        DO_ICALL                                                 
         22    >   INIT_FCALL                                               'key'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $14     
         25        TYPE_CHECK                                  1020          $14
         26      > JMPNZ                                                    ~15, ->9
   10    27    >   INIT_FCALL                                               'microtime'
         28        SEND_VAL                                                 <true>
         29        DO_ICALL                                         $16     
         30        SUB                                              ~17     $16, !1
         31        ASSIGN                                                   !2, ~17
   11    32        ROPE_INIT                                     3  ~20     'Verarbeitung+des+Skripts+%28iterator%29%3A+'
         33        ROPE_ADD                                      1  ~20     ~20, !2
         34        ROPE_END                                      2  ~19     ~20, '+Sek.%3Cbr+%2F%3E'
         35        ECHO                                                     ~19
   14    36        ASSIGN                                                   !0, <array>
   15    37        INIT_FCALL                                               'microtime'
         38        SEND_VAL                                                 <true>
         39        DO_ICALL                                         $23     
         40        ASSIGN                                                   !1, $23
   17    41      > FE_RESET_R                                       $25     !0, ->49
         42    > > FE_FETCH_R                                       ~26     $25, !3, ->49
         43    >   ASSIGN                                                   !4, ~26
   18    44        CONCAT                                           ~28     !4, '+-%3E+'
         45        ECHO                                                     ~28
   19    46        CONCAT                                           ~29     !3, '%3Cbr+%2F%3E'
         47        ECHO                                                     ~29
   17    48      > JMP                                                      ->42
         49    >   FE_FREE                                                  $25
   21    50        INIT_FCALL                                               'microtime'
         51        SEND_VAL                                                 <true>
         52        DO_ICALL                                         $30     
         53        SUB                                              ~31     $30, !1
         54        ASSIGN                                                   !2, ~31
   22    55        ROPE_INIT                                     3  ~34     'Verarbeitung+des+Skripts+%28klassisch%29%3A+'
         56        ROPE_ADD                                      1  ~34     ~34, !2
         57        ROPE_END                                      2  ~33     ~34, '+Sek.'
         58        ECHO                                                     ~33
   23    59      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.08 ms | 1400 KiB | 21 Q