php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13070 chop/rtrim don't whack null bytes as advertised
Submitted: 2001-08-30 21:42 UTC Modified: 2001-08-31 14:10 UTC
From: scott at incursio dot com Assigned:
Status: Not a bug Package: Strings related
PHP Version: 4.0.6 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: scott at incursio dot com
New email:
PHP Version: OS:

 

 [2001-08-30 21:42 UTC] scott at incursio dot com
trim() seems to work, but rtrim/chop don't appear to kill a null at the end of a string variable.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-31 14:10 UTC] jeroen@php.net
This seems to work with me (4.0.7):

<?php

var_dump(trim("abc\0"));
var_dump(rtrim("abc\0"));

?>

Please see www.php.net/support.php for support questions, and only resubmit if they can't find the problem...
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Dec 16 12:01:23 2019 UTC