- Global Variable
This article offers a comprehensive list of PHP-specific terms that you may encounter as a PHP developer. Understanding these terms and concepts is fundamental to mastering PHP.
An array in PHP is a type of data structure that allows you to store multiple elements under a single variable. Each element can be accessed using its index or key. Learn more
In PHP, a class is a blueprint for creating objects. It can contain properties (variables) and methods (functions). Learn more
Closures are anonymous functions that can capture variables from the surrounding scope. In PHP, closures are instances of the Closure class. Learn more
Constants in PHP are simple, unchangeable variables that are defined outside of the usual scope and are accessible everywhere. Learn more
A destructor is a special method in a PHP class that is automatically called when an object is destroyed or the script ends. Learn more
'echo' is a language construct in PHP used to output one or more strings to the browser. Learn more
A function in PHP is a named block of code that can be reused. PHP has many built-in functions and also allows the creation of user-defined functions. Learn more
Global variables in PHP are those declared outside of all functions and are accessible from anywhere in the script, except within functions. To access a global variable inside a function, it needs to be declared as global using the 'global' keyword. Learn more
The 'include' statement in PHP is used to include and evaluate a specified file during the execution of the script. Learn more
In PHP, an interface is a definition of what methods a class must have. Any class that implements an interface must provide an implementation for all the methods of that interface. Learn more
Namespaces in PHP are a way of encapsulating items like classes, functions, and constants. They help to avoid name collisions and to create reusable code. Learn more
An object in PHP is an instance of a class. It's a concrete entity based on the blueprint provided by the class. Learn more
Polymorphism in PHP is a concept in which methods or functions can be used in multiple forms. It's typically achieved through inheritance and interfaces. Learn more
In PHP, a variable is a container for storing data. Variable names are case-sensitive and start with a dollar sign ($). Learn more
This glossary provides a basic overview of many common terms you'll encounter in PHP. For more comprehensive learning, it's recommended to refer to the official PHP documentation and practice with real code examples.
Interested in proving your knowledge of this topic? Take the PHP Fundamentals certification.
Covering the required knowledge to create and build web applications in PHP.