3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i=0; $j=500000; while($i < 60000) { $i++; $j++; $data1[] = md5($i); $data2[] = md5($j); $data3[] = sha($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 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 3
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 3
Branch analysis from position: 22
Branch analysis from position: 3
filename:       /in/1NT75
function name:  (null)
number of ops:  48
compiled vars:  !0 = $i, !1 = $j, !2 = $data1, !3 = $data2, !4 = $data3, !5 = $time, !6 = $data_diff1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
          1        ASSIGN                                                   !1, 500000
    3     2      > JMP                                                      ->20
    4     3    >   PRE_INC                                                  !0
          4        PRE_INC                                                  !1
    5     5        INIT_FCALL                                               'md5'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $12     
          8        ASSIGN_DIM                                               !2
          9        OP_DATA                                                  $12
    6    10        INIT_FCALL                                               'md5'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $14     
         13        ASSIGN_DIM                                               !3
         14        OP_DATA                                                  $14
    7    15        INIT_FCALL_BY_NAME                                       'sha'
         16        SEND_VAR_EX                                              !1
         17        DO_FCALL                                      0  $16     
         18        ASSIGN_DIM                                               !4
         19        OP_DATA                                                  $16
    3    20    >   IS_SMALLER                                               !0, 60000
         21      > JMPNZ                                                    ~17, ->3
   10    22    >   INIT_FCALL                                               'microtime'
         23        SEND_VAL                                                 <true>
         24        DO_ICALL                                         $18     
         25        ASSIGN                                                   !5, $18
   12    26        ECHO                                                     'Starting+array_diff%0A'
   13    27        INIT_FCALL                                               'array_diff'
         28        SEND_VAR                                                 !2
         29        SEND_VAR                                                 !3
         30        DO_ICALL                                         $20     
         31        ASSIGN                                                   !6, $20
   15    32        INIT_FCALL                                               'microtime'
         33        SEND_VAL                                                 <true>
         34        DO_ICALL                                         $22     
         35        SUB                                              ~23     $22, !5
         36        ASSIGN                                                   !5, ~23
   17    37        INIT_FCALL                                               'number_format'
         38        SEND_VAR                                                 !5
         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     !6
         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:
143.86 ms | 1400 KiB | 21 Q