3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function slugify($text) { $text = trim($text); $text = strtr( utf8_decode($text), "\xe1\xc1\xe0\xc0\xe2\xc2\xe4\xc4\xe3\xc3\xe5\xc5" . "\xaa\xe7\xc7\xe9\xc9\xe8\xc8\xea\xca\xeb\xcb\xed" . "\xcd\xec\xcc\xee\xce\xef\xcf\xf1\xd1\xf3\xd3\xf2" . "\xd2\xf4\xd4\xf6\xd6\xf5\xd5\x8\xd8\xba\xf0\xfa\xda" . "\xf9\xd9\xfb\xdb\xfc\xdc\xfd\xdd\xff\xe6\xc6\xdf\xf8", "aAaAaAaAaAaAacCeEeEeEeEiIiIiIiInNo" . "OoOoOoOoOoOoouUuUuUuUyYyaAso" ); $text = preg_replace('![^a-z0-9]!i', ' ', $text); $text = preg_replace('!\s{2,}!', ' ', $text); $text = preg_replace('!\s!', '_', $text); return $text; } for($i=0;$i<=10;$i++) slugify( ''"6è1es(r51-_dih56bs1z"6bt' );
Output for 5.4.0 - 5.4.32
Parse error: syntax error, unexpected '"6è1es(r51-_dih56bs1z"' (T_CONSTANT_ENCAPSED_STRING) in /in/LgioB on line 37
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /in/LgioB on line 37
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /in/LgioB on line 37
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/LgioB on line 37
Process exited with code 255.