PHP mysqli: thread_safe() function
mysqli_thread_safe() function / mysqli::thread_safe
The mysqli_thread_safe() function / mysqli::thread_safe returns whether the client library is compiled as thread-safe.
Syntax:
bool mysqli_thread_safe ( void )
Usage
mysqli_thread_safe();
Return value:
TRUE if the client library is thread-safe, otherwise FALSE.
Version: PHP 5, PHP 7
Example:
<?php
if(mysqli_connect_errno($con))
{
echo "Unable to connect: ".mysqli_connect_error();
}
echo mysqli_thread_safe();
mysqli_close($con);
?>
See also
Previous: thread_id
Next: use_result
PHP: Tips of the Day
To use the constant simply use its name:
Example:
if (EARTH_IS_FLAT) { print "Earth is flat"; } print APP_ENV_UPPERCASE;
Output:
or if you don't know the name of the constant in advance, use the constant function:
// this code is equivalent to the above code $const1 = "EARTH_IS_FLAT"; $const2 = "APP_ENV_UPPERCASE"; if (constant($const1)) { print "Earth is flat"; } print constant($const2);
Output:
- Weekly Trends
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join
- JavaScript functions Exercises
- Python Tutorial
- Python Array Exercises
- SQL Cross Join
- C# Sharp Array Exercises
We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook