0

How do I change the type of a variable in a Constant?

PHP

2nd Mar 2021, 4:28 PM
Александр Коробейников
Александр Коробейников - avatar
3 Respuestas
+ 1
Hi, sorry but I can't understand the instruction clearly. I don't know how to help you when I can't understand the instruction.
3rd Mar 2021, 4:11 PM
Ipang
0
What exactly did you mean "change the type of variables in a constant"? P.S. Put PHP in the thread tags, avoid writing codes into tags ☝
3rd Mar 2021, 7:10 AM
Ipang
0
1. Create a php script lab-1-3.php, in which create a constant NUM_E with a value of 2.71828 (number e). 2. Display the value of this constant in the form of the string "The number e is ...". 3. Assign a constant value to the $ num_e1 variable and display the name of the $ num_e1 variable, its value and type (ie, the browser should get a string like "$ num_e1 = 2.71828 double"). 4. Change the type of the $ num_e1 variable sequentially to string, integer and boolean, each time displaying the type and the resulting value of the $ num_e1 variable.
3rd Mar 2021, 11:14 AM
Александр Коробейников
Александр Коробейников - avatar