Results: 1022
general HTTP headers
Request URL
- reqeusted URL by a user
Request Method
- HTTP method that is used for the request
Status Code
- status code shows how successful the request was
Remote Address
- server address that the website is hosted to
abstract class AbstractClass
{
    // Force Extending class to define this method
    abstract protected function getValue();
    abstract protected function prefixValue($prefix);

    // Common method
    public function printOut() {
        print $this->getValue() . "\n";
    }
}
About abstract class:
Classes defined as abstract cannot be instantiated
Any class that contains at least one abstract method must also be abstract
Methods defined as abstract simply declare the method's signature - they cannot define the implementation
Use static property inside and outside of a class
Use static property inside a class
echo self::$someProperty;
Outside a class
Wheather::$someProperty;
call static method inside and outside of a class
Call the method inside a class
self::celsiusToFarenheit(20);
Outside a class
Wheather::celsiusToFarenheit(20);
Main benefit of using getters and setters is to filter & check values according to current needs
Magic method
__destruct
gets called when we delete an object manually. If we don't delete the object during the code execution, it will be called automatically at the end of the code execution
class User {
    public $username;
    public $friends = ['Tom','David'];

    function __construct($name) {
        $this->username = $name;
        print $this->username . "'s object is created'\n";
    }

    function __destruct() {
        print $this->username . "'s object is deleted'\n";
    }
}
$user1 = new User('George');
$user2 = new User('David');
echo $user1->username . "\n";
Magic method
__construct
gets called when a new object of the class gets created
class User {
    public $username;
    public $friends = ['Tom','David'];

    function __construct($name) {
        $this->username = $name;
        // print "In BaseClass constructor\n";
    }
    
    public function addFriend($friend_name) {
        $this->friends[] = $friend_name;
    }
}
$user1 = new User('George');
echo $user1->username;
Returns a list of methods of the class being passed to the function
class User {
    public $username = 'George';
    public $friends = ['Tom','David'];
    
    public function addFriend($friend_name) {
        $this->friends[] = $friend_name;
    }
}
$user1 = new User();

print_r( get_class_methods('User') );
Returns an array with properties of the class
class User {
    public $username;
    public $friends;
    
    public function addFriend($friend_name) {
        $this->friends[] = $friend_name;
    }
}
$user1 = new User();
print_r( get_class_vars('User') );
Returns the name of the class that is used to create the object passed to the
get_class
function
class User {
    public $username;
    public $friends;
    
    public function addFriend($friend_name) {
        $this->friends[] = $friend_name;
    }
}
$user1 = new User();
echo get_class($user1);
Results: 1022