3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = "Hello"; $b = "world"; $matching = array_unique(array_intersect(str_split(strtolower($a)), str_split(strtolower($b)))); $s = microtime(true); if(count($matching)>0) echo "\nmatching characters: " . implode(", ", $matching); echo "\n" . (microtime(true)-$s)*100; $t = microtime(true); if($matching) echo "\nmatching characters: " . implode(", ", $matching); echo "\n" . (microtime(true)-$t)*100;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 32
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 47
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
Branch analysis from position: 32
filename:       /in/Vfg6J
function name:  (null)
number of ops:  55
compiled vars:  !0 = $a, !1 = $b, !2 = $matching, !3 = $s, !4 = $t
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'Hello'
    4     1        ASSIGN                                                       !1, 'world'
    6     2        INIT_FCALL                                                   'array_unique'
          3        INIT_FCALL                                                   'array_intersect'
          4        INIT_FCALL                                                   'str_split'
          5        INIT_FCALL                                                   'strtolower'
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                             $7      
          8        SEND_VAR                                                     $7
          9        DO_ICALL                                             $8      
         10        SEND_VAR                                                     $8
         11        INIT_FCALL                                                   'str_split'
         12        INIT_FCALL                                                   'strtolower'
         13        SEND_VAR                                                     !1
         14        DO_ICALL                                             $9      
         15        SEND_VAR                                                     $9
         16        DO_ICALL                                             $10     
         17        SEND_VAR                                                     $10
         18        DO_ICALL                                             $11     
         19        SEND_VAR                                                     $11
         20        DO_ICALL                                             $12     
         21        ASSIGN                                                       !2, $12
    7    22        INIT_FCALL                                                   'microtime'
         23        SEND_VAL                                                     <true>
         24        DO_ICALL                                             $14     
         25        ASSIGN                                                       !3, $14
    8    26        COUNT                                                ~16     !2
         27        IS_SMALLER                                                   0, ~16
         28      > JMPZ                                                         ~17, ->32
         29    >   FRAMELESS_ICALL_2                implode             ~18     '%2C+', !2
         30        CONCAT                                               ~19     '%0Amatching+characters%3A+', ~18
         31        ECHO                                                         ~19
    9    32    >   INIT_FCALL                                                   'microtime'
         33        SEND_VAL                                                     <true>
         34        DO_ICALL                                             $20     
         35        SUB                                                  ~21     $20, !3
         36        MUL                                                  ~22     ~21, 100
         37        CONCAT                                               ~23     '%0A', ~22
         38        ECHO                                                         ~23
   11    39        INIT_FCALL                                                   'microtime'
         40        SEND_VAL                                                     <true>
         41        DO_ICALL                                             $24     
         42        ASSIGN                                                       !4, $24
   12    43      > JMPZ                                                         !2, ->47
         44    >   FRAMELESS_ICALL_2                implode             ~26     '%2C+', !2
         45        CONCAT                                               ~27     '%0Amatching+characters%3A+', ~26
         46        ECHO                                                         ~27
   13    47    >   INIT_FCALL                                                   'microtime'
         48        SEND_VAL                                                     <true>
         49        DO_ICALL                                             $28     
         50        SUB                                                  ~29     $28, !4
         51        MUL                                                  ~30     ~29, 100
         52        CONCAT                                               ~31     '%0A', ~30
         53        ECHO                                                         ~31
   14    54      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.31 ms | 1222 KiB | 18 Q