Snippets tagged “object-oriented-php”
3 snippets use this tag.
- How to write own DD() function same as laravel?PHP
To create your own version of the Laravel DD() function, you can create a new function in your codebase and have it take in any number of arguments.
- PHP class: Global variable as property in classPHP
You can use the global keyword to access a global variable inside a class.
- Reference — What does this symbol mean in PHP?PHP
In PHP, $this is a special variable that refers to the current object.