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

  • SEARCH
  • Home
  • 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 8952899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:58:35+00:00 2026-06-15T13:58:35+00:00

Hi StackOverflow Community, Here is my question, how to convert php that has hex

  • 0

Hi StackOverflow Community,

Here is my question, how to convert php that has hex code into readable string ?
On what I mean is all inside this 2 php code..

<?php

echo "\x74\150\x69\163\x20\151\x73\40\x74\145\x73\164\x69\156\x67\40\x6f\156\x6c\171";

echo test['\x74\171\x70\145'];

echo range("\x61","\x7a");

?>

this is un-readable code, I need some php function that can convert those unreadable code into readable code..so it will become like this after convert..

<?php

echo "this is testing only";

echo test['type'];

echo range("a","z");

?>

I know i can just echo that hex to change it to readable string, but I have huge php file and lot’s of php file that same like this, so I need php function that can automatically convert them all into readable code.

Thank..

  • 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-15T13:58:36+00:00Added an answer on June 15, 2026 at 1:58 pm

    It seems your code is obfuscated not only with hex escape sequences, but with octal as well. I’ve written this function to decode it for you:

    function decode_code($code){
        return preg_replace_callback(
            "@\\\(x)?([0-9a-f]{2,3})@",
            function($m){
                return chr($m[1]?hexdec($m[2]):octdec($m[2]));
            },
            $code
        );
    }
    

    See it in action here: http://codepad.viper-7.com/NjiL84

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

Sidebar

Related Questions

This is a question that I know has been asked here and several other
Hello world of stackoverflow, nice to meet you all. My first question here is
Recently, the StackOverflow community helped me develop a fairly concise @memoize decorator that is
First, I just want to say that the stackoverflow community is empowering to say
Hello StackOverflow community, The air.swf file referenced here: http://livedocs.adobe.com/flex/3/html/help.html?content=distributing_apps_3.html used to launch AIR applications
this is my first question asked here at stackoverflow and am really looking forward
First of all excuse me for my english. This is my first question here.
NOTE: I have a related question here (http://stackoverflow.com/questions/6915055/are-jsf-views-shared-between-users) but that deals with a few
Hello StackOverflow Community, I hope you guys can help me with this here: On
I ran into a small problem and I'm sure that somebody from the stackoverflow

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.