Started at 23:54 26.10.2020 Monday Oct.
Finished at 00:04 27.10.2020 Tuesday Oct. (0hrs 10minutes)
Last active
October 26, 2020 17:04
-
-
Save lbvf50mobile/0a33adccbbd5e54cf89e4465ac6b4f41 to your computer and use it in GitHub Desktop.
Just PHP FUN 138.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# https://www.codewars.com/kata/57f8ff867a28db569e000c4a Kebabize. | |
function kebabize($string) { | |
$string = preg_replace('/[0-9]+/',"",$string); | |
$string = preg_replace ('/([A-Z])/','-\1',$string); | |
return strtolower(trim($string,"-")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment