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); } $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";

Abusive script

This script was stopped while abusing our resources

Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 3
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 3
Branch analysis from position: 19
Branch analysis from position: 3
filename:       /in/am3S3
function name:  (null)
number of ops:  45
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                                                      ->17
   4     3    >   POST_INC                                         ~8      !0
         4        FREE                                                     ~8
         5        POST_INC                                         ~9      !1
         6        FREE                                                     ~9
   5     7        INIT_FCALL                                               'md5'
         8        SEND_VAR                                                 !0
         9        DO_ICALL                                         $11     
        10        ASSIGN_DIM                                               !2
        11        OP_DATA                                                  $11
   6    12        INIT_FCALL                                               'md5'
        13        SEND_VAR                                                 !1
        14        DO_ICALL                                         $13     
        15        ASSIGN_DIM                                               !3
        16        OP_DATA                                                  $13
   3    17    >   IS_SMALLER_OR_EQUAL                              ~14     !0, 60000
        18      > JMPNZ                                                    ~14, ->3
   9    19    >   INIT_FCALL                                               'microtime'
        20        SEND_VAL                                                 <true>
        21        DO_ICALL                                         $15     
        22        ASSIGN                                                   !4, $15
  11    23        ECHO                                                     'Starting+array_diff%0A'
  12    24        INIT_FCALL                                               'array_diff'
        25        SEND_VAR                                                 !2
        26        SEND_VAR                                                 !3
        27        DO_ICALL                                         $17     
        28        ASSIGN                                                   !5, $17
  14    29        INIT_FCALL                                               'microtime'
        30        SEND_VAL                                                 <true>
        31        DO_ICALL                                         $19     
        32        SUB                                              ~20     $19, !4
        33        ASSIGN                                                   !4, ~20
  16    34        INIT_FCALL                                               'number_format'
        35        SEND_VAR                                                 !4
        36        SEND_VAL                                                 3
        37        DO_ICALL                                         $22     
        38        CONCAT                                           ~23     'array_diff%28%29+took+', $22
        39        CONCAT                                           ~24     ~23, '+seconds+and+returned+'
        40        COUNT                                            ~25     !5
        41        CONCAT                                           ~26     ~24, ~25
        42        CONCAT                                           ~27     ~26, '+entries%0A'
        43        ECHO                                                     ~27
        44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
23.26 ms | 416 KiB | 7 Q