Programming Articles - Page 2869 of 3368

IntlChar::isalnum() function in PHP

Samual Sam
Updated on 30-Dec-2019 07:36:57

181 Views

The IntlChar::isalnum() function is used to check the given input is an alphanumeric character or not. The alphanumeric character is a digit or letter.Syntaxbool IntlChar::isalnum(val)Parametersval − An integer values or character encoded as a UTF-8 string.ReturnThe IntlChar::isalnum()function returns TRUE if the val is alphanumeric.ExampleThe following is an example −OutputThe following is the output −NULL NULL NULL bool(true)ExampleLet us see another example −OutputThe following is the output −bool(false) bool(true)

IntlChar::isbase() function in PHP

karthikeya Boyini
Updated on 30-Dec-2019 07:50:46

102 Views

The IntlChar::isbase() function is used to check the given input data is a base character or not.SyntaxIntlChar::isbase( val)Parametersval − An integer or character encoded as a UTF-8 string. Required.ReturnThe IntlChar::isbase() function returns TRUE if the val is a base character.ExampleThe following is an example −OutputThe following is the output −bool(true) NULL NULL NULL

IntlChar::isalpha() function in PHP

karthikeya Boyini
Updated on 30-Dec-2019 07:49:49

364 Views

The IntlChar::isalpha() function is used to check the given input is an alphanumeric character or not.SyntaxIntlChar::isalpha( $val )Parametersval − An integer values or character encoded as a UTF-8 string.Required.ReturnThe IntlChar::isalpha() function returns TRUE if the val is alphanumeric character.ExampleThe following is an example −OutputThe following is the output −bool(false) bool(true)ExampleLet us see another example wherein we are checking for alphanumeric characters −OutputThe following is the output −NULL NULL NULL bool(true)

Check if a string ends with given word in PHP

Samual Sam
Updated on 30-Dec-2019 07:50:17

528 Views

Create a function to check whether a string ends with the specified string or not. The function should return TRUE on success or FALSE on failure.The following is the syntax −endFunc(str, lastStr)Consider the following parameters in it to check −str − The string to be testedlastStr − The text to be searched in the end of the specified string.ExampleThe following is an example − Live DemoOutputThe following is the output −False!

Check if a string starts with given word in PHP

karthikeya Boyini
Updated on 30-Dec-2019 07:24:01

745 Views

Create a function to check whether a string begins with the specified string or not. The function should return TRUE on success or FALSE on failure.The following is the syntax −begnWith(str, begnStr)Consider the following parameters in it to check −str − The string to be testedbegnStr − The text to be searched in the beginning of the specified string.ExampleThe following is an example − Live Demo

connection_status() function in PHP

Samual Sam
Updated on 30-Jul-2019 22:30:24

172 Views

The connection_status() function returns the connection status.Syntaxconnection_status()ParametersNAReturnThe connection_status() function returns the following possible values. This is the status bitfield −0 - CONNECTION_NORMAL - connection is running normally1 - CONNECTION_ABORTED - connection is aborted by user or network error2 - CONNECTION_TIMEOUT - connection timed out3 - CONNECTION_ABORTED & CONNECTION_TIMEOUTExampleThe following is an example − Live Demo

mail() function in PHP

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

368 Views

The mail() function allows in sending emails directly from a script.Syntaxmail(to,sub,msg,headers,parameters);Parametersto − The receiver / receivers of the emailsub − The subject of the email.msg − The message to be sent.headers − The additional headers, such as From, Cc, and Bcc.parameters − The additional parameter to the sendmail program. This was added in PHP 4.0.5.ReturnThe mail() function returns the hash value of the address parameter, or FALSE on failure.ExampleThe following is an example to send an email −

ezmlm_hash() function in PHP

Samual Sam
Updated on 30-Jul-2019 22:30:24

133 Views

The ezmlm_hash() function calculates the hash value needed when keeping EZMLM mailing lists in a MySQL database.Syntaxezmlm_hash(addr);Parametersaddr − The email address being hashed.ReturnThe ezmlm_hash() function returns the hash value of addr.ExampleThe following is an example −

ftp_systype() function in PHP

Samual Sam
Updated on 30-Jul-2019 22:30:24

91 Views

The ftp_systype() function returns the system type identifier of the FTP server.Syntaxftp_systype(con);Parameterscon − The FTP connectionReturnThe ftp_systype() function returns the system type on success, or FALSE on failure.ExampleThe following is an example −

ftp_ssl_connect() function in PHP

Samual Sam
Updated on 30-Jul-2019 22:30:24

338 Views

The ftp_ssl_connect() function opens a secure SSL-FTP connection.Syntaxftp_ssl_connect(host,port,timeout);Parametershost − The FTP server address. Can be a domain address or an IP address.port − The port to connect to. Here the default is 21.timeout − The timeout for network operations.ReturnThe ftp_ssl_connect() function returns a SSL-FTP stream on success or FALSE on error.ExampleThe following is an example −

Advertisements