php Classes n Methods are Unicoded ;)

wao PHP supports unicoded user defined classes and functions. Try out the following simple code yourself if you dont believe me :D


class বাংলা{
public function __toString(){
return 'বাংলায় ক্লাস লিখি ;) ';
}

public function হেলও_ওয়ার্ল্ড(){
echo 'আই এম এ হেলও_ওয়ার্ল্ড মেথড :দ ';
}
}

$obj = new বাংলা;
echo $obj;
echo $obj->হেলও_ওয়ার্ল্ড();

Here is the output

বাংলায় ক্লাস লিখি ;)
আই এম এ হেলও_ওয়ার্ল্ড মেথড :দ

N.B. This is only for fun ;) , dont try to use this approach, as your teammate might get puzzled about the class names if she does not understand Banagli ;)

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.