3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i=0; $j=500000; while($i < 60000) { $i++; $j++; $data1[] = 'qweqweqweqwe' . $i; $data2[] = 'qweqweqweqwe' . $j; } $time = microtime(true); echo "Starting array_diff\n"; $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 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 3
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 3
Branch analysis from position: 13
Branch analysis from position: 3
filename:       /in/e5Jjf
function name:  (null)
number of ops:  39
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, 500000
    3     2      > JMP                                                      ->11
    4     3    >   PRE_INC                                                  !0
          4        PRE_INC                                                  !1
    5     5        CONCAT                                           ~11     'qweqweqweqwe', !0
          6        ASSIGN_DIM                                               !2
          7        OP_DATA                                                  ~11
    6     8        CONCAT                                           ~13     'qweqweqweqwe', !1
          9        ASSIGN_DIM                                               !3
         10        OP_DATA                                                  ~13
    3    11    >   IS_SMALLER                                               !0, 60000
         12      > JMPNZ                                                    ~14, ->3
    9    13    >   INIT_FCALL                                               'microtime'
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $15     
         16        ASSIGN                                                   !4, $15
   11    17        ECHO                                                     'Starting+array_diff%0A'
   12    18        INIT_FCALL                                               'array_diff'
         19        SEND_VAR                                                 !2
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                         $17     
         22        ASSIGN                                                   !5, $17
   14    23        INIT_FCALL                                               'microtime'
         24        SEND_VAL                                                 <true>
         25        DO_ICALL                                         $19     
         26        SUB                                              ~20     $19, !4
         27        ASSIGN                                                   !4, ~20
   16    28        INIT_FCALL                                               'number_format'
         29        SEND_VAR                                                 !4
         30        SEND_VAL                                                 3
         31        DO_ICALL                                         $22     
         32        CONCAT                                           ~23     'array_diff%28%29+took+', $22
         33        CONCAT                                           ~24     ~23, '+seconds+and+returned+'
         34        COUNT                                            ~25     !5
         35        CONCAT                                           ~26     ~24, ~25
         36        CONCAT                                           ~27     ~26, '+entries%0A'
         37        ECHO                                                     ~27
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.4 ms | 1400 KiB | 20 Q