Introduction to PHP Miscellaneous Topics

In this lesson our instructor talks about some of the miscellaneous topics of PHP. First, he discusses register_globals directive, $_GET and $HTTP_GET_VARS. Then he talks about magic constants, exist(), and die(). Additionally, he also lectures on execution operator, array operators, variable variables, and variable functions.

Miscellaneous Topics

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

We can see that, when we perform the union of array 1 and array 2, the output that we get is an array that contains the key mon with the value Monday, the key tue with the value Tuesday, and the key wed with the uppercase value WEDNESDAY.1393

What happens is: any of the new or unique key/value pairs in the right operand get appended to the left operand's array.1411

Because Monday and Tuesday (or the keys mon and tue) were already defined in array 1, those aren't considered new key/value pairs.1421

So, the array keeps the values that it already had associated with those keys.1429

However, the key wed with the value WEDNESDAY does not exist in this left operand array, or array 1,1435

so it gets appended to the array; and you can see that it has the key wed with the value WEDNESDAY.1443