3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string='sadfsakfjbsadjkfhsadkjfhasdlkjhfksahjksdhfkjasdhflkjashfkjshadkfjhsakldfjhsakf'; $time=microtime(true); for($i=0;$i<1000;$i++) removeaccents1($string); $time=mictotime(true)-$time; echo "New took $time seconds\n"; $time=microtime(true); for($i=0;$i<1000;$i++) removeaccents2($string); $time=mictotime(true)-$time; echo "Old took $time seconds\n"; function removeaccents1($string) { return utf8_encode(strtr(utf8_decode($string),utf8_decode('ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ'),'SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy')); } function removeaccents2($string) { return strtr($string,'ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ','SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy')); }
Output for 5.3.0 - 5.5.9
Parse error: syntax error, unexpected ')' in /in/eWGTR on line 22
Process exited with code 255.