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, call_user_func(function ($context·cfcd208495d565ef66e7dff9f98764da) { return function ($item) use ($context·cfcd208495d565ef66e7dff9f98764da) { extract($context·cfcd208495d565ef66e7dff9f98764da); return $item !== $ignore; }; }, get_defined_vars())); } echo (microtime(1) - $a) * 1000;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 8
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 8
Branch analysis from position: 21
Branch analysis from position: 8
filename:       /in/3WQZ5
function name:  (null)
number of ops:  28
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                                                      ->19
    8     8    >   INIT_FCALL                                               'array_filter'
          9        SEND_VAR                                                 !0
         10        DECLARE_LAMBDA_FUNCTION                          ~9      [0]
   13    11        INIT_USER_CALL                                1          'call_user_func', ~9
         12        INIT_FCALL                                               'get_defined_vars'
         13        DO_ICALL                                         $10     
         14        SEND_USER                                                $10
         15        DO_FCALL                                      0  $11     
         16        SEND_VAR                                                 $11
    8    17        DO_ICALL                                                 
    7    18        PRE_INC                                                  !3
         19    >   IS_SMALLER                                               !3, 10000
         20      > JMPNZ                                                    ~14, ->8
   15    21    >   INIT_FCALL                                               'microtime'
         22        SEND_VAL                                                 1
         23        DO_ICALL                                         $15     
         24        SUB                                              ~16     $15, !2
         25        MUL                                              ~17     ~16, 1000
         26        ECHO                                                     ~17
         27      > 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/3WQZ5
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $context·cfcd208495d565ef66e7dff9f98764da
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        DECLARE_LAMBDA_FUNCTION                          ~1      [0]
          2        BIND_LEXICAL                                             ~1, !0
   12     3      > RETURN                                                   ~1
   13     4*     > RETURN                                                   null


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

End of Dynamic Function 0

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.85 ms | 1013 KiB | 17 Q