Skip to main content
73
→ Français
  • About
  • Contact

    Do you want some sugar Twig?

    12/30/2020 ¤ 1 min read ¤ php

    Disponible aussi en Français


    Twig has a pretty cool syntactic sugar, which I love:

    {% for i in [1, 2, 3, 4, 5][start:length] %}
    # some code \o/
    {% endfor %}
    

    It allows for cutting an array in a beautiful and readable way.

    #php

    ← Previous Handle Hugo translations
    Next → Mac OS 11 Big Sur

    See Also

    • PHP 8 attributes, what's new?
    • Why PHP 8 will be awesome
    • What's behind opcodes?
    • About setters and getters
    • Binding in PHP
    • Demystifying clone in PHP

    © 2021 Julien Maury

    ∆