我需要在PHP文档块中使用splat运算符,但无法弄清楚如何转义字符

问题描述 投票:0回答:1

我正在使用代码接收并运行多组示例数据。我正在发送多个accept标头,其中之一是"*/*"

因此示例代码为:

   /**
     * My description of the test
     *
     * GET a/path/i/am/testing
     *
     * @example ["*/*", 200]
     * @example ["application/json", 200]
     * @example ["text/html", 200]
     *
     */

我尝试过在双精度内使用单引号,我已经尝试过在单精度内使用双引号,我已经尝试将每段连接起来,已经尝试了反斜杠,也已经尝试了Unicode。PHP认为splat正在与docblock对话。我想念什么?预先感谢!

php escaping codeception splat docblocks
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.