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

    808 responses to “PHP alternative, lazy syntax”

    1. Dan Brown L Ultimo Segreto Download Avatar

      L’ultimo capitolo della saga di Langdon, “L’ultimo segreto”, promette scintille. Un enigma complesso mette a dura prova il protagonista. Il formato pdf è perfetto per avere il libro sempre a portata di mano. L’autore conferma la sua maestria nel genere thriller. Preparati a vivere emozioni forti e a scoprire verità nascoste.

    2. Il Piccolo Principe O Pequeno Príncipe Pdf Avatar

      Ogni incontro del protagonista con gli abitanti dei vari asteroidi è una satira pungente dei vizi umani, dall’autoritarismo senza sudditi all’avidità senza scopo, descritti con un’ironia sottile e intelligente. Per chi studia letteratura o impara l’italiano, trovare il piccolo principe pdf può essere un eccellente esercizio linguistico oltre che un piacere culturale. La storia ci mostra come spesso gli adulti si concentrino su cose futili dimenticando l’essenziale, e ci invita a ribaltare questa prospettiva per ritrovare un’autenticità perduta nel rapporto con noi stessi e con il mondo circostante.

    3. I Giorni Dell Eternità Prezzo Avatar

      Il ventesimo secolo rivive in tutto il suo splendore e le sue contraddizioni in I giorni dell’eternità. Ken Follett chiude la sua opera magna con un romanzo indimenticabile. L’epub è la scelta vincente per chi vuole leggere questo titolo corposo con leggerezza. La comodità del digitale vi permetterà di apprezzare ogni sfumatura della trama. Un libro che vi appassionerà dalla prima all’ultima pagina, raccontando la fine di un’era e l’inizio di una nuova speranza.

    4. L'ultimo Segreto Dan Brown Pdf Gratis Avatar

      Un enigma che ti sfiderà in “L’ultimo segreto”. Robert Langdon è pronto alla prova. Il file pdf è molto richiesto. La storia è un mix di emozioni. Scopri la verità e preparati a rimanere senza parole.

    5. Il Piccolo Principe Commentato Con La Bibbia Pdf Avatar

      Antoine de Saint-Exupéry non ha scritto solo un libro, ha disegnato una mappa per l’anima, utile a chiunque si senta perso nel deserto della vita moderna e cerchi un pozzo d’acqua fresca. La versatilità del formato digitale, per chi cerca il piccolo principe pdf, permette di avere questa mappa sempre a portata di mano, pronta per essere consultata quando serve un consiglio o un momento di poesia. Le sue pagine ci ricordano che i grandi non capiscono mai niente da soli e che i bambini devono essere molto indulgenti con loro, una verità che strappa un sorriso e invita alla tolleranza.

    6. Ken Follett I Giorni Dell'eternità Pdf Download Avatar

      Le emozioni corrono veloci in I giorni dell’eternità, dove la storia mondiale si intreccia con quella privata dei protagonisti. Ken Follett dimostra ancora una volta il suo talento narrativo. Scegliere l’epub significa optare per la comodità senza sacrificare la qualità. Potrete leggere questo lungo romanzo senza fatica, grazie alla leggerezza del vostro dispositivo. Un finale epico che vi terrà incollati fino all’ultima pagina, disponibile ora in formato digitale per la vostra collezione.

    7. everythinginevertoJeowN Avatar

      The blue-eyed daughter, Lydia, was supposed to be the one who succeeded. She was the one who would fulfill all the promise her parents never realized. Her death leaves a void that cannot be filled. If you are browsing for the Everything I Never Told You PDF, you are likely prepared for an emotional experience. The book details the suffocating nature of parental love when it is mixed with regret. It is a powerful narrative about the struggle to carve out one’s own identity amidst the noise of others’ demands. https://everythinginevertoldyoupdf.site/ Everything I Never Told You Pdf Free Download​

    8. mockingjaypdfJeowN Avatar

      The distinct cultures of the different districts are finally united in a common cause. We see the industrial power of District 2 and the resilience of District 13. Explore the geography of Panem with the Mockingjay PDF. E-readers often have built-in dictionaries, helping you understand the unique terminology of the world. The scope of the world-building expands significantly in this final chapter. It is a rich and detailed setting that feels incredibly real. https://mockingjaypdf.site/ Suzanne Collins Mockingjay Pdf Download

    9. hauntingadelinepdfJeowN Avatar

      The Cat and Mouse duet is a phenomenon for a reason. It taps into our darkest fears and desires. If you are searching for the Haunting Adeline PDF, you are ready to see what all the fuss is about. The book is a gripping read that will keep you hooked from the first chapter. It is a story about the power of the human spirit to survive even the darkest of circumstances. Zade and Adeline are characters that will stay with you forever. https://hauntingadelinepdf.site/ Haunting Adeline Gun Scene Chapter Pdf

    10. empireofstormspdfJeowN Avatar

      The resilience of the human spirit is a key theme. The characters keep fighting no matter what. The Empire of Storms PDF is an inspiring read. It shows that hope is a powerful weapon. It is a positive message in a dark story. https://empireofstormspdf.site/ Throne Of Glass Empire Of Storms Pdf

    11. hauntingadelinepdfJeowN Avatar

      The Cat and Mouse duet is a phenomenon for a reason. It taps into our darkest fears and desires. If you are searching for the Haunting Adeline PDF, you are ready to see what all the fuss is about. The book is a gripping read that will keep you hooked from the first chapter. It is a story about the power of the human spirit to survive even the darkest of circumstances. Zade and Adeline are characters that will stay with you forever. https://hauntingadelinepdf.site/ Haunting Adeline Pdf Español Gratis

    12. everythinginevertoJeowN Avatar

      Celeste Ng has written a book that is both a page-turner and a work of art. If you are searching for the Everything I Never Told You PDF, you have excellent taste. It is a novel that delivers on every promise. It is a story that will change the way you see the world. https://everythinginevertoldyoupdf.site/ Everything I Never Told You Pdf Online

    13. empireofstormspdfJeowN Avatar

      The stakes have never been higher. The world is ending. The Empire of Storms PDF captures the desperation. It is a fight for survival. It is intense. https://empireofstormspdf.site/ Empire Of Storms Filetype:pdf​

    14. Mockingjay Mobi Download Avatar

      The final book in the Hunger Games series offers a gritty, realistic look at the consequences of rebellion. Unlike the previous novels, there is no arena, but the entire country of Panem has become a battlefield. Secure your digital copy today by finding the Mockingjay PDF to start reading instantly. The electronic format is perfect for late-night reading sessions when you just can’t stop turning the virtual pages. Witness the evolution of Prim, Gale, and Peeta as they grapple with the new world order. It is a story of resilience that demands to be read.

    15. Everything I Never Told You Full Book Pdf​ Avatar

      The search for the Everything I Never Told You PDF is a search for understanding. Readers want to know why Lydia died, but they leave with a deeper understanding of life. The book is a journey through grief, memory, and love. It is a story that stays with you, urging you to say the things you have left unsaid. It is a masterpiece of family drama that deserves all the acclaim it has received.

    16. Haunting Adeline Book 1 Epub Avatar

      Vigilante justice meets gothic romance in this explosion of a novel. The Z society is a mysterious organization that adds a layer of intrigue to the story. Fans of the genre often look for the Haunting Adeline PDF to consume the story quickly and discreetly. The book is a page-turner in the truest sense, with short chapters that keep the momentum going. It tackles the subject of human trafficking with a brutal honesty that is rare in fiction. This is not just a romance; it is a story about fighting back against the darkness of the world.

    17. Empire Of Storms Tandem Read Epub​ Avatar

      The foreshadowing in the book is subtle and clever. Re-reading it reveals new layers. The Empire of Storms PDF is great for a second pass. You see the clues you missed the first time. It is a well-constructed mystery.

    18. zumospin promo code no deposit Avatar

      Uitgebreide recensie van Zumospin Casino: licentie, spelaanbod, bonussen en mobiele app voor spelers uit Nederland. Welkomstbonus tot €150 + 200 spins.

    19. Empire Of Storms Pdf Download​ Avatar

      The humor in the book provides a necessary balance to the darkness. The banter is sharp and genuinely funny. Fans often quote the funny lines found in the Empire of Storms PDF. It humanizes the characters and makes you care about them more. It makes the tragic moments hurt even more.

    20. Celeste Ng Everything I Never Told You Pdf Avatar

      Celeste Ng has established herself as a major voice in contemporary fiction with this book. Her ability to blend social commentary with intimate family drama is unmatched. If you are looking for the Everything I Never Told You PDF, you are reading the work of a master storyteller. The book is technically brilliant and emotionally resonant. It is a novel that will stand the test of time.

    21. Haunting Adeline Español Epub Gratis Avatar

      The gothic atmosphere of Parsons Manor is the perfect backdrop for this twisted love story. The house feels alive, trapping Adeline in its embrace. Readers who find the Haunting Adeline PDF are often looking for that specific mood. The book delivers a sensory experience that is rich and immersive. It is a story about the ghosts of the past and the demons of the present. Zade is a demon that Adeline must learn to live with, or perhaps learn to love.

    22. Mockingjay Pdf Vk Avatar

      The color grey permeates District 13, symbolizing the suppression of individuality for the greater good. Katniss struggles to maintain her identity in this monochromatic world. Experience this struggle by reading the Mockingjay PDF. The stark contrast between the colorful Capitol and the grey rebellion is best experienced through the vivid writing. Digital reading allows you to focus purely on the words and the images they conjure. It is a visual novel without pictures.

    23. theroadpdfJeowN Avatar

      The Road is a story about the end of everything, yet it is strangely life-affirming. McCarthy shows that even when civilization is gone, love remains. The father and son are unforgettable characters. This book is a Pulitzer Prize winner. Many readers search for the road pdf to access the text quickly. It is a short, intense novel that packs a powerful emotional punch. https://theroadpdf.site/ The Road Cormac Mccarthy Libro Pdf

    24. belovedpdfJeowN Avatar

      Toni Morrison’s writing is known for its lyrical density and emotional weight, often requiring multiple readings to fully grasp. A Beloved PDF is a valuable resource for book clubs and study groups aiming to dissect the novel’s symbolism, such as the chokecherry tree scar on Sethe’s back. By utilizing an electronic format, readers can easily search for key motifs and discuss them in depth without flipping through hundreds of physical pages. The novel remains a critical examination of freedom and the costs associated with claiming ownership of one’s own self. https://belovedpdf.site/ Themes In Beloved Pdf

    25. kingdomofashpdfJeowN Avatar

      The sacrifices made by the Thirteen will never be forgotten. “Live, Manon” is a line that echoes in the minds of readers. It is a moment of pure tragedy and beauty. Read it for yourself in the kingdom of ash pdf. It serves as the emotional anchor of the second act. It raises the stakes for the final battle, making the desire for victory personal. https://kingdomofashpdf.site/ Kingdom Of Ash Sarah J Maas Pdf

    26. theroadpdfJeowN Avatar

      The Road by Cormac McCarthy is a glimpse of the apocalypse. It is not a bang, but a whimper. The slow decay of the world is terrifying. The father and son are witnesses to the end. This book won the Pulitzer Prize. Whether you read a hardcover or a pdf, the impact is undeniable. It is a classic for the ages. https://theroadpdf.site/ The Road By Cormac Mccarthy Epub Download

    27. The Order Kingdom Of Fallen Ash Pdf Avatar

      This book will make you laugh, cry, and cheer. It runs the full gamut of human emotion. Prepare yourself with the kingdom of ash pdf. It is an experience, not just a read.

    28. The Road Cormac Mccarthy Not Taken Questions Pdf Avatar

      The Road by Cormac McCarthy is a stark reminder of what we have to lose. The world is fragile. The father and son know this better than anyone. This novel is a Pulitzer Prize winner. Many people search for the pdf format to read the story. It is a book that serves as a warning and a prayer.

    29. Chapter 22 Beloved Pdf Avatar

      The character of Amy Denver is a catalyst for Sethe’s survival. Readers often search for a Beloved PDF to revisit her distinct voice and “carmine velvet” dreams. She represents the possibility of empathy across racial lines in a divided nation. A digital text allows for a quick retrieval of her chapters, which provide a rare glimpse of white poverty intersecting with black suffering, adding another layer of complexity to the novel’s social landscape.

    30. Dragonlance: Shadow Of The Dragon Queen Pdf Avatar

      The inclusion of the Valg princes as distinct characters with their own malice adds a personal element to the villainy. They are not just faceless monsters; they are intelligent and cruel. A Queen of Shadows pdf makes their presence felt on the page. Their psychological torture of the characters is disturbing and effective. It raises the stakes significantly, as defeat means not just death, but eternal suffering. The heroes are fighting for the sanctity of their own minds.

    31. Cormac Mcarthy The Road Multiple Choice Questions Pdf Avatar

      “The Road” is not just a title; it is the central metaphor of Cormac McCarthy’s novel. The road represents the journey of life, the path to salvation, and the danger of exposure. As the father and son travel, they witness the aftermath of the apocalypse. The book is written with a unique cadence that draws the reader in. If you are looking for a profound reading experience, this is it. Accessing the road pdf or e-book makes it simple to dive into this gray, silent world. It is a story about the legacy we leave behind for our children.

    32. Throne Of Glass Kingdom Of Ash Pdf Avatar

      Fans of epic fantasy battles will find everything they need here. Magic clashes with iron in spectacular fashion. The kingdom of ash pdf captures the chaos of war perfectly. It is loud, messy, and glorious.

    33. Beloved Pdf Book Free Avatar

      For a comprehensive study of the motif of hunger and consumption, a Beloved PDF is very useful. The title character’s insatiable hunger for sugar and for Sethe’s attention is a key element of the plot. Morrison uses consumption as a metaphor for the way the past can eat away at the present. A digital text allows for a quick search of food-related imagery, helping readers construct an argument about how emotional voids are translated into physical needs within the narrative.

    34. Queen Of Shadows Dianne Sylvan Pdf Avatar

      The return of magic to the world is described as a violent, chaotic, and beautiful event. It changes the power balance instantly. A Queen of Shadows pdf captures this transformative moment. Characters who were powerless suddenly regain their strength, while those who relied on technology and suppression are left vulnerable. It is a metaphor for the return of hope and the natural order of things. The liberation of magic is the liberation of the soul of the continent.

    35. wutheringheightspdJeowN Avatar

      Emily Brontë created a world where the landscape is as much a character as the people themselves. To fully appreciate the description of the Yorkshire setting, many readers turn to a Wuthering Heights PDF. This format is perfect for highlighting the vivid imagery and Gothic elements that define the novel. From the initial spooky encounter at the farmhouse to the tragic conclusion, the story remains a pillar of literary achievement. Downloading a digital copy is the modern way to connect with this nineteenth-century classic, bridging the gap between the past and present reading habits. https://wutheringheightspdf.site/ Chapter 4 Wuthering Heights Pdf

    36. eastofedenpdfJeowN Avatar

      Steinbeck’s critique of the war and the military-industrial complex through the character of Adam is subtle but poignant. It reflects the disillusionment of the post-WWI era. History and political science students find these sections revealing. Using an East of Eden PDF helps in locating specific political commentary within the text. Our analysis draws out these political themes, discussing Steinbeck’s pacifist leanings. We help you see the political dimension of this primarily domestic drama. https://eastofedenpdf.site/ East Of Eden Pdf Full Text

    37. betterthanthemovieJeowN Avatar

      Get lost in a book that feels like your favorite song on repeat. The musical elements add a unique layer to the romance between Liz and Wes. Searching for a Better Than the Movies PDF is the first step to joining the thousands of fans who adore this couple. It is a novel that strikes the perfect chord between humor and emotion, leaving a lasting melody in your heart. https://betterthanthemoviespdf.site/ Better Than The Movies Download Epub​

    38. metabolic approach to cancer Avatar

      Helping4Cancer.com shares free information about the metabolic approach to cancer, immune recovery, and natural NK cell support, based on research and strategies I personally explored during my own cancer journey.

    39. eastofedenpdfJeowN Avatar

      For those interested in the craft of writing, East of Eden serves as a masterclass in character development and setting the scene. Steinbeck’s journals, written while he was drafting the book, reveal his struggles. Comparing the final text to his journals is a fascinating exercise. Writers often look for an East of Eden PDF to study the sentence flow and structure. Our site offers a writer’s perspective on the novel, breaking down the techniques Steinbeck used to build tension and empathy. We help aspiring writers learn from the master. https://eastofedenpdf.site/ East Of Eden By John Steinbeck Pdf

    40. wutheringheightspdJeowN Avatar

      For a quick refresh before an exam, a Wuthering Heights PDF is indispensable. You can skim the chapters, review the plot points, and memorize the key quotes. The searchability of the digital document saves hours of study time. You can instantly locate the scenes you need to review. It is the ultimate study guide hack for students of English literature. The classic text is right there on your screen, ready to help you ace your test with a deep understanding of Brontë’s work. https://wutheringheightspdf.site/ Wuthering Heights Epub Free Download

    41. betterthanthemovieJeowN Avatar

      Lynn Painter has created a world where you want to stay forever. The supporting characters add depth and humor to the main love story. A digital PDF copy is a great way to visit this world whenever you need a pick-me-up. It is a book that shows that life is a collaborative effort, and the best scenes are the ones we improvise. https://betterthanthemoviespdf.site/ Better Than The Movies Pdf Download Free

    42. prideandprejudicepJeowN Avatar

      The novel is a perfect example of the “comedy of manners” genre. It creates humor from social interactions. To see how it works, read the text. A digital format is ideal for this genre. If you are looking for a Pride and Prejudice PDF, you are looking for sophisticated humor. Our site focuses on the genre defining work. Laugh at the rigid rules of the past. https://prideandprejudicepdf.site/ Filetype Pdf Pride And Prejudice

    43. eastofedenpdfJeowN Avatar

      The portrayal of the Chinese-American experience through Lee is revolutionary for its time. He breaks stereotypes and offers the most profound insights in the book. Asian-American literature studies often include this text. An East of Eden PDF is a valuable resource for accessing these specific cultural intersections. Our site offers essays on Lee’s identity and his role in subverting tropes. We provide a critical look at race and representation within the novel, adding an important layer to your reading. https://eastofedenpdf.site/ East Of Eden Epub Download Free

    44. wutheringheightspdJeowN Avatar

      Every lover of romance novels owes a debt to Wuthering Heights, the archetype of the tortured romantic hero. You can trace the roots of this trope by reading a Wuthering Heights PDF. Heathcliff is the blueprint for the brooding, dangerous lover, yet he is far more complex than his modern imitators. The novel explores the destructive power of obsession rather than idealizing it. A digital copy allows you to analyze the nuances of his character, separating the romantic myth from the tragic reality of his life. It is a crucial text for understanding the evolution of the romance genre. https://wutheringheightspdf.site/ Wuthering Heights Penguin 2002 Pdf

    45. prideandprejudicepJeowN Avatar

      Why wait for a delivery when you can read instantly? Digital books are immediate. If you want to start reading now, a digital file is best. A Pride and Prejudice PDF is just a click away. Our website offers this immediacy. We value your time and your desire to read. Start the first chapter within seconds. https://prideandprejudicepdf.site/ Jane Austen Pride And Prejudice Summary Pdf

    46. eastofedenpdfJeowN Avatar

      The stark realism of the brothel scenes contrasted with the domesticity of the ranch creates a jarring picture of society. Steinbeck captures the underbelly of respectability. It is a bold look at hypocrisy. Readers interested in social realism will appreciate this honesty. An East of Eden PDF allows you to read these grittier sections with privacy. Our content discusses the social commentary inherent in these contrasts, explaining what Steinbeck was saying about American morality. We help you look beneath the surface of the polite society depicted in the book. https://eastofedenpdf.site/ East Of Eden John Steinbeck Pdf Español

    47. wutheringheightspdJeowN Avatar

      For non-native English speakers, a Wuthering Heights PDF is a great way to improve language skills. You can easily use translation tools or dictionaries on your device while reading. The language is complex but rewarding. It introduces learners to a rich vocabulary and historical sentence structures. The digital format supports the learning process, making it less daunting to tackle a full-length English novel. It bridges the gap between language learning and cultural appreciation, offering a dual benefit to the international reader. https://wutheringheightspdf.site/ Wuthering Heights Thesis Pdf

    48. betterthanthemovieJeowN Avatar

      The unexpected depth in this rom-com elevates it above the rest. It tackles real issues while keeping the tone light and fun. A Better Than the Movies PDF is a great resource for readers who want substance with their fluff. It is a book that respects the intelligence of its audience while giving them the romance they crave. https://betterthanthemoviespdf.site/ Better Than The Movies Full Book Pdf Download Free​

    49. eastofedenpdfJeowN Avatar

      The relationship between the brothers, Cal and Aron, is heartbreakingly realistic. It captures the pain of growing up and the desperate need for validation. Young adult readers often resonate with Cal’s struggle. Accessing the story via an East of Eden PDF on a tablet makes it easy to read in privacy. Our content focuses on the coming-of-age aspects of the novel, offering support and analysis for younger readers encountering these heavy themes. We validate the emotional impact of the story, providing a space to discuss the difficulties of adolescence depicted in the book. https://eastofedenpdf.site/ East Of Eden Play Pdf

    Leave a Reply

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