The behavior is already tested, for example here https://github.com/php/php-src/blob/master/ext/json/tests/bug43941.phpt

So apparently the append functions cover that, but I can probably that line without harm. Will test.