All TAG POST

What is abstract class in PHP ?

What is abstract class ? Abstract class works almost like interface . If you don’t know about interface then please read this article .what is interface ?   Abstract classes 1. We declare a abstract class using abstract keyword .. 2 . We can’t create an object of abstract class . 3 . We can access abstract class property from child class using parent keyword. 4 . We can declare non-abstract/abstract method in abstract class . 5 . Abstract class method can’t contains body bar . Only we can override it from sub class . Hope you have understand... Read more

How to Use Static Properties in PHP ?

Static Methods and Static Properties Sometimes, it is useful if we can access methods and properties in the context of a class rather than an object. To do this, you can use static keyword. So we can access static method using class name along with scope resolution . How to declare static method or static property ? class User { public static $your_variable_name; // You can use any access specifier public static function your_method_name() { //code goes here } } Accessing non-static method class User { public static $name = 'john'; // You c... Read more

How to Redirect website from http to https

Here is the exact code to redirect website from http to https using .htaccess file. After installing SSL certificate for your website. Please follow the steps mentioned below to Redirect website from http to https using .htaccess file 1 : Login into your site cpanel. 2 : Open File Manager and get into public_html directory (check the option show hidden files 3 : Select .htaccess file and open with code editor. 4 : Copy and Paste the below code in the starting of the 5 : .htaccess file. 5 : Save it and open your site in the new tab and check it, your site will be r... Read more

What are __construct __destruct and Polymorphism in PHP

PHP 5 allows developers to declare constructor methods for classes. Classes which have a constructor method call this method on each newly-created object, so it is suitable for any initialization that the object may need before it is used. A constructor and a destructor are special functions which are automatically called when an object is created and destroyed. The constructor is the most useful of the two, especially because it allows you to send parameters along when creating a new object, which can then be used to initialize variables on the object. Here's an example of a class with a... Read more

What are Encapsulation and Abstraction In PHP

What is Object Oriented Programming The Object Oriented Programming (OOP) is a programming model where programs are organized around object and data rather than action and logic. Object Oriented Programming (OOP) allow decomposition of a problem into a number of entities called object and then builds data and function around these objects. 1. The program is divided into number of small units called object. The data and function are build around these objects. 2. The data of the objects can be accessed only by the functions associated with that object. 3. The functions of one objec... Read more

LET'S SOCIALITE

Surfe.be - passive income

Recent Tweets