Alok Prasad has Published 28 Articles

Compare define() vs const in PHP

Alok Prasad

Alok Prasad

Updated on 31-Dec-2019 10:10:49

5K+ Views

As we know both define() and const are used to declare a constant in PHP script.SyntaxLet's discuss the difference between these two.The basic difference between these two is that const defines constants at compile time, whereas define() defines them at run time.We can't use the const keyword to declare constant ... Read More

What are getters and setters methods in PHP?

Alok Prasad

Alok Prasad

Updated on 31-Dec-2019 08:57:06

15K+ Views

In this article, we learn the best way to create getter and setter strategies in PHP. Getter and setter strategies are utilized when we need to restrict the direct access to the variables by end-users. Getters and setters are methods used to define or retrieve the values of variables, normally ... Read More

What is method overloading in PHP?

Alok Prasad

Alok Prasad

Updated on 31-Dec-2019 08:29:38

11K+ Views

Method Overloading is a concept of Object Oriented Programming which helps in building the composite application in an easy way. Function overloading or method overloading is a feature that permits making creating several methods with a similar name that works differently from one another in the type of the input ... Read More

Comparison of floating point values in PHP.

Alok Prasad

Alok Prasad

Updated on 31-Dec-2019 08:15:59

961 Views

In PHP, testing floating point values for equality is problematic, because PHP is failing when checking if one floating point number is equal to another. Despite the fact floating point numbers seems to have the same value do not need to actually be identical. So in this article will demonstrate ... Read More

Explain include(),require(),include_once() and require_once() functions in PHP.

Alok Prasad

Alok Prasad

Updated on 30-Jul-2019 22:30:26

4K+ Views

In this article, we will learn about useful and important functions in PHP for file inclusion. All these functions require, require_once, include and include_once are utilized to include the files in the php page but there is a slight distinction among them in terms of functionality.Let's discuss these functions below ... Read More

Comparison of dates in PHP

Alok Prasad

Alok Prasad

Updated on 30-Jul-2019 22:30:26

7K+ Views

Matching two dates in PHP is quite smooth when both the dates are in a similar format but php failed to analyze when the two dates are in an unrelated format. In this article, we will discuss different cases of date comparison in PHP. We will figure out how to ... Read More

Convert object to an array in PHP.

Alok Prasad

Alok Prasad

Updated on 30-Jul-2019 22:30:26

9K+ Views

In a PHP application, we are working with data in various formats such as string, array, objects or more...In a real-time application, we may need to read a php object result in the form of an associative array to get the desired output.So we will discuss here how to transform ... Read More

Explain Polymorphism in PHP.

Alok Prasad

Alok Prasad

Updated on 30-Jul-2019 22:30:26

13K+ Views

To begin with, Polymorphism is gotten from the Greek words Poly (which means many) and morphism (which meaning forms).Polymorphism portrays an example in object-oriented programming where methods in various classes that do similar things should have a similar name. Polymorphism is essentially an OOP pattern that enables numerous classes with ... Read More

Advertisements