3v4l.org

run code in 300+ PHP versions simultaneously
<?php require_once($include_dir . 'levenshtein.php'); $test = array( array('abc', 'abc'), //0 array('kitten', 'sitting'), //3 array('smei', 'mei'), //2 array('12345', '234'),//3 array('おしり', 'めがね'), //4 array('照明', '照明'), //0 array('いじめ', 'いじり'), //2 array('もずくのかに', 'かに'), //5 array('CDショップ', 'Cショック'), //2 array('火事', '花火'), //2 ); foreach ($test as $row) { echo '<hr>'; echo $row[0].','.$row[1]; // echo ' | '; // echo levenshtein($row[0], $row[1]); // echo ' = '; var_dump(LevenshteinDistance($row[0], $row[1], 1, 'UTF-8')); echo '<br/>'; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 26
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 26
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/Jk52U
function name:  (null)
number of ops:  28
compiled vars:  !0 = $include_dir, !1 = $test, !2 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   CONCAT                                           ~3      !0, 'levenshtein.php'
          1        INCLUDE_OR_EVAL                                          ~3, REQUIRE_ONCE
    4     2        ASSIGN                                                   !1, <array>
   16     3      > FE_RESET_R                                       $6      !1, ->26
          4    > > FE_FETCH_R                                               $6, !2, ->26
   17     5    >   ECHO                                                     '%3Chr%3E'
   18     6        FETCH_DIM_R                                      ~7      !2, 0
          7        CONCAT                                           ~8      ~7, '%2C'
          8        FETCH_DIM_R                                      ~9      !2, 1
          9        CONCAT                                           ~10     ~8, ~9
         10        ECHO                                                     ~10
   22    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL_BY_NAME                                       'LevenshteinDistance'
         13        CHECK_FUNC_ARG                                           
         14        FETCH_DIM_FUNC_ARG                               $11     !2, 0
         15        SEND_FUNC_ARG                                            $11
         16        CHECK_FUNC_ARG                                           
         17        FETCH_DIM_FUNC_ARG                               $12     !2, 1
         18        SEND_FUNC_ARG                                            $12
         19        SEND_VAL_EX                                              1
         20        SEND_VAL_EX                                              'UTF-8'
         21        DO_FCALL                                      0  $13     
         22        SEND_VAR                                                 $13
         23        DO_ICALL                                                 
   23    24        ECHO                                                     '%3Cbr%2F%3E'
   16    25      > JMP                                                      ->4
         26    >   FE_FREE                                                  $6
   26    27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.18 ms | 1401 KiB | 15 Q