3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = ["one", "two", "three", "one", "two", "three", "one", "two", "three", "one", "two", "three", "one", "two", "three"]; $ignore = "two"; $a = microtime(1); for ($i = 0; $i < 10000; $i++) { array_filter($items, function ($item) use ($ignore) { return $item !== $ignore; }); } echo (microtime(1) - $a) * 1000;
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 = 8
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 8
Branch analysis from position: 17
Branch analysis from position: 8
filename:       /in/fjGTJ
function name:  (null)
number of ops:  24
compiled vars:  !0 = $items, !1 = $ignore, !2 = $a, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 'two'
    6     2        INIT_FCALL                                               'microtime'
          3        SEND_VAL                                                 1
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !2, $6
    7     6        ASSIGN                                                   !3, 0
          7      > JMP                                                      ->15
    8     8    >   INIT_FCALL                                               'array_filter'
          9        SEND_VAR                                                 !0
         10        DECLARE_LAMBDA_FUNCTION                          ~9      [0]
         11        BIND_LEXICAL                                             ~9, !1
   10    12        SEND_VAL                                                 ~9
    8    13        DO_ICALL                                                 
    7    14        PRE_INC                                                  !3
         15    >   IS_SMALLER                                               !3, 10000
         16      > JMPNZ                                                    ~12, ->8
   12    17    >   INIT_FCALL                                               'microtime'
         18        SEND_VAL                                                 1
         19        DO_ICALL                                         $13     
         20        SUB                                              ~14     $13, !2
         21        MUL                                              ~15     ~14, 1000
         22        ECHO                                                     ~15
         23      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fjGTJ
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $item, !1 = $ignore
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
    9     2        IS_NOT_IDENTICAL                                 ~2      !0, !1
          3      > RETURN                                                   ~2
   10     4*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.93 ms | 1007 KiB | 15 Q