List of helpful shortcuts for faster coding
If you have any other helpful shortcuts, feel free to add in the comments of this gist :)
<?php | |
function camel_to_snake($input) | |
{ | |
return strtolower(preg_replace('/(?<!^)[A-Z]/', '_$0', $input)); | |
} | |
function snakeToCamel($input) | |
{ | |
return lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $input)))); | |
} |
a | |
abbr | |
address | |
area | |
article | |
aside | |
audio | |
b | |
bdi | |
bdo |