PHP self is a built-in variable in PHP that refers to the currently executing PHP script. It can be used to access information about the current script, such as the file name and path.
Example 1:
This code example uses PHP self to retrieve the file name of the currently executing script, and then outputs it using the echo statement. This does not require any external package library.
Example 2:
This code example uses PHP self to retrieve the URL of the currently executing script, and then outputs it using the echo statement. It requires no external package library.
PHP self - 30 examples found. These are the top rated real world PHP examples of self extracted from open source projects. You can rate examples to help us improve the quality of examples.