Level 104
Double braces translate to <?php echo $thing; ?>
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello. So I've discovered something and needed to know the difference. When I have this:
{{ $msg = $errors->get('errormsg') }}
php throws a syntax error.
But when I have this:
<?php $msg = $errors->get('errormsg') ?>
The statement is evaluated and the assignment is made. What is the difference between the two?
Please or to participate in this conversation.