Doc #65336 [NEW]: Function returns boolean, although documentation says it returns only strings

From: Date: Thu, 25 Jul 2013 16:20:05 +0000
Subject: Doc #65336 [NEW]: Function returns boolean, although documentation says it returns only strings
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10115@lists.php.net to get a copy of this message
From: maja dot privat at gmx dot at Operating system: Windows 7 PHP version: 5.4.17 Package: *General Issues Bug Type: Documentation Problem Bug description:Function returns boolean, although documentation says it returns only strings Description: ------------ This is the code-snipped: $limit = "5"; print_r( array(pg_escape_literal($limit) , gettype(pg_escape_literal($limit))) ); And it prints: [false,"boolean"] However, the documentation says, that "pg_escape_literal()" returns only strings. I'm not sure if it's a php-bug, or a documentation-error. Documentation-Page: http://www.php.net/manual/en/function.pg-escape-literal.php Test script: --------------- $limit = "5"; print_r( array(pg_escape_literal($limit) , gettype(pg_escape_literal($limit))) ); Expected result: ---------------- ["'5'","string"] Actual result: -------------- [false,"boolean"] -- Edit bug report at https://bugs.php.net/bug.php?id=65336&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65336&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65336&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65336&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65336&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65336&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65336&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65336&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65336&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=65336&r=support Expected behavior: https://bugs.php.net/fix.php?id=65336&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65336&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65336&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65336&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65336&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65336&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65336&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=65336&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65336&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65336&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65336&r=mysqlcfg

« previous php.doc.bugs (#10115) next »