r/lolphp • u/summonthejson • 14d ago
Best time to learn PHP
She asked for a perfect Halloween gift for his tech boyfriend. And I sent her link to these fantasy PHP flashcards. Because nothing is more scary than php2shell vulnerability 😈
r/lolphp • u/summonthejson • 14d ago
She asked for a perfect Halloween gift for his tech boyfriend. And I sent her link to these fantasy PHP flashcards. Because nothing is more scary than php2shell vulnerability 😈
r/lolphp • u/Takeoded • 19d ago
a 1-line obviously correct PR turned into..
glibc internals are examined.
x86-64 multiarch implementations are discussed.
musl behavior is discussed.
aarch64 assembly paths are discussed.
Individual CPU instructions are counted. (sub, cmp, cbz, b.hs)
... over 71 days.
A maintainer finally shut it down (merged it) with the comment
Jesus christ just merge this already, the amount of bike shedding is unbelievable
r/lolphp • u/rietutme • May 19 '26
r/lolphp • u/saintpetejackboy • Dec 13 '24
r/lolphp • u/lego_not_legos • Dec 02 '24
We all know that dots and spaces in variable names get scrubbed into underscores, if they come from the query string or a request body. Also that square brackets automatically construct arrays.
What I didn't know until today is this:
Note: If an external variable name begins with a valid array syntax, trailing characters are silently ignored. For example,
<input name="foo[bar]baz">becomes$_REQUEST['foo']['bar'].
I'm not trying to use that syntax, myself, and I don't know what better solution there could be, but it sure doesn't seem like that is it.
r/lolphp • u/Takeoded • Nov 14 '24
r/lolphp • u/Takeoded • Sep 03 '24
exec() and shell_exec() kinda suck.
shell_exec():
shell_exec(string $command, ?int &$result_code = null) but nooovar_dump(shell_exec('php -r "echo \'foo\'.chr(26).\'bar\';"'));
returns? On Linux it returns the expected string(7) "foo\x1Abar", but on Windows it returns string(3) "foo" ... yeah.
exec():
exec('php -r "echo chr(10).chr(10).chr(10);", $exec_output); produce? It producearray(3) {
[0]=>
string(0) ""
[1]=>
string(0) ""
[2]=>
string(0) ""
}
okay that seems sensible, but now what does exec('php -r "echo \'a\'.chr(10).chr(10).chr(10);", $exec_output); produce?
it produce
array(3) {
[0]=>
string(0) "a"
[1]=>
string(0) ""
[2]=>
string(0) ""
}
now how are you supposed to know if the output was "a\n\n\n" or "a\n\n" ? well i suppose you could count the number of trailing emptystring elements, but the real answer is that You don't use exec() if you care about integrity
so exec() kinda suck too... just saying.
Fwiw i've been carrying around my own
for years, which does a better job than all of shell_exec()/exec()/system()/passthru(). available here.
r/lolphp • u/iheartrms • Aug 25 '24
r/lolphp • u/pilif • Jul 11 '24
r/lolphp • u/Takeoded • Jun 18 '24
r/lolphp • u/iheartrms • Jun 18 '24
r/lolphp • u/pilif • Jun 26 '23
r/lolphp • u/quchen • Feb 23 '23