#44523 [Opn->Bgs]: trying to add a valuable user note, but can't. Line too long after wordwrap??
| From: | felipe@php.net | Date: | Tue, 25 Mar 2008 11:22:54 +0000 |
| Subject: | #44523 [Opn->Bgs]: trying to add a valuable user note, but can't. Line too long after wordwrap?? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-123594@lists.php.net to get a copy of this message | ||
ID: 44523
Updated by: felipe@php.net
Reported By: michel at gopro-tec dot com
-Status: Open
+Status: Bogus
-Bug Type: Unknown/Other Function
+Bug Type: Scripting Engine problem
Operating System: Vista
PHP Version: 4.4.8
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
The function is being called missing arguments.
See http://docs.php.net/func-get-args
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2008-03-24 20:42:10] michel at gopro-tec dot com
Description:
------------
Can't post following code-example
Reproduce code:
---------------
Following example takes placeholders formatted like this:
[[name,parameter1,parameter2]] and replaces it with the
results for function calls: name(parameter1,parameter2).
This enabled me to make websites in a very convenient way.
The @ symbol before the function call surpresses the
warnings you'd otherwise see on your screen if you'd not
provide the number of parameters that the function(s) expect.
Let me know what you think.
<?php
function test($a,$b)
{
$c=$a*$b;
if(!$a)$a="NULL";
if(!$b)$b="NULL";
return("function <b>test()</b> says if you multiply $a and $b you
might end up with $c");
}
function testtwo($a,$b)
{
$c=$a." ".$b;
return("function <b>testtwo()</b> says that: ".$c."!");
}
$template="<html><body>[[test]]<br />[[test,17]]<br
/>[[test,18,3]]<p>[[testtwo,textpad,rocks]]</body></html>";
$template=preg_replace('/\[\[([a-z]+)\,?([0-9a-zA-Z]*)(\,?)([0-9a-zA-Z]*)]]/e','@$1($2
$3 $4)',$template);
print $template;
?>
Expected result:
----------------
post note.
Actual result:
--------------
your text is to long even after wordwrap... ??
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44523&edit=1