Skip to content

Instantly share code, notes, and snippets.

@manuelpichler
Created November 29, 2011 16:03
Show Gist options
  • Save manuelpichler/1405317 to your computer and use it in GitHub Desktop.
Save manuelpichler/1405317 to your computer and use it in GitHub Desktop.
PHP is such an ugly language
<?php
class MyClass
{
static function myMethod(
$x = <<<'FOO'
Hello
FOO
, $y = <<<'BAR'
PHP_Depend
BAR
) {
echo $x, $y;
}
}
@johannes
Copy link

johannes commented Dec 1, 2011

It is an constant expression, why create an extra rule limiting this? This brings complexity to the parser etc. If people want to do bad things they always can, inventing arbitrary artificial unneeded limitations is bad and makes the language more complex. We have cases which look like arbitrary limitations in the syntax, and that's always a pain ...

@manuelpichler
Copy link
Author

I do not critizes this syntax consistency at all, but I hate/dislike the now- and heredoc syntax in general from the first day and so this usage looks so ugly for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment