Skip links

Random knowledge shared...

  1. DateTime createFromFormat without time

    August 12, 2015 9:08 AM - by Freek Lijten - 1 comment


    This is just a quick word of warning. I recently had a bug where two DateTime objects that were created with the same date were inequal to eachother. It turned out that this was a difference between the normal __construct() and createFromFormat. This is actually documented behaviour but since people might be searching for this problem, this post might help.

    Read more about "DateTime createFromFormat without time"

  2. Value objects

    July 16, 2015 7:49 AM - by Freek Lijten - 4 comments

    Tags: ,

    I would like to talk about value objects for a bit. Value objects are very underused, very powerful and general good stuff. They might not change your world but they will change, very subtle, a lot of the code you write. I hope to give the shortest possible introduction to the concept and follow up with a couple of example that make me like value objects so much.

    Read more about "Value objects"

  3. Setter anxiety

    June 24, 2015 8:10 AM - by Freek Lijten - 4 comments

    Tags: , ,

    Sometimes sudden (or slow) realisations can wreak havoc in ones mind. I've always (since long?) been a a proponent of constructor injection for dependencies. On the other hand I was not unused or diametrically opposed to constructing objects with their values usings getters and setters. But now, these setters scare me. I'm suffering from setter anxiety.

    Read more about "Setter anxiety"

  4. Testing PHP extensions - what makes a good test

    March 22, 2015 3:04 PM - by Freek Lijten - 1 comment

    Tags: , ,

    In my previous blog I took you through the process of getting PHP and extensions compiled, generating code coverage and running tests. What I did not talk about was what makes a good test. I hope to correct on this by adding this post and going into more detail on the actual writing of tests itself.

    Read more about "Testing PHP extensions - what makes a good test"

  5. Testing and improving PHP extensions for PHP 7

    March 12, 2015 1:58 PM - by Freek Lijten - 0 comments

    Tags: , ,

    PHP7 is coming. And it is coming to a neighbourhood near you :) A couple of people started an initiative to ensure extensions will be running out of the box once PHP7 hits the shelves. The fun part: You can help too! No C knowledge is necessary (although it is fun to dive into PHP's internals!). This piece is a short intro to help you help PHP! Help triaging extensions, write tests, add documentation and who knows when you'll be diving into C code.

    Read more about "Testing and improving PHP extensions for PHP 7"