Best of stitcher.io2024

  1. 1
    Article
    Avatar of stitcherstitcher.io·2y

    PHP in 2024

    PHP in 2024 offers continuous evolution with new PHP features being worked on, the emergence of FrankenPHP for performance optimization, the success of Laravel as an open-source framework, the growing interest in PHP from outside the PHP community, and the continuous growth of the PHP ecosystem with Packagist reaching over one hundred billion downloads.

  2. 2
    Article
    Avatar of stitcherstitcher.io·2y

    What's new in PHP 8.4

    PHP 8.4 will introduce property hooks, allow 'new' keyword without parentheses, JIT improvements, deprecated implicit nullable types, and new DOM HTML5 support.

  3. 3
    Article
    Avatar of stitcherstitcher.io·2y

    I don't write code the way I used to

    A seasoned programmer shares reflections on how their coding approach has evolved over the past decade. Key changes include a move away from abstractions, embracing a functional programming mindset, struggling but persisting with testing, opting for readability over shorthand efficiency, and the importance of static analysis tools. Despite the quirks, they continue to find value in using PHP.

  4. 4
    Article
    Avatar of stitcherstitcher.io·2y

    PHP 8.4 at least

    Tempest will require PHP 8.4 due to significant upcoming changes, like property hooks. The author believes in leveraging the initial flexibility of open-source projects to embrace new features early, pushing the community to stay current with PHP versions, and deliberately slowing initial adoption to manage quality and feedback effectively.

  5. 5
    Article
    Avatar of stitcherstitcher.io·2y

    New without parentheses in PHP 8.4

    PHP 8.4 introduces a feature allowing developers to create new objects without parentheses, simplifying code and enabling method chaining directly on newly created objects. This update extends to methods, properties, static methods, and even supports dynamic and anonymous classes. However, constructor brackets remain mandatory for class instantiation to avoid parsing ambiguities. Despite minor limitations, this syntactic sugar promises to enhance coding efficiency.

  6. 6
    Article
    Avatar of stitcherstitcher.io·2y

    Improved lazy loading

    The post discusses the design and implementation of an ORM named Tempest, focusing on improved lazy loading mechanisms. The key approach includes using typed properties for static analysis, making minimal configuration necessary by inferring relations directly from property types and docblocks. It contrasts Tempest's strict lazy loading with Laravel's default approach which allows lazy loading, thereby preventing n+1 query problems and optimizing performance. The post also explores PHP's technical details, including handling uninitialized properties and triggering property accessors for lazy loading.