PHP “backspace” character during output possible?

后端 未结 8 1105
囚心锁ツ
囚心锁ツ 2021-02-13 04:30

I have a feeling the answer is \"it\'s not possible,\" but thought I\'d ask to satisfy my curiosity.

I have some code that\'s echoed where the \\n is unavoidable:

<
8条回答
  •  不知归路
    2021-02-13 04:58

    This is not a direct answer to his exact question, but to what the title seems to allude to: outputting a PHP "backspace" character, which is probably only useful when using the PHP CLI.

    You can find the right ASCII code for this (and other characters) on the ASCII table, and then use either chr() or an escape sequence:

    echo chr(8);
    echo "\010";
    

提交回复
热议问题