3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // palindrom function anagram($s1, $s2) { $l1 = strlen($s1); $l2 = strlen($s2); if($l1 != $l2) return false; return ($s1); // $w1 = array(); $w2 = array(); // for($a=0; $a<$l1; $a++) { if(array_key_exists($s1[$a], $w1) $w1[$s1[$a]]++; else $w[$s1[$a]] = 1; } var_dump($w1); } echo anagram('test', 'test');
Output for 5.4.0 - 5.4.15
Parse error: syntax error, unexpected '$w1' (T_VARIABLE) in /in/WB8N9 on line 16
Process exited with code 255.
Output for 5.3.0 - 5.3.25
Parse error: syntax error, unexpected T_VARIABLE in /in/WB8N9 on line 16
Process exited with code 255.