
Discover PHP, a general language called hypertext processor for dynamic web applications; it supports procedural and object oriented programming with PHP tags that print hello world in a browser.
Explore how PHP handles function name case sensitivity with practical examples showing that function names are case sensitive and calls with different case fail to execute.
Explore the contrast between strongly typed languages like Java and PHP's loosely typed, dynamically determined types, and see how PHP infers types at runtime.
learn how to set up a PHP development environment by downloading and installing the necessary software on Windows, Linux, or macOS, and configure it with popular cross-platform options.
Discover how Composer simplifies PHP dependency management by downloading, updating, and autoloading libraries like Guzzle and Monologue, ensuring secure, updated components for your application.
Discover Packagist as the repository for PHP packages, where Composer downloads dependencies, developers publish packages, and others browse and install these libraries from the site.
Learn how to execute a PHP script from the command line, using the command prompt to run PHP code directly from the terminal.
Explore how virtual hosts enable hosting multiple websites on one server, using ip-based addressing or name-based addressing to run several domains on a single machine.
XAMPP and WAMP bundles provide preconfigured Apache, MySQL, and PHP for easy development, avoiding manual setup. Compare their integrated environments as flexible options for PHP projects.
Explore the Apache web server, the most widely used web server, and how it handles client requests and PHP interpretation. Learn to configure Apache on Windows and Linux.
Learn to check the current php version and gather other system information by using the command line, with sample output showing versions such as 7.1.6.
Learn how an interpreter executes programs line by line, reading each instruction, handling blank lines, and printing outcomes as functions run.
The lecture shows that PHP is both compiled and interpreted, using a compiler to produce bytecode and an interpreter to execute it, with symbol tables for variables and constants.
Explore what a framework is as a collection of libraries built to achieve a specific goal, with Laravel as an example for building applications featuring routing, middleware, and CSRF protections.
mvc stands for model view controller, an application design pattern where the controller handles requests, the model supplies data, and the view presents the response.
Explore how data types provide storage for values, enable compiler optimizations, and dictate which operations are allowed, such as numeric multiplication for numbers.
Identify PHP data types, including integer, alphanumeric text (string), double, boolean, object, null, and resource, with examples like 1995 and 7.9, and true or false.
Explore the rules for declaring variables in PHP: variable names can start with underscores, may include numbers, but must avoid plus, minus, modulo operators, and commas.
Define constants in PHP using define function, which takes two parameters: the constant name and its value, with an example showing how to declare and view it in the browser.
Learn how the PHP constant() function retrieves values defined with define, with an example like main size 50. Compare it to static access by name.
Compare PHP constants and variables: constants use define, have global scope and cannot be reassigned; variables use simple assignment and follow local scoping rules across files.
Explore variable scopes in PHP, comparing local scope inside functions with global scope accessible across files, and learn how local and global variables are declared and accessed.
Explore what a string is in PHP, a data type that holds text as a collection of characters, with examples like words and sentences, and learn how to declare strings.
Compare single-quoted strings and double-quoted strings in PHP, showing how variables interpolate in double quotes but not in single quotes, and how outputs differ in examples.
Learn how to convert a string into array elements using the explode function with a space delimiter, as shown through an example.
Learn to convert an array into a string in PHP using the implode function, with a practical example showing how values are joined and output in the browser.
Learn how to concatenate two or more strings in PHP using the string concatenation operator, with examples showing combining variables and literals to produce a final output.
Differentiate echo and print in PHP: echo has no return value, can be used in expressions, and accepts multiple parameters, while print uses a single parameter and is slower.
Explore how static variables persist across function calls using the static keyword, keeping local values after a function ends and enabling continuity between invocations.
Discover PHP magic constants like __LINE__ and __FILE__, which reveal line numbers and absolute file paths to aid debugging and logging when exceptions occur.
Discover how the trim() function in PHP removes leading and trailing whitespace from strings, demonstrated with a practical example. Keep string values clean by removing unwanted spaces.
Use a predefined PHP function to count the number of words in a string, demonstrated with a sample string.
Learn how a string reversing function in PHP takes any string and returns its reverse, with a simple hello world example.
Learn how to locate the position of a substring within a string using PHP's strpos function, including how the starting index is handled.
Discover how to change string cases in PHP using two predefined functions to convert strings to upper or lower case, with examples like converting 'Hello' to uppercase or lowercase.
Learn to replace a substring in PHP with the str_replace function. See how search, replace, and string parameters work in an example that changes 'bird' to 'Peter'.
Compare str_replace and str_ireplace in PHP, noting their case sensitivity differences and how each replaces substrings, along with variants that behave like the originals.
Explore the differences between printf() and print() in PHP and how each prints output. See how printf formats strings with placeholders to insert numbers.
Explore the differences between strstr and strchr, two C string functions that locate the first occurrence of a substring, and see why this topic features prominently in interviews.
Differentiate between strstr() and stristr(), explaining that the variant in the function name indicates case-insensitive behavior and how this affects string search results.
Discuss how to encode a string in PHP when passing data, using a built-in function to replace non-allowed characters with encoding, such as replacing spaces with %20.
Compare strings with strcmp and strncmp to distinguish full-string from prefix comparisons. Return zero when equal; strncmp compares up to n characters, such as six.
Discover how to strip html tags from data in PHP using the strip_tags function, with options to remove all tags or preserve specific tags through an allowed list.
Learn how the gettype() function in PHP returns the type of a variable, with examples for integers, booleans, strings, and objects.
Learn how heredoc and nowdoc let you define multi-line strings in php, with heredoc interpolating variables and nowdoc printing content literally.
Explore how the if-else statement evaluates an expression to true or false and decides which code runs, with true or false outcomes determining the statements inside the if block.
Demonstrate PHP switch statements as a flow control mechanism, compare with chained if conditions, and handle cases like daisy and lily using case blocks, break, and a default output.
Compare switch and if-else constructs by examining boolean expressions and multi-way branching. Use if for boolean or fixed-value checks, and switch for textual or numerical values, noting speed.
Explore the five PHP operator types: arithmetic, assignment, logical, unary, and comparison, with examples like +, -, *, /, %, ++, --, and ==, !=, >, <, >=, <=.
Explain the PHP identical operator and equals operator, noting that === checks type and value, while == checks only values, with examples like 1 === 1 and 1 == 1.
Explain pre and post increment and decrement operators in PHP. Learn how prefix increments before the variable and returns the updated value, while postfix returns the original value then increments.
Discover operator overloading, where a single operator can behave differently by operand types, such as plus for string concatenation or integer addition, with PHP 7.1 introducing it.
Explain how a while loop runs while the condition is true, using a counter x starting at 1 to print numbers 1 through 5 and stop when x becomes 6.
Explore the for loop in PHP, detailing its initialization, test, and increment expressions, and illustrate how a counter drives repeated execution with a practical number-printing example.
Explore the foreach loop in PHP as it iterates over arrays, retrieving values and keys. See the planets example, Mercury, Venus, and Mars, showing value-only and key-value outputs.
Explore how infinite loops arise in PHP across various loop types, see how a test condition fails to terminate, and learn strategies to prevent memory exhaustion and stack overflow.
Explore how to implement recursion in PHP by examining a factorial example, highlighting the base case and a function calling itself to compute the result.
Compare iteration and recursion to decide usage: use iteration for simple problems with memory limits and recursion for complex or unknown problems, noting recursion uses more memory.
Learn how the break statement terminates a loop in PHP, illustrated with a for loop that prints 1 through 4 and stops when the value exceeds 3.
See how the continue statement skips the rest of for loop body and goes to the next iteration, as the example prints 1, 2, 3, and 5 while skipping 4.
Learn how the PHP declare construct sets execution directives for a code block, its flow-control like syntax, and see a practical example of using declare.
Understand the differences between include and require in PHP, including how require stops script execution on failure while include only warns and continues.
Explore arrays in PHP, covering numeric indexed arrays, associative arrays with string keys, and multidimensional arrays, and how key-value pairs store and access data.
Master printing arrays in PHP and prep for interviews with practical questions and answers from Cracking PHP Interviews: 80+ questions and answers.
Understand the base address of an array and how memory stores and references its elements in PHP, as taught in the Cracking PHP Interviews course.
Explore key-value pairs in PHP arrays, including associative arrays with custom keys, accessing values by keys, and different ways to create key-value pairs in PHP 7.
Explore how the implode function turns array elements into a string and prints it in a browser, with the delimiter before or after the array, a common PHP interview topic.
Learn how to convert a string into an array in php with explode and convert an array into a string with implode, using spaces and dot delimiters in practical examples.
Learn to use array_merge to concatenate multiple arrays in PHP, enabling merging of input arrays and displaying the combined result.
Count the frequency of values in arrays with a values-counting function, illustrating how many people live in different cities. See how the return shows the frequency of each value.
Learn how to use the in_array function to check if a value exists in an array, returning true or false, with a practical Android example.
Use the array_push() function to append one or more elements to the end of an array in PHP, adding chemistry and biology to mathematics and physics.
Discover how array_chunk splits an array into equal-sized chunks for processing. The lecture uses a car brands example to show chunks of two elements each.
Learn how the extract() function creates a symbol table by assigning array values to variable names. See how keys map to variables and enable use of variable variables.
Understand functions as named blocks of code that perform tasks, using the function keyword. Start function names with a letter or underscore and allow letters, numbers, and underscores.
Explore the two main function types in PHP: user-defined and built-in, and learn how parameters and arguments shape function calls with practical examples.
Observe how call by value works by copying a variable into the function. Illustrate the copy in memory and the resulting output with a string example.
Demonstrate call by reference by passing a variable’s memory address to a function, allowing in-place modifications that reflect back in the original variable.
How about Quickly Revising all the Important PHP Concepts in less than 3 hours before an interview?
Preparing for PHP Interview is tricky. You would need to get a good understanding of new features and revise the concepts you used in your preparation. This course helps you Prepare for PHP Interview with hands-on code examples covering 80+ PHP Interview Question and Answer on a varied range of topics listed below.
******* What You Can Expect from this Course *******
✔ Real Interview Questions with detailed answers
✔ Friendly Support in the Q&A section
✔ Free Udemy Certificate of Completion on Completion of Course
✔ 30 Day "No Questions Asked" Money Back Guarantee!
Zero risks. 30-day money-back guarantee with every purchase of the course. You have nothing to lose!
Start Learning Now. Hit the Enroll Button!
******* Questions Discussed in this Interview Course *******
PHP Platform
What is PHP?
Is PHP case sensitive?
Is PHP weakly typed language?
How do we install PHP?
What is Composer?
What is Packagist?
How do we execute a PHP script from the command line?
What is virtual host?
What are XAMPP & WAMP?
What is Apache server?
How to check current PHP version and other information about our system?
What is interpreter?
Is PHP compiled or interpreted?
What do we mean by a Framework?
What is MVC?
Datatypes and variables
What is a datatype?
How many datatypes are there?
What are rules for naming a variable?
How will you define a constant?
What is the purpose of constant() function?
What are the differences between constants and variables?
What are the different scopes of variables?
What is string?
What is the difference between single quoted string and double quoted string?
How can you convert string into array elements?
How can you convert array into strings?
How can you concatenate two or more strings?
Differentiate between echo and print().
Explain static variables.
What are PHP magic constants?
Why do we need trim() function?
Can you count the number of words in a string?
How to reverse a string?
How can you change cases in a string?
Can you replace a substring?
Differentiate between str_replace() and str_ireplace().
Differentiate between printf() and print().
Differentiate between strstr() & strchr() functions.
Differentiate between strstr() and stristr().
Can you encode a string in PHP?
Differentiate between strcmp() and strncmp().
Is it possible to remove the HTML tags from data?
What is the use of gettype() in PHP?
What is heredoc and nowdoc?
Flow control and Iterations
Explain if-else statement.
Explain switch statement with example.
Differentiate between switch and if-else statement.
What are the different types of operators?
Explain arithmetic operators.
Explain the assignment operators.
Explain the logical operators.
Explain the unary operators.
Explain the comparison operators.
Differentiate between === and == operators in PHP.
Explain pre and post increment with example.
What do you mean by operator overloading?
How many loops are available in PHP?
Explain while loop with example.
Explain do-while loop with example.
Explain for loop with example.
Explain foreach loop with example.
How can you implement an infinite loop in PHP?
How can you implement recursion in PHP?
Differentiate between iteration and recursion.
Explain break statement with example.
Explain continue statement with example.
Give example of declaration in php?
What is require in PHP?
Arrays
What is an array?
How can you print an array in PHP?
What do we mean by the base address of an array?
What do we mean by keys and values?
What are the keys & values in an indexed array?
How can we convert array into string?
How can we convert a string into an array elements?
How can we concatenate arrays in PHP?
Which function counts all the values of an array?
How can we check if an element exists in an array?
Which function inserts an element to the end of an array?
What is the use of array_chunk() function?
Why do we use extract()?
Functions
What is a function?
What are the different types of functions?
Explain call by value.
Explain call by reference.
Following questions are available with the Q&A PDF provided in the course (videos on the following questions are coming soon)
What are the function declaration rules?
How can we declare user defined functions?
What do we mean by actual and formal parameters?
Maximum how many arguments are allowed in a function in PHP?
Explain header().
What do we mean by return type of a function?
What is the return type of a function that doesn't return anything?
Do we need to mention the return type of a function explicitly in PHP?
What is function that can be used to build a function that accepts any number of arguments?
Explain the return statement.
Can we use multiple return statements in a function?
What is the use of ini_set()?
What is the difference between unlink and unset functions?
How ereg() function works?
How eregi() function works?
What is the purpose of getdate() function?
What is the purpose of date() function?
How will you call member functions of a class?
Requests and responses
How can we display the correct URL of the current webpage?
How to get the information about the uploaded file in the receiving script?
What do we mean by server?
What is a client?
What do you mean by a response?
What is HTTP?
What are PHP superglobals?
How will we get information sent via GET method?
How will you get information sent via POST method?
What is the purpse $_REQUEST variable?
What is the purpose of $_FILES variable?
What is the purpose of $GLOBALS variable in PHP?
What is the purpose of $_SERVER variable in PHP?
What is the purpose of $_COOKIE variable in PHP?
What do you mean by environment variable in PHP?
What is the purpose of $_ENV variable in PHP?
What is the purpose of $_SESSION variable in PHP?
How will you redirect a page?
What is the purpose $_PHP_SELF variable?
How will you get the browser's details using PHP?
What do you mean by HTTP status codes?
What are the HTTP client error codes?
What are the informational status codes?
What are the HTTP success codes?
How do you get the redirection related information?
What are the HTTP client error codes?
What are the HTTP server error codes?
What is API?
What is the use of an API?
What are types of API?
What is REST API?
Why do we need REST API?
Where REST API is used?
What is JSON?
Why do we need JSON?
How can you exchange data using JSON?
Differentiate between JSON & XML.
What are the advantages of JSON?
Sessions and Cookies
What is Session?
What is Cookie?
Differentiate between Session & Cookie.
How do we start a session?
How can we set session variable?
How to destroy a session?
How to remove value from session variable?
When do we need to set session variables?
When do we need a session and not a cookie?
When do we need a cookie and not a session?
How can we set a cookie?
How to modify a cookie value?
How will we make a check that a cookie is set or not?
How to retrieve all cookie values?
How to delete a cookie?
How can we implement 'remember me' using PHP?
Classify cookies.
How will you delete a cookie?
How to track login and logout using PHP?
Filesystem management
How to create a file?
What are the other way to write in a file?
How will you check if a file exists or not using php?
How to delete a file?
How to copy a file?
How to rename file?
How to check whether a file or directory exists?
How to check path of the file in PHP?
How to check size of the file in PHP?
How to write the contents inside file?
Explain file() method.
How To change the file permissions?
What are different ways to get the extension of a file?
How to create a directory using PHP?
How to get files(contents) from directory?
How to open a directory?
What is include in php?
What is require_once in php?
What is include_once in php?
What is require() in PHP?
What is difference between require and include?
Regular Expressions
What is RegEx?
Why do we need RegEx?
How preg_match() function works?
Regualar Expression Notations.
Regualar Expression Examples.
OOPs Concepts
What is OOPs?
What is an object?
How can we create object of a class?
What is a class?
What are the basic features of OOPs?
Is PHP purely an object oriented language?
Differentiate between OOPs & POPs.
What is generalization?
What is specialization?
What is aggregation?
What is composition?
What is association?
What is abstraction?
What is encapsulation?
What is inheritance?
What is super class?
What is a sub class?
How can you inherit a class in PHP?
What is a constructor?
Explain __construct().
Classify constructor.
What is a destructor?
Explain $this.
Explain multiple inheritance.
Does PHP support multiple inheritance?
Explain multi-level inheritance.
What is polymorphism?
What is method overloading?
Does PHP support method overloading?
What is method overriding?
What are interfaces in PHP?
What does the presence of operator ‘::’ represent?
How to define a class in PHP?
How will you add a constructor function to a PHP class?
How will you add a destructor function to a PHP class?
How will you access the reference to same object within the object in PHP?
What do you mean by access modifier?
Explain access modifiers in PHP.
Explain final class in PHP.
Explain abstract class.
What is interface?
Exception Handling
What do you mean by an exception?
Define Exception class Hierarchy.
How do we handle exceptions?
Differentiate between exception and error.
What do we mean by error log?
How do we see PHP errors?
What are the exception class functions?
What does the expression Exception::__toString means?
Security and Cryptography
Why do we need cryptography?
What do we mean by hash functions?
Whart is hash function in PHP?
Example using hash().
What is encoding and decoding?
What is SHA1?
Can sha1 be decrypted?
What is sha1_file()?
What are the disadvantages of sha1()?
What MD5 means?
Why can not a MD5 hash be decrypted?
Is md5 reversible?
Compare sha1() and md5().
What is enctype?
Explain each Mcrypt function supported in PHP.
What is cryptography authentication?
PHP and HTML
What is HTML?
Differentiate between PHP and HTML.
What are the different methods or HTTP verbs of sending data to the server?
What's the difference between GET and POST methods.
How can we send email?
How file upload works?
PHP and SQL
What is SQL?
Why do we need SQL with PHP?
How many types of database connections possible in PHP.
Adavantages of PDO over MySQLi approach.
How connect to the database using PDO?
What is SQL injection?
Miscellaneous
How can we get the browser's details using PHP
What is the use of Xdebug extension?
What is the purpose of php.ini file?
What is curl?
What is PDO in PHP?
What is autoloading classes in PHP?
Discuss die().
What are variable variable?
New features in PHP 7
What are return type declarations?
Explain the Exception Hierarchy introduced in PHP 7?
What is use of Spaceship Operator?
What is use of Null Coalesce Operator?
Start Learning Now, Happy Learning.
Hit the Enroll Button!