3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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/>'; } ?>
Output for 5.1.0 - 5.6.21, 7.0.0 - 7.1.0
Notice: Undefined variable: include_dir in /in/Jk52U on line 2 Warning: require_once(levenshtein.php): failed to open stream: No such file or directory in /in/Jk52U on line 2 Fatal error: require_once(): Failed opening required 'levenshtein.php' (include_path='.:') in /in/Jk52U on line 2
Process exited with code 255.
Output for hhvm-3.12.0
Notice: Undefined variable: include_dir in /in/Jk52U on line 2 Fatal error: File not found: levenshtein.php in /in/Jk52U on line 2
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: include_dir in /in/Jk52U on line 2 Warning: main(levenshtein.php): failed to open stream: No such file or directory in /in/Jk52U on line 2 Fatal error: main(): Failed opening required 'levenshtein.php' (include_path='.:') in /in/Jk52U on line 2
Process exited with code 255.
Output for 4.3.2 - 5.0.3
Notice: Undefined variable: include_dir in /in/Jk52U on line 2 Warning: main(levenshtein.php): failed to open stream: No such file or directory in /in/Jk52U on line 2 Fatal error: main(): Failed opening required 'levenshtein.php' (include_path='.:') in /in/Jk52U on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: include_dir in /in/Jk52U on line 2 Warning: main(levenshtein.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/Jk52U on line 2 Fatal error: main() [http://www.php.net/function.main]: Failed opening required 'levenshtein.php' (include_path='.:') in /in/Jk52U on line 2