Q. If you attempt to declare a variable without _________________________ it, you will receive an error.
Q. Data types that can be assigned only a single value are called _________________________.
A. Primitive Type
“Today, let’s examine the three Ps: Perl, PHP and Python. All these three languages are dynamic and powerful in their own way and can be used in different scenarios, but they are most commonly used to build Web applications and for scripting. Perl is a general-purpose, high-level, dynamic programming language.” – opensourceforu.com/2017/06/guide-programming-perl-php-python/
Q. Explain loops in PHP?
for − loops through a block of code a specified number of times.
while − loops through a block of code if and as long as a specified condition is true.
do…while − loops through a block of code once, then repeats loop as long as special condition is true.
foreach − loops through a block of code for each element in an array.
A foreach could be modified and used similar as a do…while loop, by adding a break to meed a condition
The for, for..while, and do..while are essentially all doing the same thing aside from adding pre and post-loop conditions before or after loop fires. I believe they could really all be modified and used interchangeable if determined and really needed such as the foreach example.
Q. A _________________________is a variable that is declared outside a function and is available to all parts of your program.
Q. ________________________ are declared inside a function and are only available within the function in which they are declared.
Q. The foreach statement is used to iterate or loop through the elements in a(n) _________________________.
Q. The _________________________ statement controls program flow by executing a specific set of statements, depending on the value of the expression.
Q. Explain break and continue.
continue is used within looping structures to skip the rest of the current loop iteration and continue execution at the condition evaluation and then the beginning of the next iteration.
break ends execution of the current for, foreach, while, do-while or switch structure.
ends a loop completely,
just shortcuts the current iteration and moves on to the next iteration.
Q. Unlike other programming languages, PHP has no special data type for a(n) _________________________ character.
Q. What is the most commonly used string function, which returns the total number of characters in a string?
Q. Under what circumstances would you want to convert a text string to a numerical data?
When, from a variable you need or require numeric data, not text or a word. Such cases as needing numeric data to do math operations on in the future etc. Or another scenario could be pertaining to zip codes in web forms.
“This situation happens when a visitor submits a form which contains a numeric field(ex. zipcode), but, when you try to get the value in the next page, it shows as a string.” – http://schoolsofweb.com/how-to-convert-a-string-to-an-integer-in-php/
preg_match — Perform a regular expression match==operator, Returns true if $x is equal to $y“strcmp() can serve in place of == because it returns 0 when two strings are equal. There is an urban myth amongst PHP programmers that == is faster than strcmp(), however the reality is that it is just as fast, and you can use the two interchangeably if you wish. One thing, though: using ==, you get a “1” if two strings match, whereas with strcmp() you get a 0″ – http://www.hackingwithphp.com/4/7/15/comparing-stringspreg_match however is most different from the two as it executes with regular expressions; which is also said to be a more expensive approach in the longer run with execution and strpos should be considered first.
Q. The _________________________ method is the preferred way to transfer form data to the processing script.
Q. To, Subject, and Message are the three required arguments of the _________________________ function.
Q. In PHP the _________________________ function is used to change the permissions on a file.
Q. The _________________________ function prevents multiple users from modifying a file simultaneously.
Q. To add or remove elements from the beginning of an array, you need to use the array_shift() and _________________________ functions.
Q. You can use the _________________________ function to determine whether a given index or key exists.
Q. Each column in a database table is called a(n) _________________________.
Q. You can select unique values from a table using the _________________________keyword.
A. SELECT DISTINCT
Q. For large datasets stored in external files, it is more efficient to use the _________________________ statement to add multiple records to an existing table.
A. Load Data
Q. The triple equal sign (===) verifies that the two variables not only parse to be the same, but they are of the same _________________________
A. type and value
Q. Use the _________________________ function to send SQL statements to MySQL.
“Non-relational databases, also called NoSQLdatabases, the most popular beingMongoDB, DocumentDB,Cassandra, Coachbase, HBase, Redis, and Neo4j.” describes James Serra’s technical blog on the topic at www.jamesserra.com/archive/2015/08/relational-databases-vs-non-relational-databases/ “Relational databases like MySQL, PostgreSQL and SQLite3 represent and store data in tables and rows. They’re based on a branch of algebraic set theory known as relational algebra. Meanwhile, non-relational databases like MongoDB represent data in collections of JSON documents. The Mongo import utility can import JSON, CSV and TSV file formats. Mongo query targets of data are technically represented as BSON (binary JASON).” describes Jacqueline Homan in here relevant article at ‘https://www.pluralsight.com/blog/software-development/relational-non-relational-databases’.
Q. Cookies created with only the _________________________ and _________________________ arguments are temporary cookies because they are available for only the current browser session.
A. name and value arguments
Q. To store persistent data about a Web site visit, with hidden form fields, query strings, cookies, and sessions is called _________________________.
A. Maintaining state
“The object-oriented modeling approach creates the union of the application and database development and transforms it into a unified data model and language environment. Object-oriented modeling allows for object identification and communication while supporting data abstraction, inheritance and encapsulation.” states TechnoPedia at ‘https://www.techopedia.com/definition/28584/object-oriented-modeling-oom’