Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8170239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:05:37+00:00 2026-06-06T21:05:37+00:00

I have concerns about the safe use of the function str_replace . E.G. $var

  • 0

I have concerns about the safe use of the function str_replace.
E.G.

$var = "abcdeefghij";
$var = str_replace("ee", "", $var); // Should be "abcdfghij"

Is it possible to bypass (get “abcdeefghij” – with 2 ‘e’ letters) this by multibyte charset or null character for example?

EDIT:
I was thinking about something like this: abcd%6565fghij %6565 would be replaced by ee but str_replace wouldnt work because it is multibyte string (mb_str_replace).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:05:37+00:00Added an answer on June 6, 2026 at 9:05 pm

    Indeed, if ee does not occur in the string in exactly that way, which means in a compatible encoding and without additional invisible characters, it won’t match. As far as compatible encodings go, ee in your source code is likely ASCII, so any ASCII compatible encoding will do (incl. Latin-1, UTF-8 and most single-byte encodings). If there are other characters/bytes in-between, it’s obviously not the same string and won’t match. Other lookalike characters obviously won’t match either.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some concerns about the Integration of Magento with other CRM,ERP systems. How
Im building an app with a tab-layout. And i have some concerns about tab-layout
I have 2 questions concerns about using shared memory. I'm using CreateFileMapping to create
I love the flexibility of named branches but I have some concerns about the
Privacy concerns have lead me to believe I should scrub user uploaded images for
I have some concerns related to the fact of testing some functions containing the
We're building a multi-language Drupal stack and one of the concerns we have is
I have a couple of concerns, I'm busy building a normal .mobi site for
I think i have a pretty good idea about the volatile keyword in java,
my question concerns about Rails + HAML I would like to conditionally set a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.