3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = microtime(true); $steps = 0; for ($i = 0; $i < 10000000; $i += 1) { $steps += $i; } $time = microtime(true) - $time; echo 'array_diff() took ' . number_format($time, 3) . ' seconds'.PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 7
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 7
Branch analysis from position: 11
Branch analysis from position: 7
filename:       /in/18DeA
function name:  (null)
number of ops:  25
compiled vars:  !0 = $time, !1 = $steps, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    4     4        ASSIGN                                                   !1, 0
    5     5        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->9
    6     7    >   ASSIGN_OP                                     1          !1, !2
    5     8        ASSIGN_OP                                     1          !2, 1
          9    >   IS_SMALLER                                               !2, 10000000
         10      > JMPNZ                                                    ~9, ->7
    9    11    >   INIT_FCALL                                               'microtime'
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $10     
         14        SUB                                              ~11     $10, !0
         15        ASSIGN                                                   !0, ~11
   11    16        INIT_FCALL                                               'number_format'
         17        SEND_VAR                                                 !0
         18        SEND_VAL                                                 3
         19        DO_ICALL                                         $13     
         20        CONCAT                                           ~14     'array_diff%28%29+took+', $13
         21        CONCAT                                           ~15     ~14, '+seconds'
         22        CONCAT                                           ~16     ~15, '%0A'
         23        ECHO                                                     ~16
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.57 ms | 1395 KiB | 17 Q