3v4l.org

run code in 300+ PHP versions simultaneously
<?php $scrambled_word = "rerimafa;eorzdsntictaimoa;sgiytihe;rleadf;opflpy;imtadx;ynivdiit;owdes;etylvroc;rasomr"; function asciiSum($word) { $characters = str_split(strtolower($word)); $sum = 0; foreach($characters as $character) { $sum += ord($character); } return $sum; } function alphWord($word) { $alphWord = str_split($word); sort($alphWord); $alphWord = implode('', $alphWord); return $alphWord; } $scrambled_word = explode(";", $scrambled_word); $words = explode("\n", file_get_contents('dictionary.txt')); $password = ''; for ($x = 0; $x <= 9; $x++) { foreach ($words as $word) { if (strlen($scrambled_word[$x]) === strlen($word)) { // Same lenght? if(asciiSum($scrambled_word[$x]) == asciiSum($word)) { // Same ascii score? if(alphWord($scrambled_word[$x]) == alphWord($word)) { // Same word after alph order? $password .= $word.';'; break; } } } } } echo substr($password, 0, -1); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: file_get_contents(): open_basedir restriction in effect. File(dictionary.txt) is not within the allowed path(s): (/tmp:/in:/etc) in /in/B85Nk on line 22 Warning: file_get_contents(dictionary.txt): Failed to open stream: Operation not permitted in /in/B85Nk on line 22

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:
52.2 ms | 402 KiB | 8 Q