PHP

Need more accurate results? Got a big list to verify?

Click the banner below to go to our recommended premium email verification service, Email Checker.

email-validation

Advertise on Leopathu

PHP 7 New Features and Improvements

php 7

One of the most exciting events in 2015 in the PHP world was the release of PHP 7, 10 years on from the release of the last major version, PHP 5. With a major step forward, PHP 7 introduces plenty of new features and performance upgrades.

However, it also removes old, deprecated functionality, which introduces some compatibility breaks, making it harder for older applications to migrate to the new version. This guide should serve as a quick tour on what to expect if you plan on moving your existing applications, or building new ones, on top of PHP 7.

How to downgrade PHP7 to PHP5.x ?

php

Sometimes we had upgraded the PHP to 7.x version, but then only we know that some functionality won’t support in our web application / website, in that situation better switch back to the PHP 5.x version, It is not a much work, simply we could get back our php old version in few commands, will look it below,

If PHP 5.x version had been removed from your site, just install it with the following command

Setup Slim Framework Application

slim

Slim :

Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs. At its core, Slim is a dispatcher that receives an HTTP request, invokes an appropriate callback routine, and returns an HTTP response.

In this blog, I am going to show you how to setup application in that.

Download & Install :

Composer is the best way to install slim framework and create project using Slim-Skeleton as a base.

PHP Array Overview

Array is a structured data which holds different types(string, array, object) of values and one or more values in a single variable, for example if you want to store 50 different types of values in a single variable instead of storing in 50 separate variables the array would help in that situation.

There is three different types of array available,

1. Numeric Array :

The array stored value's index will define by numbers, the index will be starting from zero.

Sample :

OOP (Object Oriented Programming) in my Style

oops

Download : 

Sample Code

1. Class :

         It is a template definition of the methods and variables (properties) in a particular kind of object

         1.1 Methods :

                 It is similar to function attached to specific classes.

         1.2  Variables

                A symbol of a name that stands for value.

 

Read, Write MS-Excel files in PHP

excel

MS-Excel Stream Handler is a PHP Class, This class implements a stream handler interface to read and write Microsoft Excel spreadsheet files in the XLS format.

XLS files may be read and written using PHP fopen, fread or fwrite, or any other PHP functions that can access to streams. The file name has the format xlsfile://path/to/spreadsheet.xls where /path/to/spreadsheet.xls is the path of the actual spreadsheet file to be read or written.

How to change php.ini settings in Godaddy shared hostings

godaddy

The Godaddy shared hosting's php execution time and memory limit is very low, So some large site's request would break for large process.

But the Godaddy doesn't allow to change the php.ini file directly, we could do that with some tricky First find your server's php.ini file with the following commands

php -i | grep php.ini

it will return the path of the php.ini file, it would be something like this /usr/path-to/php.ini Then copy the php.ini file into your public_html directory with the following commands.