This issue is caused by php being on of those syntaxes which don’t push into contexts for each code block or group. This causes two punctuations of same scope such as )) or }} or [[ being merged to one folding marker by ST’s new folding engine. This causes ST to not correctly balance those begin and end markers.
The way PHP needs to cooperate with HTML.sublime-syntax I don’t see any feasable way to modify it in a way, syntax based folding would work with its current implementation.
I’ve tried something along those lines with JSP, which is basically HTML embedding Java. Java maintains all those meta.block and meta.group scopes so syntax based folding should work fine, but as soon as it is used/embedded in JSP, we can’t maintain those contexts for sure. So folding is very likely to fail there as well.
See: