Skip to main content


48 posts about PHP

Zf2 initializers, listeners and factory references

Almost always in a web application, you need to set some features before starting to do something in your controller. I'm having a lot of difficulties about keeping the code clean and simple in Zend. Let's see how initializers, listeners and factory pattern implementation can help us. I've gathered some very good res... [...]

Zend framework 2 performance

Even on localhost, if you look at the zend developer toolbar, you will see that the loading page time will be decreased after doing these actions. They are simple but there aren't so much explanations and documentations on the web. Generate template map Your application will load the map for each module. Go to your mod... [...]

Running multiple PHP versions with Ampps

I have my local PHP and MySQL installation but I wanted to switch the PHP from the 5.6 version to 7. This was not an easy task and even PHPBrew was not helping me to tell Apache and the CLI what PHP version it has to run. So I have tried Ampps, a software for running the LAMP stack on Windows, Linux and Mac. It works great... [...]


Looking the structure of CodeIgniter framework, I've seen many good features and possibilities about developing application using this system. But for me the worst problem is the file and directory structure. To handle multiple application is very difficult and you must always keep an eye updating your files. Maybe I'm W... [...]

About a PHP framework comparison

I have a problem with frameworks: the OOP, design patterns and refactoring code are good but we still need a lightweight framework to upload all files and let an application works on a simple hosting provider. Indeed you cannot handle apache configuration files or something on low level on an external server! My application is s... [...]

Decorator pattern in PHP

I wanted to build an object and keep the properties set during the process. Another class will extends the main application object without losing all previous properties. <?php abstract class application { private $config; private $channel, $controller; public function getConfig() { return $this->confi... [...]

Continuous Integration with PHP

I found very difficult to set an enviroment to practice continuous integration with PHP, especially Jenkins has not a great documentation and the plugins are difficult to set. Using Jenkins to begin with continous integration on your softwares and web applications is a good choice. It seems Xinc or Sismo are good... [...]

Laravel 5 Form Ajax Post

This was harder than I thought. Here is my approach and my solution. I've used JQuery and follwed the instructions on the Laravel documentation to solve the token detection problem after the form posts and display the result in a div. Here is my code: On the main page add this html meta tag: <meta name="csrf-token" c... [...]