Type hinting in php

With Type hinting we can specify the expected data type (arrays, objects, interface, etc.) for an argument in a function declaration. This practice can be most advantageous because it results in better code organization and improved error messages.It will also explain the subject of type hinting for basic data types (integers, floats, strings, and booleans)... Continue Reading →

Overloading in php oops

Overloading is defining functions that have similar signatures, yet have different parameters. Overriding is only pertinent to derived classes, where the parent class has defined a method and the derived class wishes to override that method. In PHP, you can only overload methods using the magic method __call. An example of overriding: <?php class Foo... Continue Reading →

Differences between abstract class and interface in PHP

Following are some main difference between abstract classes and interface in PHP In abstract classes, this is not necessary that every method should be abstract. But in interface every method is abstract. Multiple and multilevel both type of inheritance is possible in the interface. But single and multilevel inheritance is possible in abstract classes. The method of PHP interface must... Continue Reading →

What is Interface in PHP OOPS ?

Interface in oop enforce definition of some set of method in the class. By implementing interface you are forcing any class to must declaring some specific set of methods in oop. For example if you are creating class to render HTML element then it is necessary to set id and name of your html tag. So in this case... Continue Reading →

What is abstract Classes

As from name it seem like something that is hidden. Yes nature of the abstract classes are same. Abstract classes are those classes which can not be directly initialized. Or in other word we can say that you can not create object of abstract classes. Abstract classes always created for inheritance purpose. You can only inherit abstract... Continue Reading →

Insertion Sort example and algorithm

Sorting is the process of arranging a list of elements in a particular order (Ascending or Descending). Insertion sort algorithm arranges a list of elements in a particular order. In insertion sort algorithm, every iteration moves an element from unsorted portion to sorted portion until all the elements are sorted in the list. Step by... Continue Reading →

Selection Sort algorithm

Selection sorting is conceptually the most simplest sorting algorithm. This algorithm first finds the smallest element in the array and exchanges it with the element in the first position, then find the second smallest element and exchange it with the element in the second position, and continues in this way until the entire array is... Continue Reading →

Bubble Sort Algorithm in data structure

Bubble sort algorithm starts by comparing the first two elements of an array and swapping if necessary, i.e., if you want to sort the elements of array in ascending order and if the first element is greater than second then, you need to swap the elements but, if the first element is smaller than second,... Continue Reading →

The Red Hat distribution of Linux provides a slightly more organized way of managing processes. Instead of hunting and killing them by finding their process id in the process table, Red Hat provides a collection of scripts in the ``/etc/rc.d/init.d'' directory which will allow you to start and stop processes as desired. For example, to... Continue Reading →

Checking Storage Space in linux

Checking Storage Space It is important to check from time to time that adequate free space remains on the storage devices. Use the "df" command to get a report of available space. It will look as follows (information shown is from the Internet server at my place of employment): Filesystem 1024-blocks Used Available Capacity Mounted... Continue Reading →

WordPress.com.

Up ↑