PHP Directory


  • PSR-7 By Example

  • Introducing CockpitCMS – a CMS for Developers

    In this tutorial, we will see how to use Cockpit CMS to setup a CMS backend and to use the API interface provided by Cockpit to build a customized functional frontend.

    Not quite like other “heavy weight”, or “fully fledged” CMS’, Cockpit is light weight and “bare”. It only provides a backend to manage meta-data and data entries, whilst the frontend is all in the developer’s hands.


    A copy of Cockpit CMS can be downloaded here in zip form. After downloading, just unzip the archive to a directory on your web server that is accessible. In my case, it is mapped to: http://vagrant/cockpit.

    Next, visit the installation page: http://vagrant/cockpit/install to start the installation process.

    NOTE: Cockpit uses SQLite as its database engine by default. If you have not installed SQLite yet, please do so before the installation.

    NOTE: Cockpit also requires that its /storage/data directory be writable. Please change the mode of that directory accordingly.

    The installation is just one click. When the installation is complete, you will be greeted with this page:

    Now we can log in with admin/admin and the backend administration dashboard page will be shown:

    Well, we don’t have anything set up yet. Before we create our own content, let’s learn about a few key modules in Cockpit.

    Modules in Cockpit

    The two most important modules in Cockpit are: Collections and Galleries.

    Continue reading %Introducing CockpitCMS – a CMS for Developers%

  • Interview with Jacob Mather

    Twitter: @thejmather

    Show Notes

  • PHP breaks backwards compatibility

  • A new URI handling library for PHP.

  • Questions from the Field: Should I Escape My Input, And If So, How?

  • Basic TDD in Your New PHP Package

    In part 1, we set up our development environment, baked in some rules as inherited from The League, and created two sample but useless classes - Diffbot and DiffbotException. In this part, we’ll get started with Test Driven Development.

    If you’d like to follow along, please read Part 1 or clone the part 1 branch of this tutorial’s code.


    We’ve covered PHPUnit to some degree before (1, 2, 3, 4, 5, 6), but it’s time we put it into real practice now. First, let’s check if it’s installed.

    php vendor/phpunit/phpunit/phpunit

    Running this command should produce a report that says one test passed. This is the test included in the League Skeleton by default and it asserts that true is, in fact, true. A coverage report will also be generated and placed into the build folder.

    Continue reading %Basic TDD in Your New PHP Package%

  • Lean publishing "Principles of Package Design"

  • It’s Monday, you could use some motivation

    granny2Three days ago I decided to give you some motivation to start doing a code kata (see the Friday Dopamine Dump). Well, if you forgotten, haven’t got any time, had to do something more important and didn’t even try to try, then stop. No excuses! If you really want to do this – just start. […]
  • Defensive Programming

    Presented by Christopher Pitt @assertchris Defensive programming may sound like something your granddad did after the war, but it’s key to reducing the number of bugs and increasing maintainability. We’re going to look at what defensive programming is and some steps to doing it in PHP.

    The post Defensive Programming appeared first on Nomad PHP.

:: Our Favorites

Featured Sites Using PHP

>Atlanta Real Estate