answersLogoWhite

0

Generally, constant names are case sensitive in PHP.

But... you can do a trick. If you will be consistent and all constant name will be defines as uppercase, you can access them using a combination of constant() and strtoupper() functions. Look at this example:

?php

define(MY_CONSTANT, "HELLO");

echo constant(strtoupper(my_constant));

echo "
";

echo constant(strtoupper(My_Constant));

echo "
";

echo constant(strtoupper(my_CONSTANT));

?>

User Avatar

Wiki User

11y ago

What else can I help you with?

Continue Learning about Basic Math

How do you declare a constant?

use: define("GREETING", "Hello you.", true); 1st parameter is the name for your constant 2nd parameter is the value of that constant 3rd parameter is whether or not you want the constant to be case-insensitive. Default is case sensitive. http://php.net/manual/en/function.define.php


What makes a good password?

Use combination of letters, numbers, and special characters. Use both upper-case and lower-case letters. Do NOT use your own name, any family members' names, or pets's names, or for that matter any words Do NOT use birthdates, social security numbers, or any set of numbers that someone else might know. Make it something YOU can remember, but no one else can guess. If you have to change your password regularly, come up with a "base" password that is 2 characters shorter than a full password, then the last 2 characters can change from month to month.


Is there a number bigger than graham's number?

Yes, there is, but it has no name, for grahams number was and is still the largest number with a name. To make a number larger than grahams number, you just need to make grahams number 1, but it would not have a name because it is not official, and if you try to write it down, you could not, because all matter in the universe transformed into pen ink could not write it down. And if you tried to type it, your computer or whatever you where typing it on would fail.


What is an equivalent decimal for 0.80?

Well, darling, 0.80 is the same as 80 hundredths, so the equivalent decimal would be 0.80. It's like asking if a rose by any other name would smell as sweet - in this case, yes, 0.80 is still 0.80 no matter how you slice it.


What are the Error occurs when no checkbox is checked in PHP?

Suppose you have checkbox in HTML from and and you are calling that checkbox by name in php , In that case in you don't check and hit submit , You will get Undefined parameter 'name_of _checkbox' As Error.

Related Questions

How do you declare a constant?

use: define("GREETING", "Hello you.", true); 1st parameter is the name for your constant 2nd parameter is the value of that constant 3rd parameter is whether or not you want the constant to be case-insensitive. Default is case sensitive. http://php.net/manual/en/function.define.php


Was Chief Knockahoma's dance after Atlanta Braves' home runs racially insensitive?

No, it was not insensitive; but some folks just needed a reason to complain. If it was so insensitive, why not have the Indians remove Chief Wahoo from their uniforms? Why do the Red Skins get to keep their football name?


What ethnically insensitive name did Joyce call her lover on Hill Street Blues?

Pizzaman


What is the birth name of Benjamin Constant?

Benjamin Constant's birth name is de Rebecque, Benjamin Henri Constant.


What is the name of a value that does not change?

A "constant"


What was final jeopardy for february 16 2012?

PEOPLE IN HISTORYThe name of this assassin is Latin for heavy, dull, insensitive, oafishBrutus


What is the birth name of Aina Constant?

Aina Constant's birth name is Aina Konstant.


What is the birth name of Charles Constant?

Charles Constant's birth name is Charles Constantino.


What was the final Jeopardy category and answer and question for February 16 2012?

PEOPLE IN HISTORYThe name of this assassin is Latin for heavy, dull, insensitive, oafishBrutus


Name two things you need to keep the same to help make tests fair in science?

Some ways which you make tests fair: -Try keep the temperature constant -Try to make as many conditions apart from the IV (the thing your changing) the same -Repeat 3 times in case of anomalies which don't show how the test should have turned out


What type of data has another name for constant?

a any other name of this tipe of data


Difference between rate constant and specific rate constant?

There is no difference between them they are same rate constant is another name of specific rate constant