Skip to content

Instantly share code, notes, and snippets.

@derickr
Created June 29, 2020 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save derickr/bf18830c4fbe8f9c84d3a3999412d267 to your computer and use it in GitHub Desktop.
Save derickr/bf18830c4fbe8f9c84d3a3999412d267 to your computer and use it in GitHub Desktop.
derick@singlemalt:~$ php -n -dzend_extension=opcache.so -dextension=vld.so -dvld.active=1 /tmp/fasdf.php
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 1, Position 2 = 2
Branch analysis from position: 1
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
filename: /tmp/fasdf.php
function name: (null)
number of ops: 3
compiled vars: none
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
2 0 E > > JMPZ <false>, ->2
4 1 > DECLARE_FUNCTION 'foo'
8 2 > > RETURN 1
branch: # 0; line: 2- 2; sop: 0; eop: 0; out0: 1; out1: 2
branch: # 1; line: 4- 8; sop: 1; eop: 1; out0: 2
branch: # 2; line: 8- 8; sop: 2; eop: 2; out0: -2
path #1: 0, 1, 2,
path #2: 0, 2,
Function %00foo%2Ftmp%2Ffasdf.php%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /tmp/fasdf.php
function name: foo
number of ops: 2
compiled vars: none
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
5 0 E > ECHO 'PHP+5'
6 1 > RETURN null
branch: # 0; line: 5- 6; sop: 0; eop: 1; out0: -2
path #1: 0,
End of function %00foo%2Ftmp%2Ffasdf.php%3A4%240
<?php
if ( PHP_MAJOR_VERSION == 5)
{
function foo () {
echo "PHP 5";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment