-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIMP Questions.txt
More file actions
28 lines (28 loc) · 1.77 KB
/
IMP Questions.txt
File metadata and controls
28 lines (28 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--------------------------------------(2)-----------------------------------------------------------
Is PHP a strongly typed language?
Answer:
No, PHP is loosely typed, meaning you don’t need to declare the data type of a variable.
It’s determined automatically.
----------------------------------------(2)---------------------------------------------------------
Why would you use $GLOBALS instead of global?
Answer:
$GLOBALS is more flexible and allows dynamic access to global variables using their names
as string keys. It can be useful in generic functions, loops, or variable functions.
--------------------------------------(3)-----------------------------------------------------------
What happens when a numeric string is added to a number in PHP?
Answer:
PHP automatically converts the string to a number and performs the addition.
---------------------------------------(9)----------------------------------------------------------
What is an Array?
Answer:
An array is a special variable that can hold many values under a single name,
and you can access the values by referring to an index number or name.
PHP Array Types
In PHP, there are three types of arrays:
1- Indexed arrays - Arrays with a numeric index
2- Associative arrays - Arrays with named keys
3- Multidimensional arrays - Arrays containing one or more arrays
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------