3v4l.org

run code in 300+ PHP versions simultaneously
<?php $funcs = get_defined_functions(); $funcs = array_merge($funcs['user'], $funcs['internal']); $shortest = 0; $closest = ''; $find = metaphone('pretty'); foreach ($funcs as $func) { $func = str_replace('_', ' ', $func); if (metaphone($func) === $find) { echo "Found $func"; break; } } echo 'Found ', $closest ? $closest : 'none';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 34
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 34
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 33
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 39
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 34
Branch analysis from position: 34
filename:       /in/kYVuA
function name:  (null)
number of ops:  42
compiled vars:  !0 = $funcs, !1 = $shortest, !2 = $closest, !3 = $find, !4 = $func
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'get_defined_functions'
          1        DO_ICALL                                         $5      
          2        ASSIGN                                                   !0, $5
    4     3        INIT_FCALL                                               'array_merge'
          4        FETCH_DIM_R                                      ~7      !0, 'user'
          5        SEND_VAL                                                 ~7
          6        FETCH_DIM_R                                      ~8      !0, 'internal'
          7        SEND_VAL                                                 ~8
          8        DO_ICALL                                         $9      
          9        ASSIGN                                                   !0, $9
    5    10        ASSIGN                                                   !1, 0
    6    11        ASSIGN                                                   !2, ''
    7    12        INIT_FCALL                                               'metaphone'
         13        SEND_VAL                                                 'pretty'
         14        DO_ICALL                                         $13     
         15        ASSIGN                                                   !3, $13
    9    16      > FE_RESET_R                                       $15     !0, ->34
         17    > > FE_FETCH_R                                               $15, !4, ->34
   10    18    >   INIT_FCALL                                               'str_replace'
         19        SEND_VAL                                                 '_'
         20        SEND_VAL                                                 '+'
         21        SEND_VAR                                                 !4
         22        DO_ICALL                                         $16     
         23        ASSIGN                                                   !4, $16
   12    24        INIT_FCALL                                               'metaphone'
         25        SEND_VAR                                                 !4
         26        DO_ICALL                                         $18     
         27        IS_IDENTICAL                                             !3, $18
         28      > JMPZ                                                     ~19, ->33
   13    29    >   NOP                                                      
         30        FAST_CONCAT                                      ~20     'Found+', !4
         31        ECHO                                                     ~20
   14    32      > JMP                                                      ->34
    9    33    > > JMP                                                      ->17
         34    >   FE_FREE                                                  $15
   18    35        ECHO                                                     'Found+'
         36      > JMPZ                                                     !2, ->39
         37    >   QM_ASSIGN                                        ~21     !2
         38      > JMP                                                      ->40
         39    >   QM_ASSIGN                                        ~21     'none'
         40    >   ECHO                                                     ~21
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.5 ms | 1400 KiB | 21 Q