3v4l.org

run code in 300+ PHP versions simultaneously
<?php function testMetaphone($s1 = "", $s2 = "", $phonemes = 4) { if (empty($s1) || empty($s2)) { return false; } $m1 = metaphone($s1, $phonemes); $m2 = metaphone($s2, $phonemes); $sim = similar_text($m1, $m2, $perc); $logMessage = "M1: {$m1}, M2: {$m2}, Similarity: $sim ($perc %) - Originals text: {$s1} | {$s2}"; echo("testMetaphone: " . $logMessage); // Test accuracy if ($perc >= 85) { return true; } else { return false; } } $answerCheck = testMetaphone("Toyota", "Totota", 6); var_dump($answerCheck);
Output for git.master, git.master_jit, rfc.property-hooks
testMetaphone: M1: TYT, M2: TTT, Similarity: 2 (66.666666666667 %) - Originals text: Toyota | Tototabool(false)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
113.79 ms | 405 KiB | 5 Q