note 124252 added to function.echo
| From: | beldr447 at gmail dot com | Date: | Mon, 30 Sep 2019 14:32:44 +0000 |
| Subject: | note 124252 added to function.echo | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-212441@lists.php.net to get a copy of this message | ||
So while doing some tests in the classroom I kind of found out that, at least on php version 7.3.9,
echo formats the spaces of any string you use it to not have any spaces on either left or right and
only have one space between words.
For example:
<?php
$text = " test text ";
echo $text;
?>
This would print out :
test text
Echo eliminated the spaces from the page output but on the page source the spaces would still be
there.
----
Server IP: 208.43.231.9
Probable Submitter: 185.85.3.195 (proxied: 85.192.73.43)
----
Manual Page -- http://php.net/manual/en/function.echo.php
Edit -- https://master.php.net/note/edit/124252
Del: integrated -- https://master.php.net/note/delete/124252/integrated
Del: useless -- https://master.php.net/note/delete/124252/useless
Del: bad code -- https://master.php.net/note/delete/124252/bad+code
Del: spam -- https://master.php.net/note/delete/124252/spam
Del: non-english -- https://master.php.net/note/delete/124252/non-english
Del: in docs -- https://master.php.net/note/delete/124252/in+docs
Del: other reasons-- https://master.php.net/note/delete/124252
Reject -- https://master.php.net/note/reject/124252
Search -- https://master.php.net/manage/user-notes.php