Bug #76184 [NEW]: string beginning with < error
From: jalesmonteiro at hotmail dot com
Operating system: UBUNTU 17.10
PHP version: 7.1.16
Package: Strings related
Bug Type: Bug
Bug description:string beginning with < error
Description:
------------
Strings beginning with the '<' char can't be printed.
The functions strlen and ctype_print show the return the expected,
however the echo and print shows nothing.
Test script:
---------------
<?php
$str = '<Hello>';
echo strlen($str);
echo '<br/>';
echo ctype_print($str);
echo '<br/>';
foreach (count_chars($str, 1) as $i => $val) {
echo 'There were '.$val.' instance(s) of "' , chr($i) , '" in
the
string.';
echo '<br/>';
}
echo $str;
?>
Expected result:
----------------
7
1
There were 1 instance(s) of "<" in the string.
There were 1 instance(s) of ">" in the string.
There were 1 instance(s) of "H" in the string.
There were 1 instance(s) of "e" in the string.
There were 2 instance(s) of "l" in the string.
There were 1 instance(s) of "o" in the string.
<Hello>
Actual result:
--------------
7
1
There were 1 instance(s) of "<" in the string.
There were 1 instance(s) of ">" in the string.
There were 1 instance(s) of "H" in the string.
There were 1 instance(s) of "e" in the string.
There were 2 instance(s) of "l" in the string.
There were 1 instance(s) of "o" in the string.
--
Edit bug report at https://bugs.php.net/bug.php?id=76184&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76184&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76184&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76184&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76184&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76184&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76184&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76184&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76184&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76184&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76184&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76184&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76184&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76184&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76184&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76184&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76184&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76184&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76184&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76184&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76184&r=mysqlcfg
Thread (12 messages)
- jalesmonteiro at hotmail dot com
- spam2 at rhsoft dot netBug #76184 [Com]: string beginning with < error
- jalesmonteiro at hotmail dot comBug #76184 [Opn]: string beginning with < error
- spam2 at rhsoft dot netBug #76184 [Com]: string beginning with < error
- spam2 at rhsoft dot netBug #76184 [Com]: string beginning with < error
- cmb@php.netBug #76184 [Opn->Nab]: string beginning with < error
- rowan dot collins at gmail dot comBug #76184 [Com]: string beginning with < error
- spam2 at rhsoft dot netBug #76184 [Com]: string beginning with < error
- slevy1 at pipeline dot comBug #76184 [Com]: string beginning with < error
- spam2 at rhsoft dot netBug #76184 [Com]: string beginning with < error
- stas@php.netBug #76184 [Nab]: string beginning with < error
- a at b dot c dot deBug #76184 [Com]: string beginning with < error