#40416 [NEW]: Note posting
| From: | danielcottrell at operamail dot com | Date: | Fri, 09 Feb 2007 16:07:03 +0000 |
| Subject: | #40416 [NEW]: Note posting | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-34177@lists.php.net to get a copy of this message | ||
From: danielcottrell at operamail dot com
Operating system: xp pro
PHP version: Irrelevant
PHP Bug Type: Website problem
Bug description: Note posting
Description:
------------
When previewing notes that you add to the docummentation they don't
recognise new lines/paragraphs.
Reproduce code:
---------------
Just to confirm, USING UNSET CAN DESTROY AN ENTIRE ARRAY. I couldn't find
reference to this anywhere so I decided to write this.
The difference between using unset and using $myarray=array(); to unset is
that obviously the array will just be overwritten and will still exist.
<?php
$myarray=array("Hello","World");
echo $myarray[0].$myarray[1];
unset($myarray);
//$myarray=array();
echo $myarray[0].$myarray[1];
echo $myarray;
?>
Output with unset is:
<?
HelloWorld
Notice: Undefined offset: 0 in C:\webpages\dainsider\myarray.php on line
10
Notice: Undefined offset: 1 in C:\webpages\dainsider\myarray.php on line
10
Output with $myarray=array(); is:
?>
<?
HelloWorld
Notice: Undefined offset: 0 in C:\webpages\dainsider\myarray.php on line
10
Notice: Undefined offset: 1 in C:\webpages\dainsider\myarray.php on line
10
Array
?>
Expected result:
----------------
Proper newlines and paragraphs, essentially a more accurate preview.
Actual result:
--------------
Just to confirm, USING UNSET CAN DESTROY AN ENTIRE ARRAY. I couldn't find
reference to this anywhere so I decided to write this. The difference
between using unset and using $myarray=array(); to unset is that obviously
the array will just be overwritten and will still exist. <?php
$myarray=array("Hello","World"); echo $myarray[0].$myarray[1];
unset($myarray); //$myarray=array(); echo $myarray[0].$myarray[1]; echo
$myarray; ?> Output with unset is: <? HelloWorld Notice: Undefined offset:
0 in C:\webpages\dainsider\myarray.php on line 10 Notice: Undefined offset:
1 in C:\webpages\dainsider\myarray.php on line 10 Output with
$myarray=array(); is: ?> <? HelloWorld Notice: Undefined offset: 0 in
C:\webpages\dainsider\myarray.php on line 10 Notice: Undefined offset: 1
in C:\webpages\dainsider\myarray.php on line 10 Array ?>
--
Edit bug report at http://bugs.php.net/?id=40416&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40416&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40416&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40416&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40416&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40416&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40416&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40416&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40416&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40416&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40416&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40416&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40416&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40416&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40416&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40416&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40416&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40416&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40416&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40416&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40416&r=mysqlcfg