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

    742 responses to “PHP alternative, lazy syntax”

    1. Alduous Huxley Brave New World Revisited Pdf Avatar

      Huxley’s writing style is both elegant and biting. A Brave New World PDF captures every word of his satirical genius. Whether you are a student or a lifelong reader, this digital version allows you to appreciate the intricate world-building of this dystopian classic.

    2. bravenewworldpdfJeowN Avatar

      Huxley’s Brave New World is a warning we must heed. The Brave New World PDF preserves this warning. Download the text and arm yourself with the knowledge of what could be. https://bravenewworldpdf.site/ Brave New World Epub Mobilism

    3. littlewomenpdfJeowN Avatar

      It is impossible to discuss classic American literature without mentioning the saga of the March family. This book has been adapted into plays, movies, and series, yet the original text holds a magic that is all its own. To experience the author’s true voice, reading the book is essential. Finding a Little Women PDF is a quick way to get your hands on the text. It eliminates the wait for shipping and allows you to start reading the moment the urge strikes. rediscover the dialogue and the descriptions that have enchanted the world for over a century. https://littlewomenpdf.site/ Little Women Questions And Answers Pdf

    4. heartofdarknesspdfJeowN Avatar

      Marlow’s journey is often interpreted as a descent into hell. The stations he passes are like circles of suffering. This allegorical reading adds another layer of depth to the story. If you are interested in this interpretation, a Heart of Darkness PDF can help you track the religious and mythological references in the text. The book is a profound spiritual inquiry disguised as an adventure story. It is a work that speaks to the soul. https://heartofdarknesspdf.site/ Litcharts Heart Of Darkness Pdf

    5. littlewomenpdfJeowN Avatar

      The enduring legacy of this novel is evident in the countless retellings and adaptations it has spawned. However, nothing beats the original. The prose is lush, and the emotional impact is undeniable. For those who want to go back to the source, a digital copy is the way to go. A Little Women PDF allows you to carry the book with you without adding weight to your bag. It is the ultimate combination of literary tradition and technological advancement, bringing the March sisters into the 21st century. https://littlewomenpdf.site/ Little Women Chapter 4 Pdf

    6. thestrangerpdfJeowN Avatar

      The murder of the Arab is the pivot point of The Stranger, but the true conflict is between Meursault and society. Albert Camus shows how a man is demonized for not conforming. If you are searching for a digital copy or PDF, this book is a fascinating study of alienation. Meursault is a hero of the absurd, a man who remains true to his own experience until the very end. https://thestrangerpdf.site/ The Stranger Matthew Ward Epub

    7. thepearlpdfJeowN Avatar

      Juana’s submission to Kino, followed by her assertion of strength, paints a complex picture of marriage in the narrative. She is the voice of reason, often silenced but ultimately proven right. Her loyalty is tragic; she follows Kino even when she knows he is leading them to ruin. Feminist readings of the text often utilize the pearl pdf to highlight Juana’s unrecognized agency. She is the one who tries to throw the pearl away, and she is the one who refuses to leave Kino’s side when all is lost. Her silent strength is the emotional anchor of the novella. https://thepearlpdf.site/ The Pearl Book Pdf

    8. littlewomenpdfJeowN Avatar

      There is a reason why this book has never been out of print since its publication. Its appeal is universal, transcending cultural and temporal boundaries. It speaks to the dreamer in all of us. If you want to see what makes this novel a masterpiece, you should read the full text. A Little Women PDF is often the most accessible way to do so. It allows you to bypass the library queue and own a copy of this literary gem instantly. Let the story of the March sisters inspire you to find your own castle in the air. https://littlewomenpdf.site/ Little Women Libro Pdf

    9. thestrangerpdfJeowN Avatar

      Camus’ The Stranger is often cited as a prime example of absurdist fiction. The protagonist, Meursault, wanders through life with a detachment that is both enviable and terrifying. His lack of ambition and emotion makes him a target. Readers looking for the PDF version of this classic often seek to understand the famous courtroom scenes where Meursault’s soul is put on trial. This novel is a critical examination of how society treats those who do not fit the mold. https://thestrangerpdf.site/ The Stranger Albert Camus Online Pdf

    10. The Pearl Summary Pdf Download Avatar

      Juana’s submission to Kino, followed by her assertion of strength, paints a complex picture of marriage in the narrative. She is the voice of reason, often silenced but ultimately proven right. Her loyalty is tragic; she follows Kino even when she knows he is leading them to ruin. Feminist readings of the text often utilize the pearl pdf to highlight Juana’s unrecognized agency. She is the one who tries to throw the pearl away, and she is the one who refuses to leave Kino’s side when all is lost. Her silent strength is the emotional anchor of the novella.

    11. Introduction On Heart Of Darkness Pdf Avatar

      Explore one of the most discussed works in the English canon, where the physical journey mirrors a descent into the unconscious. Joseph Conrad paints a grim picture of the ivory trade, using it as a backdrop to examine the darkness inherent in the human heart. For literary scholars and casual readers alike, securing a high-quality text is the first step to understanding the enigma of Kurtz. Searching for a Heart of Darkness PDF can provide immediate access to this profound narrative. It is a story that questions the very definition of progress and the costs of unchecked ambition.

    12. The Stranger Albert Camus Mobi Download Avatar

      Here is a list of varied promotional texts tailored for the book The Stranger by Albert Camus, incorporating the intent of the search query “the stranger pdf”.

    13. Little Women Vocal Score Pdf Avatar

      There is a profound sadness in the book that is balanced by an overwhelming sense of hope. Alcott does not shy away from the hard truths of life, which is what makes the happy moments shine so brightly. To experience this emotional rollercoaster, you need the book. A Little Women PDF is a great way to access the story without delay. It allows you to read the sad parts in privacy and the happy parts with joy, all from the convenience of your personal device.

    14. Heart Of Darkness Online Read Pdf Avatar

      The enigma of Kurtz and his station in the heart of the jungle has captivated readers for over a century. Conrad’s ability to evoke a sense of unease is unmatched, making this novella a masterclass in atmospheric writing. If you are looking to explore the roots of modern psychological literature, this text is essential. A Heart of Darkness PDF provides the accessibility needed for today’s fast-paced world. Whether read for pleasure or academic purpose, the story’s examination of the thin line between sanity and madness is compelling and terrifyingly real.

    15. The Stranger Pdf Online Avatar

      The blinding light of the Algerian coast is almost a character itself in The Stranger. It pushes Meursault toward a destiny he never planned. Albert Camus writes with a detachment that mirrors his protagonist’s worldview. For those seeking The Stranger PDF online to analyze the imagery and symbolism, the text offers a masterclass in atmospheric writing. The novel is short, but its impact is massive, leaving readers with lingering questions about fate, free will, and the constructs of society.

    16. Little Women Piano Conductor Score Pdf Avatar

      The struggle for artistic and personal expression is a central theme in the novel, particularly for Jo and Amy. Their journeys resonate with anyone who has ever chased a dream. To be inspired by their tenacity, read the full story. A Little Women PDF is a convenient tool for creatives and dreamers. It allows you to highlight the passages that inspire you and keep them for later reference. Let the ambition of the March sisters fuel your own passions through the pages of this timeless book.

    17. The Stranger Albert Camus Full Pdf Avatar

      The glare of the sun, the salt of the sea, and the coldness of a prison cell. The Stranger is a book of contrasts. Albert Camus explores the physical world with intensity. If you are looking for a digital text or PDF, this novel is an immersion into the mind of a man who is purely physical. Meursault’s lack of abstract thought is his tragic flaw in a world that values abstract morality.

    18. Little Quilts Women Of The Bible Setting Instructions Pdf Avatar

      The romance in the book is subtle yet powerful, moving from innocent crushes to deep, mature love. It teaches us that love is not always what we expect, but it is always worth waiting for. To follow the romantic journeys of the sisters, grab a copy of the book. A Little Women PDF is a discreet and convenient way to read. You can enjoy the romantic twists and turns anywhere, from a crowded train to a quiet park bench.

    19. Novel Heart Of Darkness Pdf Avatar

      Why does the wilderness whisper to Kurtz? This question lies at the center of Conrad’s dark tale. The narrative is a psychological puzzle, asking how a man of such promise could fall so low. Literature students often rely on a Heart of Darkness PDF to help dissect the complex sentence structures and vocabulary. The book is a challenging read, but one that offers immense rewards for those who persevere. It is a haunting reminder of the fragility of the human mind and the corrupting influence of absolute power.

    20. greatbigbeautifullJeowN Avatar

      The buzz around Great Big Beautiful Life is entirely justified. Emily Henry has delivered a novel that is both heartwarming and heartbreaking. It is a story that demands to be read, and the epub format makes it easier than ever to do so. Whether you use a dedicated e-reader or a tablet, the digital version looks fantastic and reads smoothly. This is the kind of book that you will want to recommend to all your friends. It captures the great, big, beautiful mess of life in a way that is truly special. Don’t wait another day to start this incredible story; get the ebook and dive in. https://greatbigbeautifullifeepub.site/ Synopsis Of Great Big Beautiful Life

    21. thisbookwillburymeJeowN Avatar

      Ashley Winstead’s This Book Will Bury Me is a mirror. It is a book that reflects. The epub version is the glass. See yourself in the text. The story is reflective. It is a book that will bury you in its image. If you want a digital book that shows, this is it. Get the epub and look. https://thisbookwillburymeepub.site/ Ashley Winstead This Book Will Bury Me Interview

    22. thelasthousewifeepJeowN Avatar

      Shay Deroy is unforgettable. Her journey is powerful. The The Last Housewife epub is available online. The book is dark and real. It is a thriller to remember. Highly recommended. https://thelasthousewifeepub.site/ The Last Housewife Ending Spoilers

    23. shieldofsparrowsepJeowN Avatar

      Devney Perry has done it again with Shield of Sparrows. This book is a must-have for romance lovers, and the epub format is the most convenient way to own it. No more waiting for the mail; digital delivery is instant. The story is rich with detail and emotion, hallmarks of Perry’s style. Reading on a tablet or e-reader allows you to highlight quotes and bookmark pages effortlessly. Ensure you are part of the fandom by downloading this ebook and diving into the story today. https://shieldofsparrowsepub.site/ What Is A Crux In Shield Of Sparrows

    24. greatbigbeautifullJeowN Avatar

      Join the legions of fans who love Great Big Beautiful Life. Emily Henry creates a story that is impossible to put down. The epub format allows you to read wherever you are. It is a great way to enjoy this beautiful novel. The story is filled with heart and humor. This is a life story that is worth reading. Download the ebook and see what all the hype is about. https://greatbigbeautifullifeepub.site/ Great Big Beautiful Life Emily Henry Editions

    25. thisbookwillburymeJeowN Avatar

      When you see a title like This Book Will Bury Me, you expect intensity, and Ashley Winstead delivers in spades. This is a novel that grabs you by the throat. For those who love their e-readers, the epub file is the key to unlocking this thrill ride. It is formatted to provide a smooth reading experience, letting the words flow effortlessly. The story is a complex web of lies and truths that will keep you analyzing every detail. It is a must-read for fans of psychological drama. Get the digital version and find out why this book is burying the competition. https://thisbookwillburymeepub.site/ This Book Will Bury Me Fanfiction

    26. thelasthousewifeepJeowN Avatar

      A sophisticated and dark thriller that pulls no punches. Shay Deroy’s comfortable life is shattered when her past comes back to haunt her. The convenience of the The Last Housewife epub format makes it easy to carry this heavy story with you. The cult aspect is written with chilling detail, making the danger feel immediate. It is a story about finding your voice after years of silence. Winstead’s prose is sharp, engaging, and deeply affecting. This is a book that demands to be read. https://thelasthousewifeepub.site/ The Last.housewife​

    27. shieldofsparrowsepJeowN Avatar

      Shield of Sparrows by Devney Perry is a romance hit. The shield of sparrows epub is the best format. Digital reading is the trend. Perry’s story is exciting. The ebook edition is perfect for fans. Make sure you get this title. It is a book you will like. https://shieldofsparrowsepub.site/ Who Is The Guardian In Shield Of Sparrows

    28. Great Big Beautiful Life Emily Henry Chapters Avatar

      Great Big Beautiful Life is the kind of book that reminds you why you love reading. Emily Henry creates a world that is immersive and inviting. The epub version allows you to step into this world with the tap of a finger. It is the perfect way to enjoy a great story without the bulk of a physical book. The narrative is filled with beautiful moments and memorable characters. This is a life-affirming story that will leave you smiling. Download the ebook and add some romance to your daily routine.

    29. The Last Housewife Ashley Winstead​ Avatar

      The past is never far behind in this psychological drama. Shay must face her history to change her future. The The Last Housewife epub is a great option for digital readers. The story is compelling and well-written. It is a book about the power of truth. Winstead has created a masterpiece of suspense.

    30. Devney Perry Shield Of Sparrows Epub Avatar

      Devney Perry’s Shield of Sparrows is a great novel. The epub format is perfect. You can read it on the go. Perry’s characters are deep. The digital edition is nice. Whether you are at home or out, this ebook is a good pick. Secure your copy.

    31. Emily Henry Great Big Beautiful Life Book Club Questions Avatar

      Great Big Beautiful Life is the perfect blend of sweet and savory. Emily Henry knows how to balance romance with real-life issues. The epub version is ideal for the reader who wants to read anywhere, anytime. It is a great way to access this beautiful story without carrying a heavy book. The characters are lovable and the plot is engaging. This is a life story that resonates. Get the digital edition and enjoy a fantastic read.

    32. The Last Housewife Content Warnings Avatar

      A sophisticated and dark thriller that pulls no punches. Shay Deroy’s comfortable life is shattered when her past comes back to haunt her. The convenience of the The Last Housewife epub format makes it easy to carry this heavy story with you. The cult aspect is written with chilling detail, making the danger feel immediate. It is a story about finding your voice after years of silence. Winstead’s prose is sharp, engaging, and deeply affecting. This is a book that demands to be read.

    33. This Book Will Bury Me Characters Avatar

      Every once in a while, a book comes along that changes the way you look at the genre. This Book Will Bury Me by Ashley Winstead is precisely that kind of novel. It is bold, fearless, and incredibly well-written. If you are a fan of reading on your tablet, the epub version offers a seamless experience that lets the story shine. You will find yourself reading “just one more chapter” until the sun comes up. The convenience of digital reading pairs perfectly with the addictive nature of Winstead’s prose. Do not let this title slip under your radar; it is a powerhouse of storytelling that deserves a spot on your digital shelf.

    34. Shield Of Sparrows Map Avatar

      Shield of Sparrows by Devney Perry is a romance novel you need to read. The shield of sparrows epub makes it easy to access. Digital formats are perfect for the modern lifestyle. Perry’s story is full of passion and drama. The ebook edition allows you to read on your own terms. Make sure you have this book on your device. It is a story you will love.

    35. leboyfriendepubJeowN Avatar

      La vérité effraie dans “Le Boyfriend”. Ce roman de Freida McFadden est un chef-d’œuvre de tension. Disponible en format epub, c’est le compagnon idéal. L’histoire est captivante et pleine de danger. Vous ne pourrez pas lâcher ce livre. Une lecture numérique indispensable. https://leboyfriendepub.site/ Freida Mcfadden Le Boyfriend 2025​

    36. lejournaldunprisonJeowN Avatar

      L’ancien président face à l’histoire. Ce livre est un rendez-vous manqué avec la justice mais réussi avec les lecteurs. Le format epub du journal d’un prisonnier est un succès. Nicolas Sarkozy y livre ses convictions. Un témoignage essentiel. https://lejournaldunprisonnierepub.site/ Livre Nicolas Sarkozy Le Journal D Un Prisonnier

    37. shortstoriesingermJeowN Avatar

      When you start learning German, the grammar can feel like a mountain. You might search for a short stories in German PDF to find an easier path. Reading stories breaks that mountain down into small stones. You tackle the grammar piece by piece, sentence by sentence, without even realizing it. The narrative drives you forward, past the difficulties. Before you know it, you have climbed higher than you thought possible. Let the story carry the weight of the learning process. https://shortstoriesingermanpdf.site/ Beginner Short Stories In German​

    38. Le Boyfriend Freida Mcfadden Date De Sortie​ Avatar

      Entrez dans la tête d’un tueur ou d’une victime ? Avec “Le Boyfriend”, la ligne est floue. Freida McFadden excelle à brouiller les pistes dans ce thriller haletant. Ce livre est parfait pour être lu en format epub sur votre tablette, offrant un confort de lecture optimal pour une histoire si intense. Les rebondissements s’enchaînent à une vitesse folle, ne laissant aucun répit au lecteur. C’est une œuvre sombre et marquante qui ravira les amateurs de sensations fortes. Ne manquez pas ce roman qui bouscule les codes du genre.

    39. Livre Le Journal D'un Prisonnier​ Avatar

      Découvrez la vérité sur les affaires Sarkozy. Ce livre est une enquête personnelle. Le format epub du journal d’un prisonnier est pratique. L’auteur y démonte les accusations une par une. Un livre convaincant.

    40. Better Than The Prom Summary​ Avatar

      The relationship between Liz and Wes in Better Than the Prom is built on a foundation of shared history. This adds a layer of depth to the romance that is often missing in other books. If you are looking for the PDF, you are looking for a story with substance. It is not just about the romance; it is about the friendship that underpins it. This makes the payoff at the end so much sweeter.

    41. Olly Richards Short Stories In German Pdf​ Avatar

      Why struggle with boring exercises when you could be reading a mystery or a sci-fi adventure? Searching for a short stories in German PDF shows you have the right instinct – reading is key. This collection takes that instinct and maximizes it with structured support. You get chapter summaries and comprehension questions that reinforce what you have read. This active engagement helps solidify your memory of new words. By reading content that is enjoyable, you are more likely to stick with it long-term. Consistency is the key to fluency, and this book makes consistency easy.

    Leave a Reply

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