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

    683 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 *