# Blade @php now REQUIRES @endphp, when it didn't before? Is this a bug?

**URL:** <https://discourse.roots.io/t/blade-php-now-requires-endphp-when-it-didnt-before-is-this-a-bug/13060>\
**Category:** sage\
**Tags:** blade\
**Created:** [July 27, 2018, 4:47pm UTC](https://discourse.roots.io/t/blade-php-now-requires-endphp-when-it-didnt-before-is-this-a-bug/13060 "2018-07-27T16:47:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Tanner1](https://discourse.roots.io/user_avatar/discourse.roots.io/matt_tanner1/32/10891_2.png) [@Matt\_Tanner1](https://discourse.roots.io/u/Matt_Tanner1)\
**Post date:** [July 27, 2018, 4:47pm UTC](https://discourse.roots.io/t/blade-php-now-requires-endphp-when-it-didnt-before-is-this-a-bug/13060/1 "2018-07-27T16:47:34Z")

</div>

In previous themes I was able to write php on a single line like so:

`@php(do_the_thing())`

But now if I do that, it breaks the page and gives php errors. I have to do it like this:

`@php do_the_thing(); @endphp`

I’ve done a lot of searching with a couple results, but no real answer… Was this single line feature removed? Is it a bug? Doing it the second way feels so klunky when it’s just a single line of php… I am typing more than if I were to just use regular php.

---

<div class="post-metadata">

**Author:** ![mmirus](https://discourse.roots.io/user_avatar/discourse.roots.io/mmirus/32/6279_2.png) [@mmirus](https://discourse.roots.io/u/mmirus)\
**Post date:** [July 27, 2018, 4:52pm UTC](https://discourse.roots.io/t/blade-php-now-requires-endphp-when-it-didnt-before-is-this-a-bug/13060/2 "2018-07-27T16:52:59Z")

</div>

This was changed in Laravel 5.5, which Sage updated to. It’s a little chunkier, but you’ll need to include both the opening and closing expressions now.

---

<div class="post-metadata">

**Author:** ![alwaysblank](https://discourse.roots.io/user_avatar/discourse.roots.io/alwaysblank/32/11206_2.png) [@alwaysblank](https://discourse.roots.io/u/alwaysblank)\
**Post date:** [July 27, 2018, 4:54pm UTC](https://discourse.roots.io/t/blade-php-now-requires-endphp-when-it-didnt-before-is-this-a-bug/13060/3 "2018-07-27T16:54:11Z")

</div>

See:

> <https://github.com/roots/sage/issues/2012>

> <https://github.com/roots/sage/pull/2060>

“I am typing more than if I were to just use regular php.” Generally the intent of Blade is that you are not writing PHP in it: Any logic should be handled at the controller level (i.e. with soberwp/controller or Sage’s filters).
