subreddit
stringclasses
7 values
author
stringlengths
3
20
id
stringlengths
5
7
content
stringlengths
67
30.4k
score
int64
0
140k
lolphp
devsnd
2o9ov1
<|sols|><|sot|>PHP Constants Containing Arrays?<|eot|><|sol|>https://stackoverflow.com/questions/1290318/php-constants-containing-arrays<|eol|><|eols|><|endoftext|>
47
lolphp
deadstone
cml29yu
<|sols|><|sot|>PHP Constants Containing Arrays?<|eot|><|sol|>https://stackoverflow.com/questions/1290318/php-constants-containing-arrays<|eol|><|sor|>"Serialize your array and then put it into the constant" "Just want to say I love this solution :)" PHP devs terrify me.<|eor|><|eols|><|endoftext|>
65
lolphp
allthediamonds
cmlc5p9
<|sols|><|sot|>PHP Constants Containing Arrays?<|eot|><|sol|>https://stackoverflow.com/questions/1290318/php-constants-containing-arrays<|eol|><|sor|>Let me remind you, on PHP, you can redefine constants. Yep, you read that right. http://3v4l.org/XrZNH<|eor|><|eols|><|endoftext|>
22
lolphp
expugnator3000
cml2ate
<|sols|><|sot|>PHP Constants Containing Arrays?<|eot|><|sol|>https://stackoverflow.com/questions/1290318/php-constants-containing-arrays<|eol|><|sor|>PHPs whole implementation of constants is ridiculous. Call a function and it potentially modifies all code below?<|eor|><|eols|><|endoftext|>
21
lolphp
foobar5678
cml5sjo
<|sols|><|sot|>PHP Constants Containing Arrays?<|eot|><|sol|>https://stackoverflow.com/questions/1290318/php-constants-containing-arrays<|eol|><|sor|>This was fixed. http://php.net/manual/en/language.constants.syntax.php > From PHP 5.6 onwards, it is also possible to define an array constant.<|eor|><|eols|><|endoftex...
19
lolphp
catcradle5
cmlz5ej
<|sols|><|sot|>PHP Constants Containing Arrays?<|eot|><|sol|>https://stackoverflow.com/questions/1290318/php-constants-containing-arrays<|eol|><|sor|>"Serialize your array and then put it into the constant" "Just want to say I love this solution :)" PHP devs terrify me.<|eor|><|sor|>I fucking hate php serialization an...
15
lolphp
expugnator3000
cmlhwul
<|sols|><|sot|>PHP Constants Containing Arrays?<|eot|><|sol|>https://stackoverflow.com/questions/1290318/php-constants-containing-arrays<|eol|><|sor|>Let me remind you, on PHP, you can redefine constants. Yep, you read that right. http://3v4l.org/XrZNH<|eor|><|sor|>Only works until all combinations of upper/lower cas...
12
lolphp
nikic
cml841f
<|sols|><|sot|>PHP Constants Containing Arrays?<|eot|><|sol|>https://stackoverflow.com/questions/1290318/php-constants-containing-arrays<|eol|><|sor|>This was fixed. http://php.net/manual/en/language.constants.syntax.php > From PHP 5.6 onwards, it is also possible to define an array constant.<|eor|><|sor|>Note that t...
10
lolphp
expugnator3000
cmnadbf
<|sols|><|sot|>PHP Constants Containing Arrays?<|eot|><|sol|>https://stackoverflow.com/questions/1290318/php-constants-containing-arrays<|eol|><|sor|>Let me remind you, on PHP, you can redefine constants. Yep, you read that right. http://3v4l.org/XrZNH<|eor|><|sor|>Only works until all combinations of upper/lower cas...
8
lolphp
edwardly
cmlpsav
<|sols|><|sot|>PHP Constants Containing Arrays?<|eot|><|sol|>https://stackoverflow.com/questions/1290318/php-constants-containing-arrays<|eol|><|sor|>Let me remind you, on PHP, you can redefine constants. Yep, you read that right. http://3v4l.org/XrZNH<|eor|><|sor|>That's not really redefining, just abusing case inse...
6
lolphp
allthediamonds
cmnab5b
<|sols|><|sot|>PHP Constants Containing Arrays?<|eot|><|sol|>https://stackoverflow.com/questions/1290318/php-constants-containing-arrays<|eol|><|sor|>Let me remind you, on PHP, you can redefine constants. Yep, you read that right. http://3v4l.org/XrZNH<|eor|><|sor|>Only works until all combinations of upper/lower cas...
6
lolphp
allthediamonds
cmpwajc
<|sols|><|sot|>PHP Constants Containing Arrays?<|eot|><|sol|>https://stackoverflow.com/questions/1290318/php-constants-containing-arrays<|eol|><|sor|>Let me remind you, on PHP, you can redefine constants. Yep, you read that right. http://3v4l.org/XrZNH<|eor|><|sor|>You can't redefine constants at all, it's just someo...
5
lolphp
vytah
2c281s
<|sols|><|sot|>Several major PHP extensions use PHP license, which formally cannot be applied to anything else but PHP itself<|eot|><|sol|>http://lwn.net/Articles/604630/<|eol|><|eols|><|endoftext|>
50
lolphp
tdammers
cjbakyr
<|sols|><|sot|>Several major PHP extensions use PHP license, which formally cannot be applied to anything else but PHP itself<|eot|><|sol|>http://lwn.net/Articles/604630/<|eol|><|sor|>2005 and still not resolved.. fucking lol > Any efforts by Debian to change that just makes the extension authors "consider us quite st...
28
lolphp
aleczapka
cjb96xm
<|sols|><|sot|>Several major PHP extensions use PHP license, which formally cannot be applied to anything else but PHP itself<|eot|><|sol|>http://lwn.net/Articles/604630/<|eol|><|sor|>2005 and still not resolved.. fucking lol > Any efforts by Debian to change that just makes the extension authors "consider us quite st...
21
lolphp
rcxdude
cjbbh3q
<|sols|><|sot|>Several major PHP extensions use PHP license, which formally cannot be applied to anything else but PHP itself<|eot|><|sol|>http://lwn.net/Articles/604630/<|eol|><|sor|>2005 and still not resolved.. fucking lol > Any efforts by Debian to change that just makes the extension authors "consider us quite st...
20
lolphp
tdammers
cjbbzi5
<|sols|><|sot|>Several major PHP extensions use PHP license, which formally cannot be applied to anything else but PHP itself<|eot|><|sol|>http://lwn.net/Articles/604630/<|eol|><|sor|>2005 and still not resolved.. fucking lol > Any efforts by Debian to change that just makes the extension authors "consider us quite st...
15
lolphp
mort96
cjbuczq
<|sols|><|sot|>Several major PHP extensions use PHP license, which formally cannot be applied to anything else but PHP itself<|eot|><|sol|>http://lwn.net/Articles/604630/<|eol|><|sor|>It could be worse, they could all use GPL licence.<|eor|><|sor|>Why would that be worse? If were using GPL, it could've been used for op...
12
lolphp
vytah
cjb6bz7
<|sols|><|sot|>Several major PHP extensions use PHP license, which formally cannot be applied to anything else but PHP itself<|eot|><|sol|>http://lwn.net/Articles/604630/<|eol|><|soopr|>Example from ImageMagick extension: https://github.com/mkoppanen/imagick/blob/master/LICENSE<|eoopr|><|eols|><|endoftext|>
9
lolphp
redalastor
cjbjgby
<|sols|><|sot|>Several major PHP extensions use PHP license, which formally cannot be applied to anything else but PHP itself<|eot|><|sol|>http://lwn.net/Articles/604630/<|eol|><|sor|>2005 and still not resolved.. fucking lol > Any efforts by Debian to change that just makes the extension authors "consider us quite st...
9
lolphp
gu3st12
cjbasav
<|sols|><|sot|>Several major PHP extensions use PHP license, which formally cannot be applied to anything else but PHP itself<|eot|><|sol|>http://lwn.net/Articles/604630/<|eol|><|sor|>2005 and still not resolved.. fucking lol > Any efforts by Debian to change that just makes the extension authors "consider us quite st...
8
lolphp
aleczapka
cjbecca
<|sols|><|sot|>Several major PHP extensions use PHP license, which formally cannot be applied to anything else but PHP itself<|eot|><|sol|>http://lwn.net/Articles/604630/<|eol|><|sor|>2005 and still not resolved.. fucking lol > Any efforts by Debian to change that just makes the extension authors "consider us quite st...
7
lolphp
mort96
cjc8y5h
<|sols|><|sot|>Several major PHP extensions use PHP license, which formally cannot be applied to anything else but PHP itself<|eot|><|sol|>http://lwn.net/Articles/604630/<|eol|><|sor|>It could be worse, they could all use GPL licence.<|eor|><|sor|>Why would that be worse? If were using GPL, it could've been used for op...
5
lolphp
abadidea
1pkag5
<|sols|><|sot|>You asked for it - new content. A review of PHP 2.0!<|eot|><|sol|>http://phpmanualmasterpieces.tumblr.com/post/65544023819/php-2-0-a-review-in-retrospect<|eol|><|eols|><|endoftext|>
46
lolphp
mayobutter
cd3ald6
<|sols|><|sot|>You asked for it - new content. A review of PHP 2.0!<|eot|><|sol|>http://phpmanualmasterpieces.tumblr.com/post/65544023819/php-2-0-a-review-in-retrospect<|eol|><|sor|>Part of understanding PHP's quirks is realizing where it has come from. Web development was very different back in 1997 (I was there). Bac...
9
lolphp
Sarcastinator
cd3ksl5
<|sols|><|sot|>You asked for it - new content. A review of PHP 2.0!<|eot|><|sol|>http://phpmanualmasterpieces.tumblr.com/post/65544023819/php-2-0-a-review-in-retrospect<|eol|><|sor|>>> Each PHP instruction starts with `<?` and ends with a `>`. > > Im curious why this later changed, since this isnt necessarily _bad_ per...
8
lolphp
skeeto
cd3atrh
<|sols|><|sot|>You asked for it - new content. A review of PHP 2.0!<|eot|><|sol|>http://phpmanualmasterpieces.tumblr.com/post/65544023819/php-2-0-a-review-in-retrospect<|eol|><|sor|>It always annoys me how badly PHP misidentifies language concepts. I see from the article the misuse of the word "variable" goes all the w...
7
lolphp
cfreak2399
cd3mq8f
<|sols|><|sot|>You asked for it - new content. A review of PHP 2.0!<|eot|><|sol|>http://phpmanualmasterpieces.tumblr.com/post/65544023819/php-2-0-a-review-in-retrospect<|eol|><|sor|>Part of understanding PHP's quirks is realizing where it has come from. Web development was very different back in 1997 (I was there). Bac...
6
lolphp
ealf
16yu8e
<|soss|><|sot|>get_class($foo->member) returns the name of the calling class if member is NULL<|eot|><|sost|> <?php class Box { function getContentType() { return get_class($this->content); } } class Foo { } $x = new Box(); $x->content = new Foo(); echo $x->getContent...
45
lolphp
becauseofreasons
ji0qp0
<|soss|><|sot|>"Argument must be an instance of boolean, boolean given."<|eot|><|sost|>I ended up shoveling piles of PHP a few days ago. I'm not (particularly) new to the language, but I avoid it asmuch as possible. Has there been any kind of explanation for why PHP's static and runtime type systems have two different...
44
lolphp
Perdouille
ga59sa0
<|soss|><|sot|>"Argument must be an instance of boolean, boolean given."<|eot|><|sost|>I ended up shoveling piles of PHP a few days ago. I'm not (particularly) new to the language, but I avoid it asmuch as possible. Has there been any kind of explanation for why PHP's static and runtime type systems have two different...
17
lolphp
CarnivorousSociety
ga46ea8
<|soss|><|sot|>"Argument must be an instance of boolean, boolean given."<|eot|><|sost|>I ended up shoveling piles of PHP a few days ago. I'm not (particularly) new to the language, but I avoid it asmuch as possible. Has there been any kind of explanation for why PHP's static and runtime type systems have two different...
9
lolphp
bkdotcom
ga4jf62
<|soss|><|sot|>"Argument must be an instance of boolean, boolean given."<|eot|><|sost|>I ended up shoveling piles of PHP a few days ago. I'm not (particularly) new to the language, but I avoid it asmuch as possible. Has there been any kind of explanation for why PHP's static and runtime type systems have two different...
9
lolphp
Perdouille
ga5m0ep
<|soss|><|sot|>"Argument must be an instance of boolean, boolean given."<|eot|><|sost|>I ended up shoveling piles of PHP a few days ago. I'm not (particularly) new to the language, but I avoid it asmuch as possible. Has there been any kind of explanation for why PHP's static and runtime type systems have two different...
9
lolphp
becauseofreasons
ga5so1m
<|soss|><|sot|>"Argument must be an instance of boolean, boolean given."<|eot|><|sost|>I ended up shoveling piles of PHP a few days ago. I'm not (particularly) new to the language, but I avoid it asmuch as possible. Has there been any kind of explanation for why PHP's static and runtime type systems have two different...
7
lolphp
Flerex
ga5am24
<|soss|><|sot|>"Argument must be an instance of boolean, boolean given."<|eot|><|sost|>I ended up shoveling piles of PHP a few days ago. I'm not (particularly) new to the language, but I avoid it asmuch as possible. Has there been any kind of explanation for why PHP's static and runtime type systems have two different...
5
lolphp
Takeoded
e7ud7r
<|sols|><|sot|>dl( ) default directory is... hardcoded to "C:\php5\"<|eot|><|sol|>https://www.php.net/manual/en/function.dl.php<|eol|><|eols|><|endoftext|>
42
lolphp
Takeoded
fa5kush
<|sols|><|sot|>dl( ) default directory is... hardcoded to "C:\php5\"<|eot|><|sol|>https://www.php.net/manual/en/function.dl.php<|eol|><|soopr|>running php7 instead of php5? doesn't matter, we're checking "C:\\php5\\" running php on the D:\\ drive instead of the C:\\ drive? doesn't matter, we're checking "C:\\php5\\" ...
21
lolphp
Altreus
fa5lrik
<|sols|><|sot|>dl( ) default directory is... hardcoded to "C:\php5\"<|eot|><|sol|>https://www.php.net/manual/en/function.dl.php<|eol|><|soopr|>running php7 instead of php5? doesn't matter, we're checking "C:\\php5\\" running php on the D:\\ drive instead of the C:\\ drive? doesn't matter, we're checking "C:\\php5\\" ...
18
lolphp
BufferUnderpants
fa5w0a7
<|sols|><|sot|>dl( ) default directory is... hardcoded to "C:\php5\"<|eot|><|sol|>https://www.php.net/manual/en/function.dl.php<|eol|><|soopr|>running php7 instead of php5? doesn't matter, we're checking "C:\\php5\\" running php on the D:\\ drive instead of the C:\\ drive? doesn't matter, we're checking "C:\\php5\\" ...
14
lolphp
Miserable_Fuck
fa7t7r8
<|sols|><|sot|>dl( ) default directory is... hardcoded to "C:\php5\"<|eot|><|sol|>https://www.php.net/manual/en/function.dl.php<|eol|><|sor|>> The directory where the extension is loaded from depends on your platform: > >Windows - If not explicitly set in the php.ini, the extension is loaded from C:\php5\ by default. ...
13
lolphp
mrexodia
fa5ox4k
<|sols|><|sot|>dl( ) default directory is... hardcoded to "C:\php5\"<|eot|><|sol|>https://www.php.net/manual/en/function.dl.php<|eol|><|soopr|>running php7 instead of php5? doesn't matter, we're checking "C:\\php5\\" running php on the D:\\ drive instead of the C:\\ drive? doesn't matter, we're checking "C:\\php5\\" ...
10
lolphp
nsfwIvan
fa9qf6k
<|sols|><|sot|>dl( ) default directory is... hardcoded to "C:\php5\"<|eot|><|sol|>https://www.php.net/manual/en/function.dl.php<|eol|><|sor|>> The directory where the extension is loaded from depends on your platform: > >Windows - If not explicitly set in the php.ini, the extension is loaded from C:\php5\ by default. ...
8
lolphp
SaltineAmerican_1970
fa6oxc6
<|sols|><|sot|>dl( ) default directory is... hardcoded to "C:\php5\"<|eot|><|sol|>https://www.php.net/manual/en/function.dl.php<|eol|><|sor|>> The directory where the extension is loaded from depends on your platform: > >Windows - If not explicitly set in the php.ini, the extension is loaded from C:\php5\ by default. ...
7
lolphp
Takeoded
fa5mvs8
<|sols|><|sot|>dl( ) default directory is... hardcoded to "C:\php5\"<|eot|><|sol|>https://www.php.net/manual/en/function.dl.php<|eol|><|soopr|>running php7 instead of php5? doesn't matter, we're checking "C:\\php5\\" running php on the D:\\ drive instead of the C:\\ drive? doesn't matter, we're checking "C:\\php5\\" ...
7
lolphp
nsfwIvan
fadb284
<|sols|><|sot|>dl( ) default directory is... hardcoded to "C:\php5\"<|eot|><|sol|>https://www.php.net/manual/en/function.dl.php<|eol|><|sor|>> The directory where the extension is loaded from depends on your platform: > >Windows - If not explicitly set in the php.ini, the extension is loaded from C:\php5\ by default. ...
6
lolphp
Aqiad
fa8bcga
<|sols|><|sot|>dl( ) default directory is... hardcoded to "C:\php5\"<|eot|><|sol|>https://www.php.net/manual/en/function.dl.php<|eol|><|soopr|>running php7 instead of php5? doesn't matter, we're checking "C:\\php5\\" running php on the D:\\ drive instead of the C:\\ drive? doesn't matter, we're checking "C:\\php5\\" ...
5
lolphp
eMZi0767
fa9epjz
<|sols|><|sot|>dl( ) default directory is... hardcoded to "C:\php5\"<|eot|><|sol|>https://www.php.net/manual/en/function.dl.php<|eol|><|sor|>> The directory where the extension is loaded from depends on your platform: > >Windows - If not explicitly set in the php.ini, the extension is loaded from C:\php5\ by default. ...
5
lolphp
pingpong
8msh8r
<|sols|><|sot|>Compute exponents easily with this one weird trick!<|eot|><|sol|>https://3v4l.org/QdXOv<|eol|><|eols|><|endoftext|>
45
lolphp
pingpong
dzpzfh9
<|sols|><|sot|>Compute exponents easily with this one weird trick!<|eot|><|sol|>https://3v4l.org/QdXOv<|eol|><|soopr|>If you're computing 2^n, you need *n + 1* dollar signs.<|eoopr|><|eols|><|endoftext|>
21
lolphp
pingpong
dzq0wxd
<|sols|><|sot|>Compute exponents easily with this one weird trick!<|eot|><|sol|>https://3v4l.org/QdXOv<|eol|><|sor|>That's... quite something. How does it work?<|eor|><|soopr|>I realized after I posted this that it could be [simplified somewhat](https://3v4l.org/ZGVbt), so I'll talk about this one instead of what I or...
20
lolphp
creativeMan
dzq02ho
<|sols|><|sot|>Compute exponents easily with this one weird trick!<|eot|><|sol|>https://3v4l.org/QdXOv<|eol|><|sor|>That's... quite something. How does it work?<|eor|><|sor|>Don't you mean *why* does it work?<|eor|><|eols|><|endoftext|>
14
lolphp
pingpong
dzq1ypn
<|sols|><|sot|>Compute exponents easily with this one weird trick!<|eot|><|sol|>https://3v4l.org/QdXOv<|eol|><|sor|>a) wtf is this b) how do you even find something like this<|eor|><|soopr|>>a) wtf is this Computing 2^1000 with variable variables, explanation [here](https://www.reddit.com/r/lolphp/comments/8msh8r/com...
12
lolphp
fell_ratio
dzpzv3u
<|sols|><|sot|>Compute exponents easily with this one weird trick!<|eot|><|sol|>https://3v4l.org/QdXOv<|eol|><|sor|>That's... quite something. How does it work?<|eor|><|eols|><|endoftext|>
11
lolphp
Xymanek
dzq11zh
<|sols|><|sot|>Compute exponents easily with this one weird trick!<|eot|><|sol|>https://3v4l.org/QdXOv<|eol|><|sor|>a) wtf is this b) how do you even find something like this<|eor|><|eols|><|endoftext|>
10
lolphp
masklinn
e0bwsgx
<|sols|><|sot|>Compute exponents easily with this one weird trick!<|eot|><|sol|>https://3v4l.org/QdXOv<|eol|><|sor|>That's... quite something. How does it work?<|eor|><|soopr|>I realized after I posted this that it could be [simplified somewhat](https://3v4l.org/ZGVbt), so I'll talk about this one instead of what I or...
8
lolphp
Dr_Legacy
dzqdxly
<|sols|><|sot|>Compute exponents easily with this one weird trick!<|eot|><|sol|>https://3v4l.org/QdXOv<|eol|><|sor|>That's... quite something. How does it work?<|eor|><|sor|>Don't you mean *why* does it work?<|eor|><|sor|>Don't you mean why *should* it work?<|eor|><|eols|><|endoftext|>
7
lolphp
pilif
4u3fa9
<|sols|><|sot|>Fun with the realpath cache. Apparently touch('/tmp/file') is different from touch('file:///tmp/file')<|eot|><|sol|>https://3v4l.org/0VQIo<|eol|><|eols|><|endoftext|>
45
lolphp
pilif
d5ms7jj
<|sols|><|sot|>Fun with the realpath cache. Apparently touch('/tmp/file') is different from touch('file:///tmp/file')<|eot|><|sol|>https://3v4l.org/0VQIo<|eol|><|sor|>That's fascinating. So `file://` is a separate code path from unmarked path access? I bet there's a ton of edge cases like this, then.<|eor|><|soopr|>fi...
16
lolphp
the_alias_of_andrea
d5moti7
<|sols|><|sot|>Fun with the realpath cache. Apparently touch('/tmp/file') is different from touch('file:///tmp/file')<|eot|><|sol|>https://3v4l.org/0VQIo<|eol|><|sor|>That's fascinating. So `file://` is a separate code path from unmarked path access? I bet there's a ton of edge cases like this, then.<|eor|><|eols|><|e...
13
lolphp
pilif
d5ms88p
<|sols|><|sot|>Fun with the realpath cache. Apparently touch('/tmp/file') is different from touch('file:///tmp/file')<|eot|><|sol|>https://3v4l.org/0VQIo<|eol|><|sor|>How did you come across this?<|eor|><|soopr|>Ran into this while writing a unit test that was checking the mtime of a file. <|eoopr|><|eols|><|endoftext|...
10
lolphp
adbmal
d5mpfb7
<|sols|><|sot|>Fun with the realpath cache. Apparently touch('/tmp/file') is different from touch('file:///tmp/file')<|eot|><|sol|>https://3v4l.org/0VQIo<|eol|><|sor|>How did you come across this?<|eor|><|eols|><|endoftext|>
9
lolphp
cbraga
39h72j
<|sols|><|sot|>So it's 2015 and there's still a tenfold performance improvement to be unlocked from PHP by using compiled bytecode which this guy did by basically creating a php/python converter.<|eot|><|sol|>http://hippyvm.com/<|eol|><|eols|><|endoftext|>
45
lolphp
masklinn
cs47qjl
<|sols|><|sot|>So it's 2015 and there's still a tenfold performance improvement to be unlocked from PHP by using compiled bytecode which this guy did by basically creating a php/python converter.<|eot|><|sol|>http://hippyvm.com/<|eol|><|sor|>Hippy is *not* a "php to python converter", it's a PHP VM built with the same ...
29
lolphp
epsy
cs3fk1t
<|sols|><|sot|>So it's 2015 and there's still a tenfold performance improvement to be unlocked from PHP by using compiled bytecode which this guy did by basically creating a php/python converter.<|eot|><|sol|>http://hippyvm.com/<|eol|><|sor|>PHP 7 has a JIT compiler and a improved lexer/parser which brings huge speed i...
20
lolphp
bart2019
cs3grem
<|sols|><|sot|>So it's 2015 and there's still a tenfold performance improvement to be unlocked from PHP by using compiled bytecode which this guy did by basically creating a php/python converter.<|eot|><|sol|>http://hippyvm.com/<|eol|><|sor|>>At present it does not include a reasonable web server integration, so it's n...
19
lolphp
gu3st12
cs3c79x
<|sols|><|sot|>So it's 2015 and there's still a tenfold performance improvement to be unlocked from PHP by using compiled bytecode which this guy did by basically creating a php/python converter.<|eot|><|sol|>http://hippyvm.com/<|eol|><|sor|>PHP 7 has a JIT compiler and a improved lexer/parser which brings huge speed i...
19
lolphp
vytah
cs3ri4f
<|sols|><|sot|>So it's 2015 and there's still a tenfold performance improvement to be unlocked from PHP by using compiled bytecode which this guy did by basically creating a php/python converter.<|eot|><|sol|>http://hippyvm.com/<|eol|><|sor|>PHP 7 has a JIT compiler and a improved lexer/parser which brings huge speed i...
19
lolphp
nikic
cs4jj3j
<|sols|><|sot|>So it's 2015 and there's still a tenfold performance improvement to be unlocked from PHP by using compiled bytecode which this guy did by basically creating a php/python converter.<|eot|><|sol|>http://hippyvm.com/<|eol|><|sor|>For those not familiar with language development, it is trivial to get C level...
9
lolphp
nikic
cs4jd8f
<|sols|><|sot|>So it's 2015 and there's still a tenfold performance improvement to be unlocked from PHP by using compiled bytecode which this guy did by basically creating a php/python converter.<|eot|><|sol|>http://hippyvm.com/<|eol|><|sor|>PHP 7 has a JIT compiler and a improved lexer/parser which brings huge speed i...
9
lolphp
nikic
cs73ddy
<|sols|><|sot|>So it's 2015 and there's still a tenfold performance improvement to be unlocked from PHP by using compiled bytecode which this guy did by basically creating a php/python converter.<|eot|><|sol|>http://hippyvm.com/<|eol|><|sor|>For those not familiar with language development, it is trivial to get C level...
9
lolphp
Laugarhraun
2et0rb
<|sols|><|sot|>In 2008, I bought a "PHP 6" book. Six years later, PHP version is 5.5<|eot|><|sol|>http://modeling-languages.com/2008-bought-book-titled-php-6-six-years-later-php-version-5-5/<|eol|><|eols|><|endoftext|>
46
lolphp
hex_m_hell
ck2wpuz
<|sols|><|sot|>In 2008, I bought a "PHP 6" book. Six years later, PHP version is 5.5<|eot|><|sol|>http://modeling-languages.com/2008-bought-book-titled-php-6-six-years-later-php-version-5-5/<|eol|><|sor|>PHP 6 was a failed experiment. Get over it.<|eor|><|sor|>>PHP was a failed experiment. Get over it. <|eor|><|eols|>...
33
lolphp
bart2019
ck2on6f
<|sols|><|sot|>In 2008, I bought a "PHP 6" book. Six years later, PHP version is 5.5<|eot|><|sol|>http://modeling-languages.com/2008-bought-book-titled-php-6-six-years-later-php-version-5-5/<|eol|><|sor|>PHP 6 was a failed experiment. Get over it.<|eor|><|eols|><|endoftext|>
16
lolphp
softmodeling
ck2zog2
<|sols|><|sot|>In 2008, I bought a "PHP 6" book. Six years later, PHP version is 5.5<|eot|><|sol|>http://modeling-languages.com/2008-bought-book-titled-php-6-six-years-later-php-version-5-5/<|eol|><|sor|>[I think you mean 5.6.](http://php.net/archive/2014.php#id2014-08-28-1)<|eor|><|sor|>The post was written yesterday ...
7
lolphp
ealf
xzjg3
<|sols|><|sot|>PHP can't decode JSON. _ takes a flag to choose one of two embedding schemes. One silently turns empty objects into empty lists, the other replaces "" with "_empty_".<|eot|><|sol|>http://codepad.org/Rh3tAKnZ<|eol|><|eols|><|endoftext|>
45
lolphp
Pat55word
c5qyuks
<|sols|><|sot|>PHP can't decode JSON. _ takes a flag to choose one of two embedding schemes. One silently turns empty objects into empty lists, the other replaces "" with "_empty_".<|eot|><|sol|>http://codepad.org/Rh3tAKnZ<|eol|><|sor|>Try $d = json_encode(json_decode($a, maybe)); which merges b and c.<|eor|><|eols|><|...
8
lolphp
Altreus
c5rb113
<|sols|><|sot|>PHP can't decode JSON. _ takes a flag to choose one of two embedding schemes. One silently turns empty objects into empty lists, the other replaces "" with "_empty_".<|eot|><|sol|>http://codepad.org/Rh3tAKnZ<|eol|><|sor|>This is why arrays and hashes are different things, kids - you can't tell which you ...
6
lolphp
ZorbaTHut
c5rfxee
<|sols|><|sot|>PHP can't decode JSON. _ takes a flag to choose one of two embedding schemes. One silently turns empty objects into empty lists, the other replaces "" with "_empty_".<|eot|><|sol|>http://codepad.org/Rh3tAKnZ<|eol|><|sor|>Try $d = json_encode(json_decode($a, maybe)); which merges b and c.<|eor|><|sor|>Oth...
5
lolphp
shitcanz
pk534b
<|sols|><|sot|>SQL injection still going strong in 2021<|eot|><|sol|>https://wiki.php.net/rfc/is_literal<|eol|><|eols|><|endoftext|>
42
lolphp
Targren
hc16dpv
<|sols|><|sot|>SQL injection still going strong in 2021<|eot|><|sol|>https://wiki.php.net/rfc/is_literal<|eol|><|sor|>An RFC still using real_escape_string instead of parametric binding is the real LOL.<|eor|><|eols|><|endoftext|>
29
lolphp
JiminP
hc1aiyy
<|sols|><|sot|>SQL injection still going strong in 2021<|eot|><|sol|>https://wiki.php.net/rfc/is_literal<|eol|><|sor|>Thank god the RFC's been rejected.<|eor|><|eols|><|endoftext|>
19
lolphp
Takeoded
he2gpi9
<|sols|><|sot|>SQL injection still going strong in 2021<|eot|><|sol|>https://wiki.php.net/rfc/is_literal<|eol|><|sor|>in b4 <?php /* make a any string pass is_literal, for libraries that require you to use literals.. */ function make_string_literal(string $str):string{ $f=tmpfile(); ...
12
lolphp
colshrapnel
hc1dfgv
<|sols|><|sot|>SQL injection still going strong in 2021<|eot|><|sol|>https://wiki.php.net/rfc/is_literal<|eol|><|sor|>All thanks to horrible tutorials that flooded the Net.<|eor|><|eols|><|endoftext|>
10
lolphp
SanityInAnarchy
hlrj7cy
<|sols|><|sot|>SQL injection still going strong in 2021<|eot|><|sol|>https://wiki.php.net/rfc/is_literal<|eol|><|sor|>This feature is very useful for correctness and safety; I guess I shouldn't be surprised PHP rejected it. (I remember doing this in Java (with the obvious ugly hack) in 2005, and it was so useful I eve...
5
lolphp
Takeoded
hv9vwq
<|sols|><|sot|>echo true; prints 1, echo false; prints nothing, because if it printed 0, it would be consistent.<|eot|><|sol|>https://3v4l.org/aPZ9B<|eol|><|eols|><|endoftext|>
43
lolphp
y0y
fyueswx
<|sols|><|sot|>echo true; prints 1, echo false; prints nothing, because if it printed 0, it would be consistent.<|eot|><|sol|>https://3v4l.org/aPZ9B<|eol|><|sor|>PHP is the clusterfuck of programming languages<|eor|><|sor|>Have you heard of the language brainfuck? <|eor|><|sor|>Brainfuck is perfectly consistent.<|eor|>...
13
lolphp
duskwuff
fysp03w
<|sols|><|sot|>echo true; prints 1, echo false; prints nothing, because if it printed 0, it would be consistent.<|eot|><|sol|>https://3v4l.org/aPZ9B<|eol|><|sor|>Here's a clearer demonstration of what's going on: https://3v4l.org/ZLHTZ Both `""` and `"0"` cast back to boolean false, so I'm ambivalent on this one. (I'...
11
lolphp
tobb10001
fytf1pt
<|sols|><|sot|>echo true; prints 1, echo false; prints nothing, because if it printed 0, it would be consistent.<|eot|><|sol|>https://3v4l.org/aPZ9B<|eol|><|sor|>This pisses me off every time I try to output something to debug. That's why I've switched to `echo ($var) ? 'true' : 'false';` Thinking about it `var_dump(...
7
lolphp
smegnose
fytze30
<|sols|><|sot|>echo true; prints 1, echo false; prints nothing, because if it printed 0, it would be consistent.<|eot|><|sol|>https://3v4l.org/aPZ9B<|eol|><|sor|>This pisses me off every time I try to output something to debug. That's why I've switched to `echo ($var) ? 'true' : 'false';` Thinking about it `var_dump(...
5
lolphp
postmodest
fyx8yrq
<|sols|><|sot|>echo true; prints 1, echo false; prints nothing, because if it printed 0, it would be consistent.<|eot|><|sol|>https://3v4l.org/aPZ9B<|eol|><|sor|>This pisses me off every time I try to output something to debug. That's why I've switched to `echo ($var) ? 'true' : 'false';` Thinking about it `var_dump(...
5
lolphp
Takeoded
fgkt6r
<|sols|><|sot|>Array is higher than infinity<|eot|><|sol|>https://3v4l.org/iONLA<|eol|><|eols|><|endoftext|>
44
lolphp
tending
fk6a4jo
<|sols|><|sot|>Array is higher than infinity<|eot|><|sol|>https://3v4l.org/iONLA<|eol|><|sor|>https://www.php.net/manual/en/language.operators.comparison.php Comparison with Various Types Type of Operand 1| Type of Operand 2| Result ---|---|---- null or string| string| Convert NULL to "", numerical or lexical compari...
28
lolphp
Takeoded
fk6tuh0
<|sols|><|sot|>Array is higher than infinity<|eot|><|sol|>https://3v4l.org/iONLA<|eol|><|sor|>https://www.php.net/manual/en/language.operators.comparison.php Comparison with Various Types Type of Operand 1| Type of Operand 2| Result ---|---|---- null or string| string| Convert NULL to "", numerical or lexical compari...
17
lolphp
tending
fk6bdts
<|sols|><|sot|>Array is higher than infinity<|eot|><|sol|>https://3v4l.org/iONLA<|eol|><|sor|>https://www.php.net/manual/en/language.operators.comparison.php Comparison with Various Types Type of Operand 1| Type of Operand 2| Result ---|---|---- null or string| string| Convert NULL to "", numerical or lexical compari...
14
lolphp
CarnivorousSociety
fk5z3rh
<|sols|><|sot|>Array is higher than infinity<|eot|><|sol|>https://3v4l.org/iONLA<|eol|><|sor|>https://www.php.net/manual/en/language.operators.comparison.php Comparison with Various Types Type of Operand 1| Type of Operand 2| Result ---|---|---- null or string| string| Convert NULL to "", numerical or lexical compari...
11
lolphp
slifin
fk5hddx
<|sols|><|sot|>Array is higher than infinity<|eot|><|sol|>https://3v4l.org/iONLA<|eol|><|sor|>This can be simplified to [https://3v4l.org/4abDY](https://3v4l.org/4abDY) I was looking at this the other day, if anyone can explain how PHP compares arrays I'd be very interested, i.e. what does PHP do internally with this k...
10
lolphp
ZorbaTHut
fk7hoqf
<|sols|><|sot|>Array is higher than infinity<|eot|><|sol|>https://3v4l.org/iONLA<|eol|><|sor|>https://www.php.net/manual/en/language.operators.comparison.php Comparison with Various Types Type of Operand 1| Type of Operand 2| Result ---|---|---- null or string| string| Convert NULL to "", numerical or lexical compari...
7
lolphp
tending
fk73hrv
<|sols|><|sot|>Array is higher than infinity<|eot|><|sol|>https://3v4l.org/iONLA<|eol|><|sor|>https://www.php.net/manual/en/language.operators.comparison.php Comparison with Various Types Type of Operand 1| Type of Operand 2| Result ---|---|---- null or string| string| Convert NULL to "", numerical or lexical compari...
6
lolphp
Sarcastinator
fk7g335
<|sols|><|sot|>Array is higher than infinity<|eot|><|sol|>https://3v4l.org/iONLA<|eol|><|sor|>https://www.php.net/manual/en/language.operators.comparison.php Comparison with Various Types Type of Operand 1| Type of Operand 2| Result ---|---|---- null or string| string| Convert NULL to "", numerical or lexical compari...
6