Skip to content

tutorial#

Create PHP Project using Composer in VS Code

Cover Image

You know composer is a framework for maintaining PHP packages - installing them as a dependency to your project, ensuring their requirements, auto-loading classes, and much more. But you can also create a new PHP project directly from a composer package, easily. In Visual Studio Code it's even simpler.

Generics in PHP using PHP DocComments

Cover Image

Most of the type-safe languages, like TypeScript, C++, C#, Java, ... or Hack, .. allow you to specify not just types but also so-called generic type arguments - a way of substituting a type name with an actual type when you use it. PHP lets you to specify types for extra type-safety (and improved code completion), but generic types need to be specified inside Doc Comments. That's because the PHP language syntax itself does not know them yet.

Performance Profiling PHP with VS Code

Cover Image

Your PHP application or a website might be running fluently, or you might see it takes some time to load. In both cases, it is a good practice to do performance profiling. This technique lets you know how much time all the functions in the code take, and how many times they've been called. You might see interesting results and improve the live of your users, and the live of your Web Server.

PHP and Nginx on Docker

Cover Image

In the previous article, we talked about Docker and created a simple Docker Image with PHP inside Visual Studio Code. If you did not read it yet, I strongly recommend reading it before, since you'll have more context for this one. In this article, we will create a multi-container application using PHP and Nginx with the help of Docker Compose. You can see all the files we will be creating on github.