All Posts tagged as "PHP"

Design Patterns in PHP: Adapters

The adapter pattern also referred as the wrapper pattern, I find that wrapper is a more fitting name since it describes clearly what this pattern does; it encapsulates the functionality of a class or object into a class with a common public interfaces.

Flexible PHP Development with PHPFarm

Learn how to use PHPFarm to create flexible development environments that can run multiple php versions side by side

Is HHVM/Hack the new face of PHP?

HHVM could change (is already at some extent) the way developers see and think about PHP performance, and how PHP should work. Even if you don't care and never plan to use HHVM or HACK in any of your projects the mere fact that they exist is a good thing for the PHP community.

Working with Psysh

I previously mentioned Boris, a terrific REPL for PHP, and while Boris is a great and functional REPL, is not the only available

Hello Hack

Recently Facebook unveiled Hack, a new programming language that aims to provide developers with the tools to write and ship code quickly while catching errors on the fly.

Boris The Missing PHP REPL

REPL(read-eval-print loop) can be great tools for quickly testing concepts, experimenting and getting quick feedback when learning a new language. Many languages and frameworks provide some sort of REPL like the rails console or laravel's artisan tinker.

Magento and HHVM

If you are developer or system administrator working with Magento running one or more medium sized stores, chances are that you are familiar with the many challenges of optimizing and scaling Magento.

Design Patterns in PHP: Singletons

The singleton pattern is useful when we need to make sure we only have a single instance of a class for the entire request lifecycle in a web application. This typically occurs when we have global objects (such as a Configuration class) or a shared resource (such as an event queue).

Design Patterns in PHP: Using Factories

The factory pattern is a class that has some methods that create objects for you. Instead of using new directly, you use the factory class to create objects. That way, if you want to change the types of objects created, you can change just the factory. All the code that uses the factory changes automatically.

Playing with dependency injection in PHP

Dependency Injection is a software design pattern that allows avoiding hard-coding dependencies and makes possible to change the dependencies both at runtime and compile time.

First steps on HHVM

Currently a few applications are fully supported like wordpress and drupal; more complex applications like Magento are still not 100% with HHVM due to bugs in the HHVM implementation.