Where you can (and can't) use Emoji in PHP


Group of emoji.

I was noodling around in PHP the other day and discovered that this works: <?php $🍞 = "bread"; echo "Some delicious " . $🍞; I mean, there's no reason why it shouldn't work. An emoji is just a Unicode character (OK, not just a character - but we'll get on to that), so it should be fine to use anywhere. Emoji work perfectly well as function names: function 😺🐢() { echo "catdog!"; } 😺🐢(); Definitions: define( "❓", "huh?" ); echo ❓; And, well, pretty much everywhere: class 🦜 { publi…

Continue reading β†’