Skip to content
Advertisement

Decrement operator for strings bug in PHP?

There is an inconsistency in increment/decrement operator function regarding strings in -at least- my version of PHP. Here is what I mean:

JavaScript

Is this an expected behavior? Should I file a bug report or something? Do you know of a workaround?

edit: filed bug#80212

Advertisement

Answer

Here is what I finally went with:

JavaScript

Wouldn’t call it elegant but I’d call it functional.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement