Today, a little conversation on Twitter escalated rather quickly. Apparently PHP runs function calls differently depending on namespaced or non namespaced context. When calling functions in a namespaced context, additional actions are triggered in PHP which result in slower execution. In this article, I'll explain what happens and how you can speed up your application.
Last week I was playing around with writing some custom Slack slashcommands and cronjobs. Originally, I started writing these integrations with PHP. Since slack requires a publically available endpoint and I did not want to set up a server for these scripts, I decided to take a look at AWS Lambda. This Amazon service makes it possible to run scripts serverless. The scripts are triggered based on triggers inside of AWS. In this artile you can find out how to get started with writing lambda functions.
Today, my invitation for Bitbucket Pipelines Beta got accepted! For those who haven't heard about it: Pipelines is a Continuous Delivery tool integrated in Bitbucket. When you push your changes to your Bitbucket repository, it will spin up a Docker container and run the actions you specify. I was quite exited about the concept and immediately started to set up an automated test scenario with GrumPHP.
Last week, I was diving in different authentication systems for API's. One of the better ways of authentication is through X.509 client certificates. This one is a bit is harder to set-up, but sure is secure, manageable and powerful. While searching for documentation on the subject, I was surprised there weren't a lot of good articles. In this article, I will try to explain every step as easy as possible.
Lately, you might have noticed that streams are getting more important in the PHP scene. They are for example widely used in PSR-7 and implemented in Diactoros. Yesterday I was scrolling down the issues list of phpspec and bumped in on a pull request. This pull request shows that it is possible to convert code in-memory and later require the modified content to be executed. Wow, that is awesome! Let's take a look at it.
When using the Zend Framework 2 service manager, it is possible to create shared services that will be loaded only once. In some situations however, it is very hard to switch the already injected dependencies in this service. You could mark the service as unshared even if this is often unnecessary. Another solution is to wrap the service with a proxy object and use the proxy instead of the service.
One of the performance boosters in Zend Framework 2 is using template_map instead of template_path_stack in the view manager. While developing, it is easier to use the stack. This is because you don't have to add a mapping every time you create a new view. At the end of the development you might forget to transform the stack into a template map. This is why it is useful to never use the stack and automate the generation of the template_map array instead.
For one of my projects, I needed a tool to list all used translations keys from a PHP project. Because I want to keep the translation database clean, I decided to create a Grunt plugin. There was one big problem... How do you create this plugin? So I started to read the documentation, blog posts, etc. and noticed that the documentation was pretty confusing. Let me take you on a tour through my first plugin.
One of the cool features in AngularJS is the two-way data binding. When you change a property of an object, the value is instantly changed in every view or service that is using this property. A while ago, I saw a video about the combination of AngularJS and Firebase. This combination makes it possible to create three-way data binding in AngularJS.
Last weekend, the annual PHPBenelux conference took place. With a small delegation of the phpro crew, I went to Kontich for 2 days filled with talks, fun and pleasure. In this article you can find a small summary of the talks that inspired me.
It's amazing how much time you can loose while running PHP tests. First you alter your code or test. Next you start your test and wait for it to finish. Finally you find out you messed up and start the process all over again. In this article I am going to show you how to automate PHP testing, so you can focus on adding business value to your application.
With a new year, come some new resolutions. I was already thinking of creating a blog for quite some time, but the new year forced me to finally get this site up and running. So why did I start this blog? Not to tell you who I am, but to inform you about some cool stuff I encounter during the development of web applications.