Skip to content

Commit c8fff33

Browse files
committed
Add enphp bugs to README.
Class Method Call
1 parent dacb19d commit c8fff33

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,39 @@ class Bar extends Foo
6464
}
6565
```
6666

67-
This means `(parent::$GLOBALS)[GLOBAL_VAR_KEY][0x0]();` instead of what we expected `parent::($GLOBALS[GLOBAL_VAR_KEY][0x0])();`.
67+
This means `(parent::$GLOBALS)[GLOBAL_VAR_KEY][0x0]();` instead of what we expected `parent::{$GLOBALS[GLOBAL_VAR_KEY][0x0]}();`.
68+
69+
### Class Method Call
70+
71+
```php
72+
class Foo
73+
{
74+
public function bar()
75+
{
76+
echo 'bar';
77+
}
78+
79+
public function __construct()
80+
{
81+
$this->bar();
82+
}
83+
}
84+
```
85+
86+
The constructor will be encoded like this
87+
88+
```php
89+
class Foo
90+
{
91+
public function __construct()
92+
{
93+
$v0 = &$GLOBALS[GLOBAL_VAR_KEY];
94+
$this->$v0[0x0]();
95+
}
96+
}
97+
```
98+
99+
This means `($this->$v0)[0x0]()` instead of what we expected `$this->{$v0[0x0]}()`.
68100

69101
## License
70102

0 commit comments

Comments
 (0)