PHP alternative, lazy syntax

Alternative, lazy what?

Consider the next example:

';
     echo ''.$oItem->title.'';
     echo '';
} ?>

We could write the above like this:


     
  • title?>
  • Personally I think the second example is much easier to understand and a lot clearer for someone who isn’t familiar with PHP then the second one. (unfortunately my code highlight plugin thinks different though 😉 ) No braces in the code will also prevent some people to get the idea it’s to difficult to use PHP inside HTML and that integrating PHP into HTML is a task for PHP developers only. Also notice the advantage when indenting the HTML code.
    Futher it helps me to distinguish in my own projects template files and controllers, models,… because of the different syntax. So when I have a a file with mixed PHP and HTML this is the preferred way for me.

    Great! Let’s start using it!
    Good idea but bear in mind that their are a few drawbacks:

    • Not all servers allow the shorttags (check the short_open_tag entry in your php.ini file)
    • Not using ; in the above example is a bad practice and should be avoided
    • The most important one, their are other template engines on the market like Smarty, Dwoo, Savant, Template Blocks and a lot more that do the same thing but then easier or better (although you have minimal overhead)

    Futher I should note their are some heavy discussions (still?) going on in the PHP community whether the short tags are genius or just plain evil. One thing is pretty sure now the short tags will still be available in PHP version 6.

    For the complete list of the alternative syntax visit php.net

    Please fill in the poll and leave a comment.

    Comments

    921 responses to “PHP alternative, lazy syntax”

    1. sunriseonthereapinJeowN Avatar

      Download Sunrise on the Reaping PDF free right now. Suzanne Collins masterfully reveals the backstory behind Haymitch’s alcoholic persona during the fiftieth Games. This prequel explains everything about his broken spirit before mentoring Katniss. Get instant access without any registration barriers today. https://sunriseonthereapingpdf.top/ Sunrise On The Reaping Pdf Book

    2. heiroffirepdfJeowN Avatar

      Immerse yourself in a story where victory is never guaranteed or easy. https://heiroffirepdf.top/ What Book Is After Heir Of Fire

    3. sunriseonthereapinJeowN Avatar

      Download Sunrise on the Reaping PDF free today. Suzanne Collins returns with this fifth Hunger Games novel revealing Haymitch Abernathy’s transformation from hopeful teen to broken victor during the Quarter Quell. Understand his journey before Katniss. Instant access without any registration barriers. https://sunriseonthereapingpdf.top/ Synopsis Of Sunrise On The Reaping

    4. heiroffirepdfJeowN Avatar

      Immerse yourself in descriptions that paint vivid pictures without slowing the pace. https://heiroffirepdf.top/ Heir Of Fire Next Book

    5. ironflamepdfJeowN Avatar

      Iron Flame PDF blazes boldly! Rebecca Yarros fuels Violet’s fiery quest. Thrills await. Free at ironflamepdf.top! https://ironflamepdf.top/ The Empyrean, 2 Iron Flame Pdf Free Download

    6. sunriseonthereapinJeowN Avatar

      Sunrise on the Reaping PDF uncovers the truth behind one of literature’s most complex characters. Suzanne Collins crafts this fifth Hunger Games novel during the Quarter Quell. Witness Haymitch’s heartbreaking transformation. Free instant download available with no registration needed today. https://sunriseonthereapingpdf.top/ Sunrise On The Reaping Paperback

    7. heiroffirepdfJeowN Avatar

      Discover why this book is often cited as a fan favorite in the series. https://heiroffirepdf.top/ Book After Heir Of Fire

    8. lightsoutpdfJeowN Avatar

      The Lights Out PDF is available here for immediate, direct download. We have cut out the middleman to bring you the file faster. reliable, direct, and simple access for you. https://lightsoutpdf.top/ Outer Banks: Lights Out Pdf Free

    9. ironflamepdfJeowN Avatar

      Soar into Iron Flame with Violet! Dragons clash, hearts ignite in Rebecca Yarros’ spellbinding sequel. Action-packed pages await. Get your Iron Flame PDF free from ironflamepdf.top effortlessly! https://ironflamepdf.top/ Iron Flame Pdf Download

    10. sunriseonthereapinJeowN Avatar

      Sunrise on the Reaping offers Suzanne Collins’ most emotional narrative yet in the Hunger Games universe through Haymitch’s tragic journey during the Quarter Quell. This PDF prequel follows his impossible choices. Discover what made him drink before mentoring Katniss. Download free instantly without any registration today. https://sunriseonthereapingpdf.top/ How Old Is Haymitch In Sunrise On The Reaping

    11. lightsoutpdfJeowN Avatar

      Prepare for an exceptional reading journey with the Lights Out PDF from our top-rated site. We provide a clutter-free environment so you can focus on getting your document. It is the most efficient way to access the digital content you crave. https://lightsoutpdf.top/ Lights Out Pdf Book

    12. thecharliemethodpdJeowN Avatar

      Maximize your impact with the Charlie Method PDF. This guide hits hard. It is a hammer. Download the file today to make a dent in the universe and leave a mark that will not fade. https://thecharliemethodpdf.site/ The Charlie Method Android Ebook

    13. shieldofsparrowspdJeowN Avatar

      The Shield of Sparrows PDF is the perfect companion for a rainy day. Download it instantly and curl up with a good story. Let the digital pages transport you to another world while you stay dry and cozy. https://shieldofsparrowspdf.site/ Shield Of Sparrows Android Ebook

    14. fakeskatingpdfJeowN Avatar

      Read the in-depth report on the culture of the sport. This fake skating pdf examines the social dynamics and community values that influence how athletes interact and how trends spread across the globe. https://fakeskatingpdf.site/ Fake Skating Lynn Painter Publisher

    15. checkandmatepdfJeowN Avatar

      Dive into the fascinating subculture of chess enthusiasts. The Check and Mate PDF is your guide to this world, offering an insider’s look at the passion and dedication of the players. https://checkandmatepdf.site/ Improve Your Chess Pdf

    16. thecharliemethodpdJeowN Avatar

      The Charlie Method PDF offers a holistic view of success. It integrates various strategies into a cohesive system. This document is perfect for those who want a comprehensive solution. Access the guide now to see how different elements work together to create a powerful framework for achievement. https://thecharliemethodpdf.site/ The Charlie Method Spoilers

    17. shieldofsparrowspdJeowN Avatar

      The Shield of Sparrows PDF is a universal key. It unlocks the story for readers in every country. It knows no borders or shipping restrictions. https://shieldofsparrowspdf.site/ Shield Of Sparrows By Devney Perry Pdf

    18. checkandmatepdfJeowN Avatar

      Whether you are a chess enthusiast or a romance lover, this book has something for you. Download the Check and Mate PDF to explore a unique intersection of genres that results in a truly memorable and enjoyable reading experience. https://checkandmatepdf.site/ Check And Mate

    19. thecharliemethodpdJeowN Avatar

      The Charlie Method PDF is a comprehensive resource for strategic planning. It helps you map out your journey to success. This guide is analytical and thorough. Download it now to learn how to create a robust plan that can withstand challenges and lead you to your desired destination. https://thecharliemethodpdf.site/ The Charlie Method Elle Kennedy Download

    20. shieldofsparrowspdJeowN Avatar

      Get your hands on the latest digital edition of Shield of Sparrows. This PDF file allows for quick access and easy portability, making it the ideal companion for your daily commute. Join thousands of other readers who have already downloaded this incredible work and started their journey. https://shieldofsparrowspdf.site/ Shield Of Sparrows Devney Perry Free Ebook

    21. checkandmatepdfJeowN Avatar

      Make your digital library complete with this essential title. The Check and Mate PDF is the missing piece, offering a story that rounds out your collection and provides endless reading pleasure. https://checkandmatepdf.site/ Chess Endgames Pdf

    22. fakeskatingpdfJeowN Avatar

      Understand the psychology behind the competition with this fascinating study. The fake skating pdf examines the mindset of athletes and the strategic decisions made by coaches when designing routines that push the boundaries of the rules. https://fakeskatingpdf.site/ Fake Skating Book Pages

    23. checkandmatepdfJeowN Avatar

      Experience the thrill of the game and the warmth of love in one package. The Check and Mate PDF is formatted perfectly for e-readers, ensuring that the text flows smoothly and the reading experience is as enjoyable as possible. https://checkandmatepdf.site/ Life And Games Of Mikhail Tal Pdf

    24. thecharliemethodpdJeowN Avatar

      Achieve your goals faster by utilizing the Charlie Method. This PDF guide offers a streamlined approach to success. It focuses on high-impact activities that drive results. Read the document today to learn how to prioritize effectively and execute your plans with precision using this unique methodology. https://thecharliemethodpdf.site/ The Charlie Method Amazon Kindle

    25. shieldofsparrowspdJeowN Avatar

      The Shield of Sparrows PDF is a treasure trove of words. It holds the power to transport you to new lands. Unlock the magic with a simple download. https://shieldofsparrowspdf.site/ Is Shield Of Sparrows Spicy

    26. fakeskatingpdfJeowN Avatar

      Learn how to critique performances constructively. The fake skating pdf teaches the language of evaluation, helping you provide useful feedback to peers or simply analyze videos with a more critical eye. https://fakeskatingpdf.site/ Fake Skating Pdf Free Online

    27. checkandmatepdfJeowN Avatar

      Experience the thrill of a match where everything is on the line. The Check and Mate PDF is the front-row seat to this excitement, offering a story that is high-stakes and high-reward. https://checkandmatepdf.site/ Chessbase Tutorials Pdf

    28. iPhoneAir17JeowN Avatar

      Iphone 17 Price Usd When Will Iphone 17 Pro Max Be Released In Usa What Is Better Iphone 17 Pro Or Iphone Air Iphone Air 17 Price India How Much Is Iphone 17 Pro Max Apple Store Iphone 17 Colors Rumors Iphone 17 Colors When Will Apple Release Iphone 17?

    29. thecharliemethodpdJeowN Avatar

      Navigate complexity with the Charlie Method. This PDF guide simplifies the complicated. It is a translator for difficult concepts. Read the document today to make sense of the chaos and find a simple, elegant path through the complexities of your life or work. https://thecharliemethodpdf.site/ The Charlie Method Narrator

    30. fakeskatingpdfJeowN Avatar

      This document provides a platform for understanding the subculture of the sport. The fake skating pdf explores the music, fashion, and language that define the community, creating a holistic view of the lifestyle. https://fakeskatingpdf.site/ Fake Skating Pdf No Sign Up

    31. lepetitprincepdfJeowN Avatar

      L’histoire du petit prince est un baume pour le cœur. Appliquez-le grâce à une lecture numérique apaisante. Le format Le Petit Prince PDF est votre remède contre la morosité, une dose concentrée d’espoir et de tendresse à consommer sans prescription. https://lepetitprincepdf.site/ Le Petit Prince Pdf Aquarelles

    32. atoutjamaispdfJeowN Avatar

      Plongez dans ce roman captivant grâce à une version dématérialisée pratique et légère. Ce livre électronique est l’allié parfait de vos vacances ou de vos trajets quotidiens. Une histoire qui vous fera ressentir mille émotions, à lire et à partager sans modération. https://atoutjamaispdf.site/ À Tout Jamais It Starts With Us Français Pdf

    33. lepetitprincepdfJeowN Avatar

      L’univers de Saint-Exupéry est un refuge pour l’esprit, un endroit où il fait bon aller. La version électronique est la clé de ce refuge. Avoir Le Petit Prince PDF, c’est avoir la clé de ce jardin secret toujours dans sa poche, prêt à vous accueillir. https://lepetitprincepdf.site/ Le Petit Prince Pdf Gratuit Illustré

    34. atoutjamaispdfJeowN Avatar

      Laissez-vous emporter par ce récit passionnant en version dématérialisée pratique. Ce livre électronique est un must-have pour tous les amateurs de belles histoires d’amour. Une œuvre qui vous fera passer par toutes les émotions, une lecture inoubliable. https://atoutjamaispdf.site/ À Tout Jamais Pdf Babelio

    35. lafemmedemenagepdfJeowN Avatar

      Si vous aimez les intrigues complexes et les personnages ambigus, ce livre est fait pour vous. Téléchargez la version électronique pour profiter de chaque détail de cette histoire macabre. Une expérience littéraire intense vous attend, idéale pour les longs trajets ou les moments de détente à la maison. https://lafemmedemenagepdf.site/ La Femme De Ménage (Film)

    36. iPhoneAir17JeowN Avatar

      Iphone 17 Price Estimate Iphone 17 Expected Price When Will Apple Release The New Iphone 17 Iphone 17 Pro Max Specs Release Iphone 17 Pro Max Iphone 17 Pro Release Date Uk Availability Iphone 17 Air Thickness Dimensions Launch Date When Is The Iphone 17 Coming Out Iphone 17 Air Release Date And Price

    37. lepetitprincepdfJeowN Avatar

      L’héritage de Saint-Exupéry est plus vivant que jamais grâce au numérique. Les lecteurs d’aujourd’hui peuvent s’approprier ce texte facilement. Le format Le Petit Prince en PDF assure la transmission de ces valeurs humanistes essentielles à une nouvelle génération connectée. https://lepetitprincepdf.site/ Le Petit Prince Ebook Gratuit

    38. lafemmedemenagepdfJeowN Avatar

      Un thriller qui vous marquera par son audace et son originalité, disponible en ligne. La version électronique est prête pour vous. Plongez dans l’histoire de cette femme de ménage et découvrez une intrigue où la manipulation est un art et où la survie ne tient qu’à un fil. https://lafemmedemenagepdf.site/ Livre La Femme De Menage Pdf

    39. greatbigbeautifullJeowN Avatar

      Find the courage to love deeply. The Great Big Beautiful Life PDF is a great ocean. It holds big water for a beautiful life. Download the document to dive into love. https://greatbigbeautifullifepdf.site/ Who Is Nicolette In Great Big Beautiful Life

    40. iPhoneAir17JeowN Avatar

      Iphone 17 Pro Price Uae Apple Store Aed Iphone 17 Price Usd To Tzs Iphone 17 Pro Vs Pro Max Differences Specs Taiwan Iphone Air Battery Capacity Pink Apple Iphone 17 Pro Case Blue Leather Iphone 17 Pro Case Iphone 17 Air Battery Life Reviews

    41. atoutjamaispdfJeowN Avatar

      Découvrez ce best-seller mondial sur votre liseuse grâce à un fichier parfaitement formaté. Ce PDF est l’outil idéal pour une lecture confortable et immersive au quotidien. Une histoire qui marque une vie à tout jamais, à ajouter à votre liste de lecture. https://atoutjamaispdf.site/ Site De Téléchargement Livre À Tout Jamais

    42. lafemmedemenagepdfJeowN Avatar

      Vivez une expérience de lecture unique avec ce thriller psychologique aux multiples facettes. La version électronique est facile à obtenir et parfaite pour une lecture sur le pouce. Plongez dans les mystères de la famille Winchester et découvrez ce qu’il en coûte de fouiller dans le passé des autres. https://lafemmedemenagepdf.site/ La Femme De Ménage Mobi Gratuit

    43. greatbigbeautifullJeowN Avatar

      Find the courage to speak your truth. The Great Big Beautiful Life PDF is a great voice. It shouts big words for a beautiful life. Download the document to find your voice. https://greatbigbeautifullifepdf.site/ How Does Great Big Beautiful Life End

    44. código da binance Avatar

      Your point of view caught my eye and was very interesting. Thanks. I have a question for you. https://www.binance.info/fr-AF/register?ref=JHQQKNKN

    45. atoutjamaispdfJeowN Avatar

      Vous souhaitez lire ce livre culte sans vous encombrer ? La version dématérialisée est la solution idéale pour votre bibliothèque virtuelle. Accédez instantanément à ce récit bouleversant et laissez-vous guider par la plume talentueuse de l’auteur. Un incontournable à avoir absolument dans sa collection de livres numériques. https://atoutjamaispdf.site/ À Tout Jamais Pdf Gratuit Telecharger

    46. lafemmedemenagepdfJeowN Avatar

      Découvrez le thriller qui a redéfini les règles du genre domestique avec brio. Le format PDF est disponible pour vous permettre de lire cette histoire partout. Suivez cette femme de ménage dans sa quête de vérité et préparez-vous à être bluffé par la tournure des événements. https://lafemmedemenagepdf.site/ La Femme De Ménage, Tome 2

    47. greatbigbeautifullJeowN Avatar

      Discover the beauty of impermanence. The Great Big Beautiful Life PDF is a great flower. It blooms big petals for a beautiful life. This text teaches that everything changes. https://greatbigbeautifullifepdf.site/ The Great Big Beautiful Life

    48. iPhoneAir17JeowN Avatar

      Iphone 17 Pro Vs Iphone Air Specs Iphone Air Specs Difference Apple Iphone 17 Event September 2025 Rumor Date Apple Iphone 17 Pro Max Price In Pakistan How Much Is Iphone 17 Air In Naira Iphone 17 Pro Max Price Pakistan Estimate Apple Iphone Air 2025 Apple Newsroom

    49. toutlebleuducielpdJeowN Avatar

      Découvrez la magie de ce récit avec la simplicité du format fichier. Tout le bleu du ciel est une invitation au voyage, un roman disponible en ebook pour vous faire vivre des émotions fortes et authentiques sans bouger de chez vous. https://toutlebleuducielpdf.site/ Télécharger Tout Le Bleu Du Ciel Epub

    50. bonjourtristessepdJeowN Avatar

      Françoise Sagan a écrit ce roman fulgurant à l’âge de dix-huit ans, créant un scandale littéraire qui s’est transformé en légende. Accédez facilement au texte intégral en format PDF pour analyser la plume incisive de l’auteure et comprendre pourquoi ce livre reste une référence absolue de la littérature française moderne. https://bonjourtristessepdf.site/ Bonjour Tristesse Résumé

    Leave a Reply

    Your email address will not be published. Required fields are marked *