php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18741 chop() - not working in 4.2.2
Submitted: 2002-08-05 07:34 UTC Modified: 2002-08-05 07:58 UTC
From: kodi_169 at tlen dot pl Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.2.2 OS: Windows ME PL ver. 4.90.3000
Private report: No CVE-ID: None
 [2002-08-05 07:34 UTC] kodi_169 at tlen dot pl
the chop() command doesn't work. it worked good in 4.1.2, but now on 4.2.2 it just doesn't.

i'm using APACHE 2.0.39 and 1.3.26 - it occurs in both versions.

this has worked in 4.1.2:
$nla = chop($nla);


regards,
gemini

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-05 07:44 UTC] cynic@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


cannot reproduce, can you please provide a complete script with its actual output?

 [2002-08-05 07:47 UTC] kodi_169 at tlen dot pl
<html>

<?PHP
$aaa = fopen("asd.txt","r+");
$bbb = fopen("qwe.txt","w+");

while(!feof($aaa))
{

$linia = fgets($aaa);
fwrite($bbb,"$linia");
echo "$linia";
}

fclose($aaa);
fclose($bbb);
$aaa = fopen("asd.txt","w+");
$bbb = fopen("qwe.txt","r");

$nla = "nowa linia w pliku";
$nla = chop($nla);

fwrite($aaa,"$nla");

while(!feof($bbb))
{

$linia = fgets($bbb);
fwrite($aaa,"$linia");
echo "$linia";
}

?>
</html>
 [2002-08-05 07:58 UTC] cynic@php.net
a complete script *including its actual output*. expected output too, please.

btw, i don't see how chop() could have any influence on the data you pass it: the string doesn't end in whitespace.

reopen this pr when you provide *helpful* info.

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 23:00:01 2026 UTC