3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i=0; $j=5000; while($i < 6000) { $i++; $j++; $data1[] = md5($i); $data2[] = md5($j); } $time = microtime(true); echo "Starting array_diff\n"; for ($i = 0; $i < 100; $i++) { $data_diff1 = array_diff($data1, $data2); } $time = microtime(true) - $time; echo 'array_diff() took ' . number_format($time, 3) . ' seconds and returned ' . count($data_diff1) . " entries\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 3
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 24
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 24
Branch analysis from position: 32
Branch analysis from position: 24
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 3
Branch analysis from position: 17
Branch analysis from position: 3
filename:       /in/R4nrC
function name:  (null)
number of ops:  48
compiled vars:  !0 = $i, !1 = $j, !2 = $data1, !3 = $data2, !4 = $time, !5 = $data_diff1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
          1        ASSIGN                                                   !1, 5000
    3     2      > JMP                                                      ->15
    4     3    >   PRE_INC                                                  !0
          4        PRE_INC                                                  !1
    5     5        INIT_FCALL                                               'md5'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $11     
          8        ASSIGN_DIM                                               !2
          9        OP_DATA                                                  $11
    6    10        INIT_FCALL                                               'md5'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $13     
         13        ASSIGN_DIM                                               !3
         14        OP_DATA                                                  $13
    3    15    >   IS_SMALLER                                               !0, 6000
         16      > JMPNZ                                                    ~14, ->3
    9    17    >   INIT_FCALL                                               'microtime'
         18        SEND_VAL                                                 <true>
         19        DO_ICALL                                         $15     
         20        ASSIGN                                                   !4, $15
   11    21        ECHO                                                     'Starting+array_diff%0A'
   12    22        ASSIGN                                                   !0, 0
         23      > JMP                                                      ->30
   13    24    >   INIT_FCALL                                               'array_diff'
         25        SEND_VAR                                                 !2
         26        SEND_VAR                                                 !3
         27        DO_ICALL                                         $18     
         28        ASSIGN                                                   !5, $18
   12    29        PRE_INC                                                  !0
         30    >   IS_SMALLER                                               !0, 100
         31      > JMPNZ                                                    ~21, ->24
   16    32    >   INIT_FCALL                                               'microtime'
         33        SEND_VAL                                                 <true>
         34        DO_ICALL                                         $22     
         35        SUB                                              ~23     $22, !4
         36        ASSIGN                                                   !4, ~23
   18    37        INIT_FCALL                                               'number_format'
         38        SEND_VAR                                                 !4
         39        SEND_VAL                                                 3
         40        DO_ICALL                                         $25     
         41        CONCAT                                           ~26     'array_diff%28%29+took+', $25
         42        CONCAT                                           ~27     ~26, '+seconds+and+returned+'
         43        COUNT                                            ~28     !5
         44        CONCAT                                           ~29     ~27, ~28
         45        CONCAT                                           ~30     ~29, '+entries%0A'
         46        ECHO                                                     ~30
         47      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.44 ms | 1392 KiB | 21 Q