You searched for php tutorials

  1. 8 Must Have PHP Quality Assurance Tools

    Quality Assurance in PHP is a valuable but very rarely seen aspect. In a world focused on rapid deployment and a “ship now, worry later” mentality, a focus on quality is a rare sight, especially when dealing with the web. One of our authors recently directed my attention to Sebastian Bergmann’s
  2. 8 Heroku Add-ons for Production Ready PHP Apps

    using buildpacks - sets of open source code that describe how a slug is to be generated. Here’s an example of a PHP buildpack. Heroku uses “dynos” as units of computing power which spin up your slugs. Dynos are lightweight, isolated containers for your apps which can execute any process type
  3. Stress-test your PHP App with ApacheBench

    : For our demonstration, I created a subfolder Laravel under Code in the VM, added a subfolder called “public”, and put an index.php file inside with the following content: <?php echo "Hello Test"; In homestead.yaml, I called this site “homestead.app”, and in my hosts file on my
  4. HHVM vs Zend Engine in PHP 6

    The fabled PHP 6 is long overdue. This unicorn of the web dev world has been “coming” for decades now, and it’s still not clear whether or not it’s actually something that’s going to happen in this decade, or just an idea, a fantasy of the PHP userbase. Minor versions like 5.4 > 5.5 and 5.5
  5. Social Network Authentication: Google+

    application to work, our constructor will receive these 3 variables as parameters and set the properties. Until now, our code looks like this. <?php namespace SitePoint\SocialLogin\Google; use SitePoint\SocialLogin\Interfaces\SocialLoginInterface; class GoogleLogin implements
  6. Social Network Authentication: Merging Accounts

    In this part, we will have a look at how we can make sure people don’t have multiple accounts after signing into our application through different means.

    Merging accounts

    If you allow users to sign up through different social networks and perhaps your own registration system, there is a good chance some users will have multiple accounts. How annoying can it be for a user who signed up through Facebook earlier, to come back later and log in through Twitter because he thought he used that one?We can prevent this by letting the user merge manually or try to use an automatic system to try and identify duplicated users.

    Setup

    I suggest a setup of two database tables. The first table is the general user table, which contains all information about the user.

    CREATE TABLE IF NOT EXISTS `user` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `username` varchar(255) NOT NULL,
      `password` varchar(255) DEFAULT NULL,
      `firstname` varchar(50) NOT NULL,
      `lastname` varchar(50) NOT NULL,
      `emailaddress` varchar(50) NOT NULL,
      `city` varchar(50) NOT NULL,
      `birtdate` date NOT NULL,
      `gender` varchar(10) NOT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

    Note: As you can see, I used the fields that we also used in our SocialLoginInterface. You might need more or less fields depending on your application. You even could decide to split this table in a user and user_profile table if you wish.

    The second table contains all data regarding any third party logins the user used.

  7. Understanding OpCache

    boosts in your PHP applications. Over the web you will easily find a lot of tutorials covering all the OpCache installation and configuration steps (it is enabled by default on 5.5, but can be installed as an extension on older versions). Read the article below to find the answers to some
  8. Magento Basics, Request Flow, Standards and Best Practices

    primitive, but due to backwards compatibility could not be solved sooner - Magento 2 will use ZF2, modern PHP and namespaces. Request Flow Let’s see how a Magento application handles a request starting from the main index.php file. Application Initialization 1) If you use Nginx, you should