vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   stripos() (https://vborg.vbsupport.ru/showthread.php?t=52868)

filburt1 05-12-2003 10:47 PM

stripos()
 
<a href="http://www.php.net/manual/en/function.stripos.php" target="_blank">http://www.php.net/manual/en/function.stripos.php</a>

Anybody know for sure in what version of PHP this function was introduced?

SiGmA_X 05-12-2003 10:56 PM

This won't be much help, but it doesn't work in the normal release of PHP4.3.1 with the following configures:
Quote:

'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--enable-magic-quotes' '--with-mysql=/usr' '--with-pear' '--enable-sockets' '--enable-track-vars' '--enable-versioning' '--with-zlib'
As PHP.net said, perhaps it is only in the CVS version?

filburt1 05-12-2003 10:58 PM

I guess. It's an extremely useful function though, I hope it comes out soon.

SiGmA_X 05-13-2003 11:51 PM

Sure sounds like it! If it's your own server, you could download the source from CVS and compile it.. Works well, normally :)

MUG 05-14-2003 12:08 AM

Wouldn't

strpos(strtolower($haystack), strtolower($needle))

work just as well?

filburt1 05-14-2003 12:09 AM

Yes but why do that when there's a function that does it internally (probably faster, too)?

Cyborg from DH 05-14-2003 01:57 PM

so just do a

PHP Code:

if (!function_exists('stripos'))
{
    function 
stripos($haystack$needle$int_offset=NULL)
    {
        return 
strpos(strtolower($haystack), strtolower($needle), $int_offset);
    }



filburt1 05-14-2003 02:48 PM

I solved the problem a while back and I'm doing something like that. I'm just saying a built-in PHP way will undoubtedly be faster.

SiGmA_X 05-14-2003 03:56 PM

So if you need the speed, re-compileing the CVS might be needed.. :)

filburt1 05-14-2003 04:14 PM

I can't recompile on shared servers, let alone other people's servers...


All times are GMT. The time now is 12:34 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01190 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete