In PHP, il seguente codice non produce un errore di sintassi. Come sviluppatore, questo produrrà un errore di sintassi nella mia testa. Qualche indizio?
<?php
$ $ $ $ $ $ $what_the_hell_php = 'what is wrong with you PHP?';
echo $what_the_hell_php; // no output
echo $ $ $ $ $ $ $what_the_hell_php; // worth a try but no output too
// echo $; // well, don't do this. this produces an actual PHP syntax error.
$dollars = 'a lot of money will make me crazy';
echo $dollars;
echo $$$$$$$$$$$$$$$$$$$$$$$$$$ $lotsofmoney = " - and PHP too!";
// echo $$$$$$something $hello = 'hello'; // won't work, PHP likes pure dollars
// is it for this??
echo
$$$ $$$$$$ $$$$$$ $$$$ $$$$ $$$ $$$$$$$$ $$$$$$$$
$$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$
$$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$
$$ $$ $$$$$$ $$ $$ $$ $$ $$ $$$$$$$$ $$
$$$$$$$$$ $$ $$ $$ $$ $$$$$$$$$ $$ $$ $$
$$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$
$$ $$ $$$$$$ $$$$$$ $$$$ $$$$ $$ $$ $$ $$ $$
$ascii = "<hr />\nMy ASCII art is not a string or a comment! First time!";
?>
... e l'output:
a lot of money will make me crazy - and PHP too!<hr />
My ASCII art is not a text or a comment! First time!
Non sapeva che funziona con gli spazi. Questo lo spiega! – rationalboss
@rationalboss Ho provato ad elaborare un po 'di più. –