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 8613095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:47:17+00:00 2026-06-12T04:47:17+00:00

In a WordPress theme I have the following code, (including debug info): echo strlen($op);

  • 0

In a WordPress theme I have the following code, (including debug info):

 echo strlen($op);
 $s = strlen($op);
 echo($s);
 echo($op);
 error_log("strlen $s");

If I get to the page with www.someurl.com I see 2525stringwith25chars on the screen and strlen 25 in the log.

If I go to the page with www.someurl.com/?lang=es I see 00 on the screen and strlen 25 in the log. It appears the echo isn’t echoing the variable for the new locale.

  • 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-12T04:47:19+00:00Added an answer on June 12, 2026 at 4:47 am

    Turns out WP is passing through the code 3 times, the first time the results are correct and appear (or don’t) on the screen, but the 2nd and 3rd times the different results aren’t shown on the screen, only in the log, but so far up as to be invisible.

    Solved using microtime() print out before and after the echo and before and after the log entry it became clear the log entries weren’t reflecting the echos.

    As to why WP is passing through 3 times, with the 404 handler plugin installed, any unloadable image files (in the css for example) cause a 404 cause a redirect to the 404 error page.

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

Sidebar

Related Questions

this is function.php of a wordpress theme that NOD32 says this code have a
I have the following code. I am trying to prevent my page from resubmitting
I have added the following code to my functions.php script within my theme: function
I have the following code which I would like to implement in my Wordpress
I'm trying to implement the following guide to my custom wordpress theme http://tomsbigbox.com/wordpress-load-more-posts-on-page-scroll/ Unfortunately
The following code resides on a wordpress site. It is a donation landing page
I have the following code in header.php to echo the body's id: <body id=<?php
I have tried the following code in single.php file in wordpress. I used these
i have made a simple php contact form following this tutorial: http://www.catswhocode.com/blog/how-to-create-a-built-in-contact-form-for-your-wordpress-theme The big
I have a wordpress theme that has a build in shortcode for creating an

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.