Skip to content

Instantly share code, notes, and snippets.

@SOF3
Created January 4, 2018 05:34
Show Gist options
  • Save SOF3/ad2a76bf81118c947c393ecf8e13d849 to your computer and use it in GitHub Desktop.
Save SOF3/ad2a76bf81118c947c393ecf8e13d849 to your computer and use it in GitHub Desktop.
<?php
namespace{
function _isset(array $a){
isset($a);
}
function _isset_index(array $a){
isset($a[0]);
}
function _empty(array $a){
empty($a);
}
function _count(array $a){
count($a);
}
function _null_eq(array $a){
$a === null;
}
function _null_not_eq(array $a){
$a !== null;
}
}
namespace foo{
function _isset(array $a){
isset($a);
}
function _isset_index(array $a){
isset($a[0]);
}
function _empty(array $a){
empty($a);
}
function _count(array $a){
count($a);
}
function _null_eq(array $a){
$a === null;
}
function _null_not_eq(array $a){
$a !== null;
}
}
/c/sofe/test # php -d'extension=vld' -d'vld.active=1' -d'vld.execute=0' -f test.php >/dev/null
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename: C:\sofe\test\test.php
function name: (null)
number of ops: 13
compiled vars: none
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
3 0 E > NOP
6 1 NOP
9 2 NOP
12 3 NOP
15 4 NOP
18 5 NOP
23 6 NOP
26 7 NOP
29 8 NOP
32 9 NOP
35 10 NOP
38 11 NOP
42 12 > RETURN 1
Function _isset:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename: C:\sofe\test\test.php
function name: _isset
number of ops: 4
compiled vars: !0 = $a
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
3 0 E > RECV !0
4 1 <197> ~1 !0
2 FREE ~1
5 3 > RETURN null
End of function _isset
Function _isset_index:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename: C:\sofe\test\test.php
function name: _isset_index
number of ops: 4
compiled vars: !0 = $a
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
6 0 E > RECV !0
7 1 ISSET_ISEMPTY_DIM_OBJ 33554432 ~1 !0, 0
2 FREE ~1
8 3 > RETURN null
End of function _isset_index
Function _empty:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename: C:\sofe\test\test.php
function name: _empty
number of ops: 4
compiled vars: !0 = $a
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
9 0 E > RECV !0
10 1 <197> ~1 !0
2 FREE ~1
11 3 > RETURN null
End of function _empty
Function _count:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename: C:\sofe\test\test.php
function name: _count
number of ops: 4
compiled vars: !0 = $a
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
12 0 E > RECV !0
13 1 <190> ~1 !0
2 FREE ~1
14 3 > RETURN null
End of function _count
Function _null_eq:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename: C:\sofe\test\test.php
function name: _null_eq
number of ops: 4
compiled vars: !0 = $a
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
15 0 E > RECV !0
16 1 IS_IDENTICAL ~1 !0, null
2 FREE ~1
17 3 > RETURN null
End of function _null_eq
Function _null_not_eq:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename: C:\sofe\test\test.php
function name: _null_not_eq
number of ops: 4
compiled vars: !0 = $a
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
18 0 E > RECV !0
19 1 IS_NOT_IDENTICAL ~1 !0, null
2 FREE ~1
20 3 > RETURN null
End of function _null_not_eq
Function foo%5C_isset:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename: C:\sofe\test\test.php
function name: foo\_isset
number of ops: 4
compiled vars: !0 = $a
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
23 0 E > RECV !0
24 1 <197> ~1 !0
2 FREE ~1
25 3 > RETURN null
End of function foo%5C_isset
Function foo%5C_isset_index:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename: C:\sofe\test\test.php
function name: foo\_isset_index
number of ops: 4
compiled vars: !0 = $a
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
26 0 E > RECV !0
27 1 ISSET_ISEMPTY_DIM_OBJ 33554432 ~1 !0, 0
2 FREE ~1
28 3 > RETURN null
End of function foo%5C_isset_index
Function foo%5C_empty:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename: C:\sofe\test\test.php
function name: foo\_empty
number of ops: 4
compiled vars: !0 = $a
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
29 0 E > RECV !0
30 1 <197> ~1 !0
2 FREE ~1
31 3 > RETURN null
End of function foo%5C_empty
Function foo%5C_count:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename: C:\sofe\test\test.php
function name: foo\_count
number of ops: 5
compiled vars: !0 = $a
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
32 0 E > RECV !0
33 1 INIT_NS_FCALL_BY_NAME
2 SEND_VAR_EX !0
3 DO_FCALL 0
34 4 > RETURN null
End of function foo%5C_count
Function foo%5C_null_eq:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename: C:\sofe\test\test.php
function name: foo\_null_eq
number of ops: 4
compiled vars: !0 = $a
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
35 0 E > RECV !0
36 1 IS_IDENTICAL ~1 !0, null
2 FREE ~1
37 3 > RETURN null
End of function foo%5C_null_eq
Function foo%5C_null_not_eq:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename: C:\sofe\test\test.php
function name: foo\_null_not_eq
number of ops: 4
compiled vars: !0 = $a
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
38 0 E > RECV !0
39 1 IS_NOT_IDENTICAL ~1 !0, null
2 FREE ~1
40 3 > RETURN null
End of function foo%5C_null_not_eq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment