adspace
What does type casting mean in php? Explain with an example?
Answer Posted / Pradeep Kumar Rai
Type casting in PHP is a way to explicitly convert data from one type to another. This can be achieved using various built-in functions such as (int), (float), (string), (boolean), (array) etc.nExample: To convert the value of a variable $x containing a string '5' into an integer, use the following statement:
n(int) $x;
After executing this, the value of $x will be 5.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to calculate the difference between two dates using php?
Tell me what kind of things have you done on the social side?
How can we extract string "pcds.co.in" from a string "https://info@pcds.co.in" using regular expression of php? More on reg can you explain
What sized websites have you worked on in the past?
What is the current stable version of php? What advance thing in php7?
What does $_files means?
sort term descripttion form, report and uery
What is difference between static and final in php?
What is the current stable version of php?
Which variable declarations within a class is invalid in php?
Name and explain five of the PHP error constants?
How to create a web form?
List some features of php that are deprecated in php7?
Write a program using while loop?
Explain me is it possible to destroy a cookie?