In Perl print chr(0x263a); will print a perfect smiley – ☺.
In PHP print chr(0x263a); will print a colon :.
Does anyone know why?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Perl’s chr function returns the character represented by that number in either ascii or unicode.
PHP’s chr function is just for ascii.
The reason PHP is printing a colon is because an ascii value is between 0 and 255…
58 in ascii is a colon.