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)))); $t = microtime(true); if($matching) echo "\nmatching characters: " . implode(", ", $matching); echo "\n" . (microtime(true)-$t)*100; $s = microtime(true); if(count($matching)>0) echo "\nmatching characters: " . implode(", ", $matching); echo "\n" . (microtime(true)-$s)*100;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 30
Branch analysis from position: 27
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: 30
filename:       /in/H0sjA
function name:  (null)
number of ops:  55
compiled vars:  !0 = $a, !1 = $b, !2 = $matching, !3 = $t, !4 = $s
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
    8    22        INIT_FCALL                                                   'microtime'
         23        SEND_VAL                                                     <true>
         24        DO_ICALL                                             $14     
         25        ASSIGN                                                       !3, $14
    9    26      > JMPZ                                                         !2, ->30
         27    >   FRAMELESS_ICALL_2                implode             ~16     '%2C+', !2
         28        CONCAT                                               ~17     '%0Amatching+characters%3A+', ~16
         29        ECHO                                                         ~17
   10    30    >   INIT_FCALL                                                   'microtime'
         31        SEND_VAL                                                     <true>
         32        DO_ICALL                                             $18     
         33        SUB                                                  ~19     $18, !3
         34        MUL                                                  ~20     ~19, 100
         35        CONCAT                                               ~21     '%0A', ~20
         36        ECHO                                                         ~21
   12    37        INIT_FCALL                                                   'microtime'
         38        SEND_VAL                                                     <true>
         39        DO_ICALL                                             $22     
         40        ASSIGN                                                       !4, $22
   13    41        COUNT                                                ~24     !2
         42        IS_SMALLER                                                   0, ~24
         43      > JMPZ                                                         ~25, ->47
         44    >   FRAMELESS_ICALL_2                implode             ~26     '%2C+', !2
         45        CONCAT                                               ~27     '%0Amatching+characters%3A+', ~26
         46        ECHO                                                         ~27
   14    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
   15    54      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.91 ms | 1386 KiB | 18 Q