I'm new to programming and just started studying PHP.
I want to output Hello, world! To the terminal.
The% will be added at the end with a shadow.
Normally, it doesn't seem to come with%, but what happened to this?
Corresponding source code
○○ @ ○○○ MBP php% php test.php Hello, world!%
What I tried
<? php echo "Hello!"; ?>
When I ran it with php -a,% was not displayed.Supplementary information (FW/tool version, etc.)
Answer # 1
From the terminal prompt, I think it's working locally on macOS.
At this time, if you have not tampered with the login shell, the shell used is zsh.
So, zsh has a shadow indicating "no line breaks" if there is no line break at the end of standard output.
%%Is additionally output and ends after a line break.
* A question with the same content was posted before
%%If you don't want to get the message, just start a new line.
<? php --echo "Hello!"; + echo "Hello! \ N"; ?>
- java - when i ran the code, it said it wasn't exported
- i want to get the name of the laravel php zip file
- php - standard output doesn't work
- php - i want to open the same page on one side and another tab on the other side in the html form
- php - i want to pass the image file to the server
- php - i can't fly outside the wordpress page link
- php - the background color is output in the output of the wordpress category, but in the case of multiple categories, i want to
- php - i want to output the page number 01 02 03 with pagination paginate_links
- html - when specifying the image size
- [php] else part is not output
- isn't it bad to reference the php file of site a from site b on the same server?
- i want to pass the php path
- call any php file in the sidebar with a shortcode
- php - i want to save the pdf output by tcpdf + fpdi with laravel as a file
- emacs - can i edit the output in vim's terminal-normal mode?
- php - i want to be able to use the validate function
- about encryption at the time of output in php using form input tyle = "password"
- i want you to see the error contents of php
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- python 3x - typeerror: 'method' object is not subscriptable
- i want to call a child component method from a parent in vuejs
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- xcode - pod install [!] no `podfile 'found in the project directory