note 54916 deleted from language.functions by nikic

From: Date: Wed, 30 Apr 2014 15:35:47 +0000
Subject: note 54916 deleted from language.functions by nikic
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-199384@lists.php.net to get a copy of this message
Note Submitter: p at onion dot whitefyre dot com ---- One potentially useful feature is that in function and variable names bytes within 0x7f-0xff are allowed. This means you can use any UTF-8 in a variable name. As a simple example (this only uses latin-1 characters, but the concept is the same): <?php function ²($n) { return pow($n, 2); } function ¶($string) { return '<p>'.str_replace("\n\n", "</p>\n<p>", $string).'</p>'; } echo ²(4); //16 echo ¶("Some text\n\nbroken into paragraphs"); ?> You can use this to write PHP code in your native language, or even better make creative use of symbols like above to make your code understandable by everyone.

« previous php.notes (#199384) next »