Predefined Variables, Exceptions, Interfaces, and Classes Flashcards

1
Q

What are the superglobals?

A
$GLOBALS
$_SERVER
$_GET
$_POST
$_FILES
$_COOKIE
$_SESSION
$_REQUEST
$_ENV
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is $php_errormsg?

A

It contains the text of the last error message generated by PHP. This variable will only be available within the scope in which the error occurred, and only if the track_errors configuration option is turned on (it defaults to off).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is $http_response_header?

A

The $http_response_header array is similar to the get_headers() function. When using the HTTP wrapper, $http_response_header will be populated with the HTTP response headers. $http_response_header will be created in the local scope.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is $argc?

A

It contains the number of arguments passed to the current script when running from the command line.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is $argv?

A

It contains an array of all the arguments passed to the script when running from the command line.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is Exception?

A

Exception is the base class for all exceptions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Are Exceptions clonable?

A

No.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is ErrorException?

A

A predefined error exception class that extends Exception.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the predefined interfaces and classes?

A
Traversable
Iterator
IteratorAggregate
ArrayAccess
Serializable
Closure
Generator
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How can Traversable be implemented?

A

It’s an abstract base class that cannot be implemented alone. It must be implemented by either IteratorAggregate or Iterator. It has no methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Can generator objects be instantiated with new?

A

No.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly