ID:               44438
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jakem at nittanytravel dot com
 Status:           Bogus
 Bug Type:         Strings related
 Operating System: windows
 PHP Version:      5.2.5
 New Comment:

http://snaps.php.net/
http://php.net/anoncvs.php


Previous Comments:
------------------------------------------------------------------------

[2008-03-17 21:58:32] jakem at nittanytravel dot com

I don't even see where I can download 5.3.0?

------------------------------------------------------------------------

[2008-03-15 09:49:30] [EMAIL PROTECTED]

Oh right, 5.3.0 is said at http://docs.php.net/strstr.
The docs.php.net is updated with more frequency.

------------------------------------------------------------------------

[2008-03-15 05:33:44] jakem at nittanytravel dot com

where does it say this was added in 5.3?
According to the function page on php.net

ChangeLog
Version Description 
6.0.0 Added the before_needle parameter.  
4.3.0 strstr() was made binary safe.  


Where is version 6?

------------------------------------------------------------------------

[2008-03-14 21:50:03] [EMAIL PROTECTED]

Says the documentation:
"5.3.0 Added the optional parameter before_needle"

This is valid for strstr and stristr.

------------------------------------------------------------------------

[2008-03-14 20:56:01] jakem at nittanytravel dot com

Description:
------------
Getting this:

Warning:  Wrong parameter count for stristr() in
C:\Inetpub\wwwroot\RCC\test.php on line 39

This line:

     if ($t1 = stristr($file, 'front', true))


Removing true allows function to work.



PHP Version 5.2.5 
System  Windows NT DESKTOP 5.1 build 2600  Build Date  Nov 8 2007
23:18:08  Configure Command  cscript /nologo configure.js
"--enable-snapshot-build" "--with-gd=shared"  Server API  ISAPI  Virtual
Directory Support  enabled  Configuration File (php.ini) Path 
C:\WINDOWS  Loaded Configuration File  C:\WINDOWS\php.ini  PHP API 
20041225  PHP Extension  20060613  Zend Extension  220060519  Debug
Build  no  Thread Safety  enabled  Zend Memory Manager  enabled  IPv6
Support  enabled  Registered PHP Streams  php, file, data, http, ftp,
compress.zlib  Registered Stream Socket Transports  tcp, udp  Registered
Stream Filters  convert.iconv.*, string.rot13, string.toupper,
string.tolower, string.strip_tags, convert.*, consumed, zlib.*  

Reproduce code:
---------------
$file = 'Vienna Front View.jpg';

     if ($t1 = stristr($file, 'front', true))

Expected result:
----------------
Vienna 

Actual result:
--------------
Warning:  Wrong parameter count for stristr() in
C:\Inetpub\wwwroot\RCC\test.php on line 39



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=44438&edit=1

Reply via email to