hi all,
im new to php and im stuck with a "constant" problem.
i was studying a code snippet and trying to creat a constant with define() like this:
define("ABC",1,TRUE).
i dont understand why it results nothing if the second parameter is 0.
The consant type is boolean and it works fine if the parameter is
1, but if it is 0, it seems as if it doesnt handle it at all.
thanks
szita1
0
Newbie Poster
Recommended Answers
Jump to PostIt's as if what doesn't handle it at all. define doesn't return anything accept true/false whether it successfully declared the constant or not. What exactly are you trying to do?
Jump to PostYes. It should return boolean false. What are you getting instead? What is the output of:
var_dump(EW_IS_WINDOWS);
All 5 Replies
ShawnCplus
456
Code Monkey
Team Colleague
szita1
0
Newbie Poster
ShawnCplus
456
Code Monkey
Team Colleague
szita1
0
Newbie Poster
ShawnCplus
456
Code Monkey
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.