php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7056 Setting string variables to value starting with '<' cause string to be empty.
Submitted: 2000-10-06 12:34 UTC Modified: 2000-10-10 08:36 UTC
From: tammy at synchronis dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 4.0.2 OS: redhat linux 5.2
Private report: No CVE-ID: None
 [2000-10-06 12:34 UTC] tammy at synchronis dot com
Setting a variable in any of the following ways and then printing it will show no value for the variable. Note that the string can start with any whitespace as well - e.g. '   <' will not work either. And setting to for example '   < blah' will still not work but setting to '   x < blah' will print 'x'. Is this expected behavior?! How do I set a string that includes the '<' character? Also, I thought strings quoted with single quotes were not parsed ?

 $fonts = array('heading' => 'FONT FACE="ARIAL,HELVETICA,SANS-SERIF" SIZE="3">',
                'column' => 'FONT FACE="ARIAL,HELVETICA,SANS-SERIF" SIZE="2">');
  $fonts['heading'] = '<' . 'FONT FACE="ARIAL,HELVETICA,SANS-SERIF" SIZE="3">';
  $fonts['column'] = "\<FONT FACE=\"ARIAL,HELVETICA,SANS-SERIF\" SIZE=\"2\">";
  $foo = '<FONT FACE="ARIAL,HELVETICA,SANS-SERIF" SIZE="3">';
echo "foo: $foo <BR>";
dumpList('fonts', $fonts);                  // this just prints the list.

                  


Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-10 08:36 UTC] stas@php.net
You probably are looking on it from a browser. browser shows HTMl, i.e. it won't show a < because it thinks it's an HTML tag.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Aug 17 18:01:30 2024 UTC