PHP
PHP
a. statement termination
b. concatenation
c. line continuation
d. subtraction
a. throws an error
b. throws a warning
d. ignores it
a. //
b. /*
c. */
d. --
a. braces
b. single quotation marks
c. parentheses
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
7 Which of the following PHP data types stores only true or false values?
a. Float
b. Array
c. Object
d. Boolean
a. var
b. define
c. echo
d. phpinfo
9 Which of the following statements tests for equality between the PHP variables $a and $b?
a. $a = $b
b. $a == $b
c. $a -> $b
d. $a | $b
1 In PHP, which bitwise operation is signified by the pipe (|) character?
a. OR
b. XOR
c. AND
d. NOT
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
a. fopen()
b. fputs()
c. open()
d. fp()
a. fputs()
b. fopen()
c. fwrite()
d. fp()
3 In PHP, a while loop tests for the end of the file by using which function?
a. fputs()
b. fopen()
c. feof()
d. fgets()
a. fread()
b. file_exists()
c. fgetc()
d. fgets()
a. LOCK_SH
b. LOCK_EX
c. LOCK_UN
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
d. LOCK_NB
6 Which of the following is NOT a problem of working with flat files in PHP?
a. LAMP
b. DBA
c. API
d. RDBMS
a. 2
b. 3
c. 4
d. 1
a. w
b. x
c. b
d. w+
1 Disable PHP from opening files via fopen() and FTP by editing:
a. php.ini
b. fopen.ini
c. fopen.bin
d. php.bin
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
a. array
b. scalar
c. dictionary
d. index
a. 1
b. 0
c. null
d. -1
a. first
b. middle
c. last
d. overall
The __________ construct can be used to split an array into a number of values.
a. while()
b. list()
c. foreach()
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
d. each()
a. !==
b. !=
c. <>
d. `===
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
7 The PHP constant ____________ will sort an array as strings depending on the current
locale.
a. SORT_LOCALE
b. SORT_NATURAL
c. SORT_LOCALE_STRING
d. SORT_STRING
8 The three different PHP sorting functions are sort(), asort(), and:
a. ksort()
b. sortkr()
c. sorta()
d. sortr()
9 The _________ function modifies every element in an array the same way.
a. array_walk()
b. next()
c. reset()
d. prev()
a. multidimensional
b. scalar
c. sorted
d. non-indexed
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
a. trim()
b. ltrim()
c. rtrim()
d. \0
a. <
b. >
c. '
d. &
4 Which PHP function takes a string as a parameter and replaces all the newlines in it with the
HTML <br /> tag?
a. str_replace()
b. n12br()
c. htmlspecialchars()
d. trim()
Which of the following conversion specification type codes interprets as an integer and
prints as a character?
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
a. c
b. i
c. b
d. d
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
6 Which of the following PHP expressions can get the domain name from a customer's email
address?
a. 5
b. 1
c. False
d. True
a. /
b. \
c. //
d. \\
1 Which of the following regex tokens anchors your match to the beginning of the subject
string?
a. /
b. $
c. ^
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
d. |
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
1. Which of the following is a PHP statement that allows you to load a file into your PHP script?
a. #include
b. require()
c. main()
d. #require
a. auto_append_file
b. require_prepend
c. auto_prepend_file
d. require_append
a. code block
b. parameter
c. constant
d. variable
a. prototype
b. reference
c. member
d. variable
c. are case-sensitive
d. are case-insensitive
d. PHP function names can contain only letters, digits, and underscores.
PHP variables that are declared inside a function are known as:
a. inside variables
b. local variables
c. outside variables
d. global variables
In PHP, the normal way that function parameters are called is known as:
c. pass by value
d. pass by class
a. local
b. recursive
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
c. global
d. return
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
a. operations
b. methods
c. functions
d. attributes
2 ________ are methods, actions, or functions that an object can perform to modify itself or
perform some external effect.
a. Attributes
b. Operations
c. Interfaces
d. Variables
3 The object-oriented principle of ____________ means that different classes can have
different behaviors for the same operation.
a. polymorphism
b. inheritance
c. class
d. variability
a. classes
b. functions
c. variables
d. attributes
a. method
b. constructor
c. destructor
d. attribute
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
a. protected
b. private
c. public
d. variable
7 Use the _________ keyword to specify that one class is to be a subclass of another.
a. extends
b. new
c. protected
d. private
8 Which of the following shows the correct use of the final PHP keyword?
1. function operation(final) {}
2. final function operation() {}
3. function final operation() {}
4. final function operation("final") {}
9 Which of the following programming languages does NOT support true multiple inheritance?
1. Python
2. C++
3. PHP
4. Smalltalk
1 In a PHP __________, you can group together functionality that may be reused in multiple
classes.
1. interface
2. trait
3. per-class constant
4. constructor
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
a. catch
b. throw
c. finally
d. try
2 In PHP you can have __________ catch block(s) associated with a single try block.
a. no
b. only one
d. only two
3 Which of the following is NOT a built-in method of the Exception PHP class?
a. getString()
b. getTrace()
c. getCode()
d. toString()
5 In PHP, the ________ block always is executed after the try and catch blocks.
a. finally
b. exception
c. else
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
d. throw
6 A(n) __________ shows which functions were executing at the time the exception was
raised.
a. string
b. backtrace
c. trace
d. extension
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
a. dynamic
b. final
c. idempotent
d. temporary
8 In PHP it's considered good coding practice to implement _______ try blocks in your code.
a. comprehensive
b. small
c. branching
d. large
9Which of the following is NOT a valid optional parameter of the PHP Exception class?
a. stack trace
b. error message
c. error code
d. previous exception
1 In creating your own subclass Exceptions, you can override the ________ built-in
function.
a. getCode()
b. toString()
c. getPrevious()
d. getFile()
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
1. What is the most commonly used type of database according to the book's authors?
1. flat file
2. document-based
3. relational
4. NoSQL
2 In a relational database table, each value must have the _____________ specified by its
column.
1. tuple
2. name
3. record
4. data type
1. one or more
2. one
3. two
4. zero
1. modification
2. creation
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
3. insertion
4. deletion
6 Atomic column values mean that you store only _______ attribute(s) in each row.
1. 0
2. 1
4. array
7 Having many _________ values in your database wastes space and causes problems working
out totals.
1. binary
2. atomic
3. null
4. string
1. end user
2. PHP code
3. web browser
4. PHP engine
1. column
2. key
3. relation
4. attribute
1 A foreign key should have the same or comparable _________ as its related primary key.
1. string length
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
2. data type
3. name
4. column order
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
1. What is phpMyAdmin?
a. MySQL installer
b. MySQL client libraries
4 You can use a(n) ____________ as an alternative to implementing MySQL user passwords.
a. passphrase
b. authentication plugin
c. PIN
d. biometric
5The ___________ MySQL statement allows a specified database user to grant his or her
own privileges to others.
a. WITH
b. WITH GRANT OPTION
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
c. GRANT
d. IDENTIFIED BY
6 Which of the following MySQL privileges allows users to remove databases, tables, or
views?
a. DROP
b. TRIGGER
c. DELETE
d. EXECUTE
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
7 Which of the following MySQL privileges allows users to run stored procedures and
functions?
a. EXECUTE
b. PROXY
c. INDEX
d. ROUTINE
c. administrator privilege
d. user privilege
a. DENY
b. DROP
c. REVOKE
d. DISCONNECT
1 Which of the following commands do you use to specify which MySQL database you want
to use?
a. SWITCH
b. USE
c. USING
d. INCLUDE
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
a. VALUES
b. SELECT
c. COLUMN
d. HAVING
3 The SELECT ___________ wildcard operator matches all the columns in the specified table or
tables.
a. *
b. ?
c. %
d. null
4 Which of the following WHERE clause operators tests whether two values are not equal?
a. IS NOT
b. !=
c. ><
d. IS NULL
a. LIKE
b. REGEXP
c. POSIX
d. IS NULL
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
6 A(n) ___________ join represents the Cartesian product of two tables in a SQL database.
a. full
b. outer
c. double
d. inner
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
a. only 2
b. up to 4
c. up to 16
d. unlimited
8 What is represented by the C in the SQL statement SELECT C.Name FROM Customers AS C?
a. table alias
b. column alias
c. key alias
d. row alias
a. inner join
b. equi-join
c. cross join
d. left join
1 What is the default sort order used by the SQL ORDER BY clause?
a. ascending
b. none
c. descending
d. pseudo-random
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
a. mysqli
b. mysqlb
c. phpMyAdmin
d. mysqld
a. error suppression
b. connection string
c. alternate credentials
a. PHP
b. MySQL
c. Apache
d. SQL
4 MySQL ____________ can speed up query execution as well as protect against SQL
injection attacks.
a. query hints
b. stored procedures
c. triggers
d. prepared statements
6 You can use the generic _______ functions if you want to use a database that doesn't already
have a PHP library.
a. SQL
b. XML
c. ODBC
d. LAMP
8 What is the first step in querying a MySQL database from the web?
a. mysqli_query()
b. mysqli_select_db()
c. mysqli_connect()
d. mysqli_switch()
1 Why is the query $query = "SELECT ISBN, Author, Title, Price FROM Book WHERE
$searchtype = '$searchterm'"; problematic?
a. too resource-intensive
b. missing an ORDER BY clause
1. What command is used to view all tables in the current MySQL database?
a. LIST TABLES;
b. SHOW TABLES;
c. SELECT TABLES;
d. VIEW TABLES;
2 Privilege-related MySQL tables have priv __________ the associated table name.
a. in the middle
b. instead of
c. after
d. before
3 The ___________ table determines which users can access which databases from which
hosts.
a. db
b. sys
c. priv
d. proxies
4 What is the first step in how MySQL uses grant tables to determine what a user is allowed to
do?
a. request verification
b. select verification
c. connection verification
d. multifactor authentication
c. update privileges
6What is the most sensitive account password on a Unix- or Linux-based MySQL server?
a. admin
b. sa
c. root
d. sudo
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
a. password()
b. encrypt()
c. asymmetric()
d. flush()
8 Which of the following is NOT a MySQL command used to gather more information about a
given database?
a. GRANT
b. DESCRIBE
c. EXPLAIN
d. SHOW
9The ___________ MySQL statement is an alternative for the SHOW COLUMNS statement.
a. EXPLAIN
b. GRANT
c. SELECT
d. DESCRIBE
1What is the result of running the MySQL command EXPLAIN SELECT Customer,
Balance FROM Customers;?
1. What privilege is required for a MySQL database user to employ the LOAD DATA INFILE
statement?
a. FILE
b. ALTER
c. GRANT OPTION
d. INDEX
a. MyISAM
b. MEMORY
c. InnoDB
d. MERGE
3 Which MySQL storage engine stores large amounts of data but with a small footprint?
a. MyISAM
b. ARCHIVE
c. InnoDB
d. MEMORY
a. atoms
b. MEMORY tables
c. MyISAM tables
d. transactions
a. InnoDB
b. INSERT
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
c. isolation
d. index
7 A(n) __________ is a programatic function that is created and stored within MySQL.
a. stored procedure
b. trigger
c. function
d. index
8 What is the purpose of 'Total' in the MySQL statement CREATE PROCEDURE Total_Orders
(OUT Total FLOAT);?
a. parameter
b. function
c. stored procedure
d. trigger
In MySQL, a deterministic function will, given the same parameter, always return:
a. an error
b. a different value
c. no value
a. START...END
b. BEGIN...END
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
c. TRY...CATCH
d. IF...ELSEIF
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
1. Attacks that involve accessing or modifying your data as it travels over the network are known
as __________ attacks.
a. man-in-the-middle
b. traceroute
c. SSL
d. social engineering
2 A(n) ___________ attack occurs when somebody's actions make it difficult or impossible for
users to access a service.
a. DoS
b. MITM
c. SQL injection
d. SSL
a. CSS
b. XSS
c. DoS
d. MITM
4 What is the name of the default super user account on Microsoft Windows systems?
a. sa
b. administrator
c. root
d. superuser
5 What is the name of the default super user account on Linux systems?
a. root
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
b. sa
c. admin
d. administrator
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
6 ______ occurs when a party involved in a transaction denies having taken part.
a. Non-repudiation
b. Man-in-the-middle
c. Repudiation
d. Cross-site scripting
7 ____________ attempt to find weaknesses in software and work their way past these to
achieve their goals.
a. Data spies
b. Crackers
c. Hardware thieves
d. Hackers
8 Which of the following is a good resource for learning more about the threats to your web
applications?
a. phpMyAdmin
b. MITM
c. XSS
d. OWASP
a. authorization
b. indexing
c. authentication
d. accounting
1A ___________ involves somebody sending out junk e-mail with the target listed as the
sender.
a. reverse MITM
b. forward MITM
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
c. forward spam
d. reverse spam
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
c. external sources
2 The _______ extension has the added security advantage of allowing only a single query to
execute with certain methods.
a. httpd
b. mysqld
c. mysqli
d. myPHPadmin
a. HTML tags
b. HTML entities
c. XML entities
d. XML tags
4 Which of the following is the HTML entity that represents the right angle bracket?
a. "
b. >
c. <
d. ©
5 Which of the following terms refers to the reappearance of bugs previously cleared in your
code?
a. defenestation
b. regression
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
c. Q/A
d. prototyping
a. backtick
b. parentheses
c. single quote
d. double quote
7 Consider keeping your _____________ file in source control and make sure to review its
contents frequently.
a. apache.conf
b. php.net
c. php.ini
d. httpd.ini
8 A(n) __________ is a screened subnet on which to place your public-facing web application
servers.
a. MITM
b. DMZ
c. DDoS
d. SSL
1 Any file not intended to be directly user-accessible should be _____________ of the
website.
a. locked out
b. encrypted outside
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
d. outside
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
1. The most common authentication method used in PHP web applications is ___________
authentication.
a. biometric
b. password
c. retinal
d. multi-factor
2 A one-way __________ mechanism can provide better password security with very little
extra effort.
a. compression
b. SSL
c. hashing
d. biometric
a. MD5
b. Crypt
c. SSL
d. SHA1
4 In PHP 5.5, use the _________ function to apply a strong one-way hash to a string.
a. password_crypt()
b. password_hash()
c. crypt_blowfish()
d. pwhash()
5 Be certain to combine HTTP basic authentication with _____ to protect all parts of a web
transaction.
a. password hashing
b. auto_prepend_file
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
c. SSL
d. password salting
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
7 The file _____________ is used on web servers to control access to files and subdirectories.
a. 401.html
b. .htaccess
c. php.ini
d. httpd.conf
8 Which of the following represents how to specify Basic authentication in the .htaccess file?
a. AuthType Basic
b. AuthName Basic
c. AuthBasicProvider true
d. ErrorDocument true
a. mod_auth_digest
b. AuthName
c. AuthType
d. mod_auth_basic
a. MD5
b. Blowfish
c. SHA1
d. SHA2
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
1. Which php.ini directive controls whether HTTP file uploads are allowed?
a. upload_max_filesize
b. upload_tmp_dir
c. file_uploads
d. post_max_size
2 Which php.ini directive defines how often the session upload progress information should
be updated?
a. session.upload_progress.min_freq
b. session.upload_progress.enabled
c. session.upload_progress.freq
d. session.upload_progress.prefix
3 You can implement the PHP __________ function to mitigate the risk of users "directory
surfing" your web server.
a. feof()
b. basename()
c. file()
d. ftell()
a. delete directories
b. rename directives
c. delete directives
d. rename directories
5 Which of the following PHP functions is NOT supported on Windows-based web servers?
a. mkdir()
b. file()
c. fileowner()
d. rmdir()
6 Which PHP function returns the timestamp of the time the file was last modified?
a. filemtime()
b. fileatime()
c. filetype()
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
d. fileperms()
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
7Which of the following is a PHP function that changes the permissions on a file?
a. chperm()
b. chmod()
c. chgrp()
d. chown()
8 Which of the following is a PHP function that can be used to delete files?
a. unlink()
b. rmdir()
c. delete()
d. rm()
9 What is the result of the command exec("ls -la"); when run on a UNIX system?
1 The PHP function _________ can stop users from maliciously (or otherwise) executing OS
commands on your web server.
a. escapeshellcmd()
b. exec()
c. passthru()
d. proc_close()
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
a. TXTs
b. RFCs
c. POP3s
d. RPCs
a. SMTP
b. POP3
c. TLS
d. IMAP4
3 The _________ library allows you to log into a website and mimic a user's progress through
a few pages.
a. cURL
b. fopen
c. RFC
d. FTP
a. variable=value
b. /script.php
c. anchor
d. example.com
5 Using PHP, we can use ___________ and FTP file functions to connect to and transfer files.
a. fopen()
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
b. feof()
c. file()
d. fileatime()
6 It's good practice to provide a(n) ____________ when connecting to anonymous FTP sites.
a. password
b. email address
c. IP address
d. hostname
c. all data connections will be initiated by the remote FTP server instead of by the client
d. all data connections will be initiated by the client rather than by the remote FTP server
a. binary
b. octal
c. decimal
d. hexadecimal
9 The PHP function ftp_fget() differs from ftp_get() in that the former:
a. 60 seconds
b. 90 seconds
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
c. 30 seconds
d. 120 seconds
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
1. Which of the following is the php.ini setting that controls the default time zone?
a. date.timezone
b. date.time
c. timezone.date
d. strtotime.timezone
2 The function call echo date('jS F Y'); produces a date in the format:
3 Which of the following date() format codes identifies the time zone?
a. e
b. d
c. i
d. I
Use the _________ PHP function to convert a date and time to a UNIX timestamp.
a. mktime()
b. strftime()
c. microtime()
d. gmmktime()
a. Windows epoch
b. Windows time zone
c. UNIX epoch
6 Which of the following PHP functions is useful to check whether a date is valid?
a. date_sub()
b. date_modify()
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
c. date_parse_from_format()
d. checkdate()
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
a. %X
b. %M
c. %S
d. %B
a. MySQL
b. PHP
c. Apache
d. Bash
9 Which of the following DATE_FORMAT() format codes denotes the day of the year, numeric?
a. %j
b. %p
c. %Y
d. %D
a. milliseconds
b. microseconds
c. nanoseconds
d. seconds
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
a. internationalize
b. modify
c. internalize
d. translate
a. multi-byte
b. single-byte
c. internationalized
d. localized
3 The PHP function ______ provides an API wrapper to the GNU gettext package.
a. bin2hex()
b. chr()
c. gettext()
d. fprintf()
a. locale identifiers
b. string identifiers
c. translation identifiers
d. externalization identifiers
a. 256
b. 1
c. 8
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
d. 16
6 Which of the following is a character set-related security issue with PHP and MySQL?
d. PHP version
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
a. GNU bash
b. GNU gettext
c. MySQL
8 When configuring PHP for compiling on Linux or macOS, use the _________ configuration
flag.
a. --disable-short-tags
b. --enable-libgcc
c. --with-gettext
d. --with-libdir
9 Verify GCC gettext support on your PHP web server by calling the _________ function.
a. phpversion()
b. phpcredits()
c. phpinfo()
d. php_check_syntax()
a. .cfg
b. .po
c. .conf
d. .bin
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
1. The ________ image library is included but not enabled by default in PHP.
a. Intervention Image
b. GD2
c. ImageMagick
d. Zebra_Image
a. JPEG
b. PNG
c. GIF
d. SVG
d. cleaning up resources
d. cleaning up resources
a. CMYK
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
b. PMS
c. RGB
d. SVG
a. bottom left
b. top right
c. top left
d. bottom right
7 Which PHP image management function returns the resources you've been using on the
server?
a. imagestring()
b. imagedestroy()
c. imagepng()
d. imageline()
c. only in memory
9 Under Windows, PNG images are supported as long as you have the __________ extension
registered.
a. libpng
b. php.ini
c. php_gd2.dll
d. zlib
a. SVG
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
b. PNG
c. JPEG
d. GIF
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
c. URIs
d. stateless HTTP
2 An HTTP cookie is a small piece of information that PHP scripts store most often:
a. delete_cookie()
b. rmcookie()
c. setcookie()
d. remove_cookie()
4 Which php.ini directive should be set to instruct PHP to store session IDs in URLs?
a. session.gc_maxlifetime
b. session.cache_expire
c. session.use_trans_sid
d. session.cookie_domain
c. starting a session
d. deregistering variables
6 Which of the following php.ini directives defines where session data is stored?
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
a. session.save_handler
b. session.use_cookies
c. session.cookie_domain
d. session.cookie_secure
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
a. hexadecimal numbers
b. Unicode text
c. key/value pairs
d. binary numbers
a. path
b. unsecure
c. domain
d. lifetime
a. TRANS_ID
b. SID
c. SESSION_ID
d. TRANS_SESSION_ID
a. XHTML
b. XAML
c. XPath
d. XML
a. /
b. $
c. ?
d. #
a. id selector
b. class selector
c. name selector
d. token selector
5 The jQuery __________ event fires when all the resources for a given HTML document have
been properly loaded.
a. proxy
b. ready
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
c. trigger
d. bind
6 Which of the following jQuery events is triggered when a form element receives focus?
a. focusout
b. focus
c. hover
d. focusin
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
7 Fundamentally, all AJAX methods are simplified versions of the ___________ API method.
a. $.get()
b. $.post()
c. $.getJSON()
d. $.ajax()
8 You integrate the jQuery library into your web application through the ________ tag.
a. src
b. script
c. head
d. a
9 The jQuery.noConflict() method is helpful to avoid conflicts with other libraries that use
the _________ symbol.
a. #
b. $
c. &
d. %
a. class
b. id
c. tag
d. global
PHP and MySQL Web Development, Fifth Edition
Luke Welling and Laura Thomson
a. string
b. integer
c. float
d. Boolean
a. 0
b. true
c. nothing
d. 1
3 Which term refers to the process of turning anything you can store in a PHP variable into a
bytestream?
a. AJAX
b. array
c. concatenation
d. serialization
4 What PHP function allows you to easily see what function sets are available?
a. get_loaded_extensions()
b. extension_loaded()
c. phpinfo()
d. dl()
a. php.ini
b. phpinfo
c. my.ini
d. httpd.conf
a. show_source()
b. pack()
c. highlight_script()
d. highlight_string()
8 What is missing in the statement php -r 'for($i=1; $i<10; $i++) echo $i;'?
c. curly braces
d. XHTML tags
9 What is the most common use case for the PHP eval() function?
a. AJAX applications
b. templating systems
c. jQuery widgets
a. unpack()
b. usleep()
c. exit()
d. __halt_compiler()