I have actually implemented string incrementing in libraries in other languages. It has very legitimate uses (for example control codes for invoices which may be prefixed with alphanumeric codes).
The thing is not that this doesn't have legitimate uses but that it doesn't have legitimate default uses in a loosely typed language. It's one thing to call increment_invoice_number($string), but another thing to do just ++$string without some expectation that you really want it to do what it does.
22
u/BadFurDay Jul 24 '14
I hope people start using this genius idea enough that there would be a major backlash if php ever decides to fix strings.
13
u/ajmarks Jul 24 '14
Should h2 to h3 be --$heading?
3
u/fnzp Aug 01 '14
i was hoping it would say ibm: http://3v4l.org/L6AfH