php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #27513 instanceof
Submitted: 2004-03-06 12:10 UTC Modified: 2004-03-06 13:21 UTC
From: asterisk at email dot it Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: linux 2.4.20 RH8
Private report: No CVE-ID: None
 [2004-03-06 12:10 UTC] asterisk at email dot it
Description:
------------
when is used 3rd parameter, the offset, the function produce a warning and don't return nothing

Reproduce code:
---------------
<?php
        // 01234567890123
$string = "test test test";
echo strrpos ( $string, 'e', 5);
?>

Expected result:
----------------
1

Actual result:
--------------
Warning: Wrong parameter count for strrpos() in C:\WWW\strrpos.php on line 4

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-06 12:55 UTC] scottmacvicar at ntlworld dot com
http://www.php.net/strrpos

Quote from that page
---
Note: As of PHP 5.0.0 offset may be specified to begin searching an arbitrary number of characters into the string. Negative values will stop searching at an arbitrary point prior to the end of the string. 
---

Your using PHP4 hence the error
 [2004-03-06 13:13 UTC] iliaa@php.net
The function strrpos() only supports the offset parameter 
in PHP5. 
 [2004-03-06 13:21 UTC] kennyt@php.net
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


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 05:01:30 2024 UTC