0

I'm using PHP 7.2.11 on my laptop that runs on Windows 10 Home Single Language 64-bit Operating System.

I've installed PHP 7.2.11 and Apache/2.4.35 (Win32) using the latest version of XAMPP for Windows.

I tried to print the letter (Hiragana Letter A) in my PHP program respectively using octal, hexadecimal and Unicode code-point notation.

I tried below code for every type of presentation but for every time I got some error.

I've put the respective error I got in form of comment in front of the respective line of code that I attempted :

<?php

     echo \30102; //Parse error: syntax error, unexpected '30102' (T_LNUMBER), expecting identifier (T_STRING) in demo.php on line 16    

     echo \xE29883; //Fatal error: Uncaught Error: Undefined constant 'xE29883' in demo.php:14 Stack trace: #0 {main} thrown in demo.php on line 14

     echo \uU+3042; //Fatal error: Uncaught Error: Undefined constant 'uU' in demo.php:18 Stack trace: #0 {main} thrown in demo.php on line 18

?>

Someone, please help me in printing out the character (Hiragana Letter A) in PHP. It will definitely help me in printing any other such special character.

Thank You.

Reference Link for the character (Hiragana Letter A) : https://www.compart.com/en/unicode/U+3042

PHPLover
  • 1
  • 51
  • 158
  • 311
  • @Lawrence Cherone : The question you linked doesn't show how to print a letter that has been shown using octal notation. So, I kindly request you to please remove the 'Duplicate' tag on my question so that someone could answer the question and all the three possible string representations for three different notations could be find at a one place. So, please reopen my question. Thank You. – PHPLover Nov 06 '18 at 07:21
  • The linked reference contains examples on how to accomplish this. Your three syntactically invalid attempts are not supported. And that's that. – mario Nov 06 '18 at 07:28

0 Answers0