I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what is the problem?
Answer / Om Prakash Meena
In PHP, numbers and strings are treated differently. The string "0123" is interpreted as an octal (base 8) number, which has a value of 67. To assign the value 0123 as an integer or decimal number, you can remove the leading zeros:n`n$num = 0123; // Integern$decimalNum = 0.123; // Decimaln`
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the advantages and disadvantages of cascade style sheets?
What are the advantages of triggers in php?
When is a conditional statement ended with endif?
Tell me how is it possible to remove escape characters from a string?
How to concatenate two strings in php?
Does php need a closing tag?
Explain a resource?
What is better .net or php?
Which php function will attach one file to another?
Explain me what is the w3c?
What is html used for?
What is die in php?