StackOverflow Questions for Tag: strpos

Thread7
Thread7

Reputation: 1090

strpos() returning incorrect result when the needle string is an integer-type value

Score: 0

Views: 517

Answers: 1

Read More
DerekConlon
DerekConlon

Reputation: 463

Why is strpos('L', 'L') === true evaluating to false?

Score: 0

Views: 180

Answers: 2

Read More
user3617651
user3617651

Reputation: 41

Why doesn't "if (strpos('a', 'a')) {" indicate that a match is found?

Score: 0

Views: 50

Answers: 1

Read More
ch1st ch1st
ch1st ch1st

Reputation: 13

strpos() === true always returns false

Score: 1

Views: 924

Answers: 3

Read More
John Terters
John Terters

Reputation: 13

strpos() == false give unexpected result when needle string exists at start of haystack string

Score: 1

Views: 139

Answers: 3

Read More
Hello Lili
Hello Lili

Reputation: 1587

Unexpected results when using strpos() with multibyte strings

Score: 2

Views: 319

Answers: 2

Read More
pmcs management
pmcs management

Reputation: 45

strpos() == true doesn't reliably give the correct result

Score: 0

Views: 798

Answers: 2

Read More
John Doe
John Doe

Reputation: 143

strpos() !== true always evaluates as true

Score: 1

Views: 2214

Answers: 2

Read More
user1601513
user1601513

Reputation: 153

strpos() >0 doesn't match needle found at the start of the string

Score: 0

Views: 271

Answers: 1

Read More
Pieter
Pieter

Reputation: 32805

Loosely checking for a truthy response from strpos() gives the incorrect outcome when the needle is found at the start of the haystack

Score: 1

Views: 237

Answers: 1

Read More
Paul Sheldrake
Paul Sheldrake

Reputation: 7831

strpos() unexpectedly returns false when I try to search for an integer-type value

Score: 4

Views: 6928

Answers: 2

Read More
mrmuggles
mrmuggles

Reputation: 65

Comparing strpos() loosely with >=0 or == false does not always return the correct result

Score: 2

Views: 282

Answers: 2

Read More
Ceri Turner
Ceri Turner

Reputation: 946

How to make strpos() match case-insensitively

Score: 0

Views: 319

Answers: 2

Read More
DreamWave
DreamWave

Reputation: 1940

Loosely checking the return value from strpos() gives unintended result

Score: 6

Views: 8542

Answers: 3

Read More
user1788542
user1788542

Reputation:

strpos() == false evaluates incorrectly when match is at the start of the string

Score: 0

Views: 51

Answers: 2

Read More
Daniel
Daniel

Reputation: 315

Why does strictly comparing strpos() against true give the opposite intended result?

Score: 30

Views: 53397

Answers: 5

Read More
Zwen2012
Zwen2012

Reputation: 3498

Checking for a truthy return value from strpos() fails to find match at start of string

Score: 1

Views: 302

Answers: 4

Read More
I'll-Be-Back
I'll-Be-Back

Reputation: 10838

strpos() returns false when needle string contains an invisible / zero-width character

Score: 1

Views: 306

Answers: 3

Read More
bikey77
bikey77

Reputation: 6672

How to make strpos() only match whole numbers in a delimited string?

Score: 2

Views: 1649

Answers: 4

Read More
Nisbo
Nisbo

Reputation: 65

A truthy check on the return value of strpos() fails to find match at start of haystack string

Score: 0

Views: 165

Answers: 2

Read More
PreviousPage 2Next