?php $beer = 'Heineken'; echo "$beer's taste is great"; / / works, "'"is an invalid character for varnames echo "He drank some $beers"; / / won't work, 's' is a valid character for varnames echo "He drank some ${beer}s"; / / works echo "He drank some {$beer}s"; / / works?
La syntaxe complexe a été introduite en PHP 4 et peut être reconnue grâce aux accolades entourant les expressions.