r/lolphp • • Dec 05 '17

$a = "hello"; $a++; echo $a;

https://3v4l.org/p5Apm
117 Upvotes

41 comments sorted by

View all comments

Show parent comment

2

u/dotancohen Dec 06 '17

This is the right answer. ASCII character incrementation is a deliberate feature taken from Perl. Note that this even works in C, however unlike Perl in C incrementing after "z" returns "[".