Cracking PHP Interviews : 80+ Question and Answers

Get ready for your next PHP interview under 3 hours with important interview question and answers
4.27 (43 reviews)
Udemy
platform
English
language
Other
category
instructor
Cracking PHP Interviews : 80+ Question and Answers
4 501
students
2.5 hours
content
Apr 2020
last update
$19.99
regular price

Why take this course?

  1. Aggregation: A form of association where one class holds a reference to another object of which it is a member. It represents "has-a" relationship but with the implication that the lifetimes of the two objects are independent.

  2. Composition: A form of association that is similar to aggregation, but the relationship is stronger (the "has-a" part). The composed object becomes an integral part of the aggregate, often with its lifetime tied to that of the container class. In other words, when the container object is destroyed, its constituent objects are also destroyed.

  3. Association: A relationship between two classes in which each class has a reference to the other but neither class owns or controls the lifecycle of the other. It represents a "has-a" or "part-of" relationship where both sides are independent of one another.

  4. Abstraction: The concept of hiding the complex reality while exposing only the necessary parts. It is a way of creating a simple model of an object that represents its essential features without including the details.

  5. Encapsulation: The principle of bundling data with the methods that operate on that data, or the restricting of direct access to some of an object's components. Encapsulation serves to keep implementation details private and hidden from the outside world.

  6. Inheritance: A mechanism where a class derives fields and methods from another class. The class that inherits is called a subclass (or derived class), and the class being inherited from is called the superclass (or base class).

  7. Super class: This is the class being extended or inherited from by the subclass. It provides the common properties and behaviors to its subclasses.

  8. Sub class: A class that inherits from another class, often overriding, adding, or modifying the methods and properties it inherits.

  9. Inherit a class in PHP: You can inherit a class by using the extends keyword followed by the name of the parent class.

  10. Constructor: A special method in a class that is called when an object is created. Its primary purpose is to initialize the newly created object by allocating resources and setting initial state. In PHP, constructors are defined with the __construct() method.

  11. __construct(): This method is automatically called right after an object is instantiated. You can pass arguments to it, which allows for a custom initialization process.

  12. Destructor: A special method in a class that is called when an object is destroyed. It's used to release resources held by the object and perform any cleanup necessary. In PHP, destructors are defined with the __destruct() method.

  13. Autoloading classes in PHP: PHP provides a function called spl_autoload_register() which allows you to register autoloaders that will be called when a class is used that hasn't been included or required yet.

  14. Die(): A function that terminates the current script and displays an optional message, then exits with the EXIT_CODE constant (defaulting to 1).

  15. Variable variables: In PHP, you can use variables to reference other variables. For example, $$varName will hold the value of whatever variable is referenced by $varName.

  16. Return type declarations: Introduced in PHP 7, this feature allows functions to explicitly declare what types they return.

  17. Exception Hierarchy introduced in PHP 7: PHP 7 brought a new exception hierarchy based on SPL (Standard PHP Library) with interfaces Throwable, Iterator, and more, which improves the consistency and usability of exceptions.

  18. Spaceship Operator (<=>): Introduced in PHP 7, this operator compares two values and returns -1, 0, or 1 if the left operand is respectively less than, equal to, or greater than the right operand.

  19. Null Coalesce Operator (??): Also introduced in PHP 7, it provides a shorter syntax for the isset() or empty() and fallback pattern commonly used in PHP.

  20. CURL: A library built to support a range of common Internet software tasks, such as data transfer between an HTTP user agent and various servers.

  21. PDO (PHP Data Objects): PDO is a database access layer providing a uniform method of accessing multiple databases. It allows you to use one set of functions for all supported databases and can help prevent SQL injection attacks.

  22. Xdebug extension: A PHP extension that provides advanced debugging features, including performance profiling, code coverage analysis, and interactive debugging.

  23. PHP.ini file: The main configuration file for the PHP language, which controls the behavior of the server at runtime. It contains directives to set various options that control everything from memory limits to whether or not you can execute PHP files.

  24. New features in PHP 7: Other notable additions include return type declarations, scalar type declarations for function arguments, and many performance improvements. Additionally, PHP 7 introduced the removal of the magic_quotes and safe_mode parameters, as they are no longer necessary due to improvements in the language's design and library functions.

Remember, this is a high-level overview of the concepts, and each topic can be explored in much greater depth. Happy learning!

Loading charts...

Related Topics

2086210
udemy ID
14/12/2018
course created date
08/12/2019
course indexed date
Bot
course submited by