Let’s create a variable or two and manipulate the strings with Pythons built in functions. #Importing the string module import string tutorial = ‘a crash course in python’ #capitalize the string tutorial.capitalize() #UPPERCASE the entire string import string string.upper(tutorial) #Concatenate…
Matching a string between 4 and 128 characters with PHP and Regex. Works with preg_match and preg_match_all which use the PCRE Library. $string = “tutorial”; if (!preg_match(‘#^(.){4,128}$#’, $string)) { echo ‘The string you entered is invalid.’; }
A list of PHP return types which can be used in function arguments, return values and class properties. Table courtesy of php.net under license. Type Description Version Class/interface name The value must be an instanceof the given class or interface….