[PHP-DOC] #33149 [Opn]: function inet_pton unavailable
ID: 33149 Updated by: [EMAIL PROTECTED] Reported By: h dot warmelink at planet dot nl Status: Open -Bug Type: Network related +Bug Type: Documentation problem Operating System: Windows XP PHP Version: 5CVS-2005-05-26 (dev) New Comment: Both inet_pton() and inet_ntop() are available only in HEAD (i.e. PHP 5.1). Previous Comments: [2005-05-26 12:02:02] h dot warmelink at planet dot nl Description: In the last couple of days the documentation on inet_pton has changed. It now states that PHP5 supports this function, but the function seems unavailable. However, the direct use of inet_pton does not result in an error. Reproduce code: --- if (function_exists('inet_pton')) echo yes!; else echo no...; Expected result: yes! Actual result: -- no... -- Edit this bug report at http://bugs.php.net/?id=33149edit=1
[PHP-DOC] #33149 [Opn]: function inet_pton unavailable
ID: 33149 Updated by: [EMAIL PROTECTED] Reported By: h dot warmelink at planet dot nl Status: Open Bug Type: Documentation problem Operating System: Windows XP PHP Version: 5CVS-2005-05-26 (dev) New Comment: They are available in PHP 5.0 too but they are available only if HAVE_INET_NTOP or HAVE_INET_NTOP is defined. Previous Comments: [2005-05-26 12:14:14] [EMAIL PROTECTED] Both inet_pton() and inet_ntop() are available only in HEAD (i.e. PHP 5.1). [2005-05-26 12:02:02] h dot warmelink at planet dot nl Description: In the last couple of days the documentation on inet_pton has changed. It now states that PHP5 supports this function, but the function seems unavailable. However, the direct use of inet_pton does not result in an error. Reproduce code: --- if (function_exists('inet_pton')) echo yes!; else echo no...; Expected result: yes! Actual result: -- no... -- Edit this bug report at http://bugs.php.net/?id=33149edit=1
[PHP-DOC] cvs: phpdoc /en/language/oop5 typehinting.xml
nlopess Thu May 26 12:40:52 2005 EDT Modified files: /phpdoc/en/language/oop5typehinting.xml Log: add array type hinting http://cvs.php.net/diff.php/phpdoc/en/language/oop5/typehinting.xml?r1=1.2r2=1.3ty=u Index: phpdoc/en/language/oop5/typehinting.xml diff -u phpdoc/en/language/oop5/typehinting.xml:1.2 phpdoc/en/language/oop5/typehinting.xml:1.3 --- phpdoc/en/language/oop5/typehinting.xml:1.2 Sun Oct 3 01:07:04 2004 +++ phpdoc/en/language/oop5/typehinting.xml Thu May 26 12:40:51 2005 @@ -1,14 +1,15 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.2 $ -- +!-- $Revision: 1.3 $ -- sect1 id=language.oop5.typehinting titleType Hinting/title para PHP 5 introduces Type Hinting. Functions are now able to force parameters - to be objects by specifying the name of the class in the function prototype. + to be objects (by specifying the name of the class in the function + prototype) or arrays (since PHP 5.1). /para example - titleType Hinting example/title + titleType Hinting examples/title programlisting role=php ![CDATA[ ?php @@ -23,6 +24,16 @@ public function test(OtherClass $otherclass) { echo $otherclass-var; } + + +/** + * Another test function + * + * First parameter must be an array + */ +public function test_array(array $input_array) { +print_r($input_array); +} } // Another example class @@ -54,6 +65,12 @@ // Works: Prints Hello World $myclass-test($otherclass); + +// Fatal Error: Argument 1 must be an array +$myclass-test_array('a string'); + +// Works: Prints the array +$myclass-test_array(array('a', 'b', 'c')); ? ]] /programlisting @@ -85,9 +102,9 @@ /programlisting /example para - Type Hints can only be of the typeobject/type type. Traditional - type hinting with typeint/type and typestring/type are not - supported. + Type Hints can only be of the typeobject/type and typearray/type + (since PHP 5.1) type. Traditional type hinting with typeint/type and + typestring/type isn't supported. /para /sect1
[PHP-DOC] cvs: phpdoc /en/language/oop5 reflection.xml
nlopess Thu May 26 12:52:14 2005 EDT Modified files: /phpdoc/en/language/oop5reflection.xml Log: add ReflectionParameter::isArray http://cvs.php.net/diff.php/phpdoc/en/language/oop5/reflection.xml?r1=1.10r2=1.11ty=u Index: phpdoc/en/language/oop5/reflection.xml diff -u phpdoc/en/language/oop5/reflection.xml:1.10 phpdoc/en/language/oop5/reflection.xml:1.11 --- phpdoc/en/language/oop5/reflection.xml:1.10 Mon Apr 25 15:08:02 2005 +++ phpdoc/en/language/oop5/reflection.xml Thu May 26 12:52:14 2005 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.10 $ -- +!-- $Revision: 1.11 $ -- sect1 id=language.oop5.reflection titleReflection/title sect2 id=language.oop5.reflection.introduction @@ -236,6 +236,7 @@ public string getName() public bool isPassedByReference() public ReflectionClass getClass() +public bool isArray() public bool allowsNull() public bool isOptional() public bool isDefaultValueAvailable() @@ -248,6 +249,7 @@ note para functiongetDefaultValue/function, + functionisArray/function, functionisDefaultValueAvailable/function, functionisOptional/function were added in PHP 5.1.0. /para
[PHP-DOC] cvs: phpdoc /en/reference/network/functions inet-ntop.xml inet-pton.xml
nlopess Thu May 26 13:08:03 2005 EDT Modified files: /phpdoc/en/reference/network/functions inet-ntop.xml inet-pton.xml Log: not available on windows http://cvs.php.net/diff.php/phpdoc/en/reference/network/functions/inet-ntop.xml?r1=1.3r2=1.4ty=u Index: phpdoc/en/reference/network/functions/inet-ntop.xml diff -u phpdoc/en/reference/network/functions/inet-ntop.xml:1.3 phpdoc/en/reference/network/functions/inet-ntop.xml:1.4 --- phpdoc/en/reference/network/functions/inet-ntop.xml:1.3 Thu Mar 31 14:19:13 2005 +++ phpdoc/en/reference/network/functions/inet-ntop.xml Thu May 26 13:08:02 2005 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.3 $ -- +!-- $Revision: 1.4 $ -- refentry id=function.inet-ntop refnamediv refnameinet_ntop/refname @@ -38,6 +38,7 @@ ]] /programlisting /example +note.no-windows; para See also functionlong2ip/function, functioninet_pton/function, and http://cvs.php.net/diff.php/phpdoc/en/reference/network/functions/inet-pton.xml?r1=1.2r2=1.3ty=u Index: phpdoc/en/reference/network/functions/inet-pton.xml diff -u phpdoc/en/reference/network/functions/inet-pton.xml:1.2 phpdoc/en/reference/network/functions/inet-pton.xml:1.3 --- phpdoc/en/reference/network/functions/inet-pton.xml:1.2 Sat Aug 7 04:27:37 2004 +++ phpdoc/en/reference/network/functions/inet-pton.xml Thu May 26 13:08:03 2005 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.2 $ -- +!-- $Revision: 1.3 $ -- refentry id=function.inet-pton refnamediv refnameinet_pton/refname @@ -31,6 +31,7 @@ ]] /programlisting /example +note.no-windows; para See also functionip2long/function, functioninet_ntop/function, and
[PHP-DOC] #33037 [NoF-Opn]: English : Example Bad output
ID: 33037 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: No Feedback +Status: Open Bug Type:Livedocs problem PHP Version: Irrelevant New Comment: leave it open for further investigation. Previous Comments: [2005-05-24 01:00:05] phpdoc at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2005-05-17 00:56:40] [EMAIL PROTECTED] I'm already running the patch mentionned in #30440 http://livedocs.aborla.net/patch.php?id=entities Moreover, i wrote a comment into this bug. I applied it a long time ago and, if I remember, one of the pattern didn't match, so Ive corrected all files by hand. These lines were removed : -$GLOBALS['special'] = array('gt' = 1,'lt' = 1,'quot' = 1,'amp' = 1); - function handle_include($node) { global $current_page; $ref = $node-attributes['ref']; - /* Special HTML entities */ - if (isset($GLOBALS['special'][$ref])) { - return '' . $ref . ';'; - } - [2005-05-16 16:28:46] [EMAIL PROTECTED] Its a livedocs problem. Could you please try my ancient patch mentioned in #30440 ? [2005-05-16 03:52:27] [EMAIL PROTECTED] Description: reference/strings/functions/htmlspecialchars-decode.html Ok, look at the example in livedocs what it outputs..., the output is the same... (check example too). I don't really know if it is a doc bug or a livedocs bug. Feel free to redirect this bug to Livedocs... Perhaps the output will be great on php.net, i don't know ?! Expected result: ?php $str = 'pthis -gt; quot;/p'; echo htmlspecialchars_decode($str); // notez ici que les guillemets ne sont pas convertis echo htmlspecialchars_decode($str, ENT_NOQUOTES); ? pthis - /p pthis - quot;/p Actual result: -- ?php $str = 'pthis -gt; /p'; echo htmlspecialchars_decode($str); // notez ici que les guillemets ne sont pas convertis echo htmlspecialchars_decode($str, ENT_NOQUOTES); ? pthis - /p pthis - /p -- Edit this bug report at http://bugs.php.net/?id=33037edit=1
[PHP-DOC] #33157 [Opn-Ana]: Missing htmlspecialchars_decode
ID: 33157 Updated by: [EMAIL PROTECTED] Reported By: mjs15451 at hotmail dot com -Status: Open +Status: Analyzed -Bug Type: *General Issues +Bug Type: Livedocs problem Operating System: Linux 2.6.10 PHP Version: 5.0.4 New Comment: Documentation is wrong, this function is found in PHP 5.1 only Previous Comments: [2005-05-27 01:57:06] mjs15451 at hotmail dot com Description: htmlspecialchars_decode() is missing. Reproduce code: --- echo htmlspecialchars_decode(asdflt;gt;); Expected result: Should output: asdf Actual result: -- Fatal error: Call to undefined function htmlspecialchars_decode() I double checked my php version and I am definitely running php 5.0.4 and according to the docs this function should be available in PHP 5. http://us2.php.net/manual/en/function.htmlspecialchars-decode.php I did the usual configure, make, make install. ./configure --prefix=/usr/lib/php --with-apxs2=/usr/sbin/apxs2 --with-openssl --with-zlib --enable-dio --with-bz2 --enable-calendar --enable-bcmath --with-curl=/usr/include/curl --enable-exif --enable-filepro --enable-ftp --with-ttf --enable-mbstring --enable-zend-multibyte --without-mysql --with-mysqli=/usr/lib/mysql/bin/mysql_config --with-mysql-sock=/var/run/mysqld/mysql.sock --enable-sockets --enable-sqllite-utf8 --enable-wddx --with-gettext=/usr/lib/gettext --with-imagick=/usr --with-mcrypt --with-mhash --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-zlib-dir --with-libxml-dir make make install -- Edit this bug report at http://bugs.php.net/?id=33157edit=1
[PHP-DOC] #33158 [NEW]: mcrypt french documentation error
From: gkieffer at evolutive dot org Operating system: Any PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: mcrypt french documentation error Description: There's a slight mistake in the french translation of the 'mcrypt' introduction page. The english version can be found here: http://www.php.net/manual/en/ref.mcrypt.php The french version here: http://www.php.net/manual/fr/ref.mcrypt.php On that page there's an 'Installation' section. Here's the english version: Installation You need to compile PHP with the --with-mcrypt[=DIR] parameter to enable this extension. DIR is the mcrypt install directory. Make sure you compile libmcrypt with the option --disable-posix-threads. And here's the french version: Installation Vous devez compiler PHP avec l'option --with-mcrypt=[DIR] pour activer cette extension. DIR est le dossier d'installation de mcrypt. Assurez-vous de compiler libmcrypt sans l'option --disable-posix-threads. The problem lies in the last sentence regarding that compilation option. Basically the french translation says the exact opposite of the original text: Make sure you compile libmcrypt *without* the option --disable-posix-threads. Well so far I've heard that PHP is not guaranteed to be thread-safe so it sounds quite normal to me to compile modules/associated libs *without* any threads stuff. So compiling libmcrypt *with* that --disable-posix-threads option sounds right. Moreover I think the original english documentation has been reviewed more often than the french translation and an error in the english documentation would have aroused comments. Well. Considering that the original english documentation is right, the french translation should read: Installation Vous devez compiler PHP avec l'option --with-mcrypt=[DIR] pour activer cette extension. DIR est le dossier d'installation de mcrypt. Assurez-vous de compiler libmcrypt avec l'option --disable-posix-threads. -- Edit bug report at http://bugs.php.net/?id=33158edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33158r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33158r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33158r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=33158r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=33158r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33158r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33158r=needscript Try newer version: http://bugs.php.net/fix.php?id=33158r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33158r=support Expected behavior: http://bugs.php.net/fix.php?id=33158r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33158r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33158r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=33158r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33158r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=33158r=dst IIS Stability: http://bugs.php.net/fix.php?id=33158r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33158r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33158r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33158r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33158r=mysqlcfg