php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6935 wordwrap cut feature does not work
Submitted: 2000-09-29 05:46 UTC Modified: 2000-09-29 05:58 UTC
From: marcswanson at mediaone dot net Assigned:
Status: Closed Package: *Function Specific
PHP Version: 4.0.2 OS: redhat linux 6.0 i686 smp
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: marcswanson at mediaone dot net
New email:
PHP Version: OS:

 

 [2000-09-29 05:46 UTC] marcswanson at mediaone dot net
The code directly off of the manual page for wordwrap does not work:
<?

$text = "A very long woooooooooooord.";
$newtext = wordwrap( $text, 8, "\n", 1);

echo "$newtext\n";

?>

Will output:

Warning: Wrong parameter count for wordwrap in /usr/local/apache/htdocs/test.php on line 3


The "normal" wordwrap function without using the "cut" feature (eg using only 2 or 3  arguments such as wordwrap($string,10) or wordwrap($string,10,'\n') but NOT wordwrap($string,10,'\n',1) ) will work as described in the manual.


my php compile line:
--with-mysql=/usr/local/mysql -with-apache=/usr/local/apache_1.3.12


This bug was duplicated on 2 different installs of php 4.0.2.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-29 05:58 UTC] derick@php.net
The advanced functionality is only available in the CVS version at this moment.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 14 17:01:30 2024 UTC