For php learners must know simple thing.[PHP] | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 20

For php learners must know simple thing.[PHP]

In PHP function names even class names are not case sensitive. Which might lead us to think that all identifiers in php are not case sensitive. Guess again. Variables ARE case sensitive. See example in comment.

27th Feb 2017, 10:14 AM
Ram chandra Giri
Ram chandra Giri - avatar
1 Answer
+ 21
function add($a, $b) { return $a + $b; } $foo = add(1, 2); $Foo = Add(3, 4); echo "foo is $foo"; // outputs foo is 3 echo "Foo is $Foo"; // outputs Foo is 7 See add and Add are same.
27th Feb 2017, 10:15 AM
Ram chandra Giri
Ram chandra Giri - avatar