This article mainly introduces the use of PHP to define constants using define, interested in the reference of friends, I hope to be helpful to everyone.
Specific as follows:
<?php/* * * * * * */* 3rd parameter: * False--sensitive to case (default) * True--insensitive to capitalization * */define ("Pai", 3.14); Define ("name", "Lilei", true); function Testfor ($x) {for ($a = $x; $a <=12; $a + +) { echo "is now a $ A point:"; if ($a <9) { echo "knock Code"; echo name; } else { echo "sleeps"; echo pai; } echo "<br/>"; } } testfor (10);? >
The results of the operation are as follows:
Now it's 10: Sleep 3.14.
Now it's 11: Sleep 3.14.
Now it's 12: Sleep 3.14.
Summary : The above is the entire content of this article, I hope to be able to help you learn.
Related recommendations:
PHP more Secure password encryption mechanism bcrypt text
PHP implementation of bulk upload data to the database method
How PHP uses the socket to obtain the SSL certificate and public key of the website