Stochastic Geometry

July 27, 2007

Unicode math symbols as operators in PHP6?

Filed under: PHP — Mark Dennehy @ 10:34

Noted over on Sara Golemon’s blog today. Can we expect this sort of thing to be in future PHP code?

var_dump(¼, ½ ¾);
// float(0.25)
// float(0.5)
// float(0.75)

var_dump(1 ≤ 2, 2 ≯ 3, 5 ≠ 6);
// bool(true)
// bool(true)
// bool(true)

var_dump(3 × 4, 15 ÷ 5);
// int(12)
// int(3)

var_dump(1 « 3);
// int(8)

/* Your font may be too small,
 * but that's a skull and crossbones */
☠('aka die/exit');

Well, no, not really – she implemented it just for fun, but it’s an interesting idea, and face it – who doesn’t want to be able to use all the keys on the Space Cadet Keyboard?

Space Kadet keyboard

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

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 )

Google+ photo

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

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: