DEV Community

Jitendra
Jitendra

Posted on • Updated on

Have you tried out PHP programming with all symbols defined as unicode

Here is one example using Devanagari:

class लगर
{
    const इन = 'इन्फो';

    public function लग(string $म, string $लवल)
    {
        echo "[$लेवल] $मेसेज";
    }
}

(new लगर)->लग('hello', लगर::इन);
Enter fullscreen mode Exit fullscreen mode

Top comments (10)

Collapse
 
mt3o profile image
mt3o • Edited

Just don't. Never.

It's a bad habit to use non-english names in any programming task. English is the standard and is clear on the naming convention.


Post censored because obviously stating that quality of code written by offshore developers is insulting, is racist.

Collapse
 
adhocore profile image
Jitendra

dont worry i havent. no one has. or ever will. could you please edit your comment and remove the last paragraph (for reasons we all know)

Collapse
 
mt3o profile image
mt3o

You already did wrote such code. Above, in the post. And according to Murphys law, there will be an idiot, who will use non-ascii characters, as you proposed. It's irrelevant if it is your alphabet, russian bukhvas or those shitty slavic diacritics.

Thread Thread
 
adhocore profile image
Jitendra

"trying out" and using for real stuffs is different, no?

Collapse
 
mt3o profile image
mt3o

Btw, it's been couple years since the name has changed, but T_PAAMAYIM_NEKUDOTAYIM is still the example of not treating the job seriously.

Collapse
 
biros profile image
Boris Jamot ✊ /

It could be useful to obfuscate your code :D

Collapse
 
devmazee2057282 profile image
dewbiez • Edited

It's possible to use this for obfuscation, however, I'd use hashing. People can't reverse easily that way. Isn't that the whole point?

You wouldn't want some to reverse engineer your obfuscated code. So ... why not make it so they can't?

Collapse
 
ogfris profile image
Fris

true i'll use this idea to my php encoder software haha thanks !

Collapse
 
tux0r profile image
tux0r

Why?

Collapse
 
adhocore profile image
Jitendra

for coolness and fun, maybe?