• 请不要在回答技术问题时复制粘贴 AI 生成的内容
cent777
V2EX  ›  程序员

代码里变量前面都被加上一个问号“?”是什么鬼

  •  
  •   cent777 · Apr 12, 2018 · 4975 views
    This topic created in 3141 days ago, the information mentioned may be changed or developed.

    部署了个项目,今天发现接口全报错,检查半天发现代码里多了好多好多"?"???

    这是谁在玩我吗

    MinQ
    MinQ
    Apr 12, 2018 via Android
    1
    编码错了吧
    cxbig
    cxbig
    Apr 12, 2018
    2
    看看谁提交的呗
    cent777
    cent777
    OP
    Apr 12, 2018
    3
    @MinQ 应该不会吧,部署用的 git,之前部署的项目也没出过这问题
    cent777
    cent777
    OP
    Apr 12, 2018
    4
    @cxbig 只有我。。。
    cxbig
    cxbig
    Apr 12, 2018
    6
    @cent777 是不是你编辑器或系统的编码问题没有配置好?包括服务器端也检查一下。
    JiaZombie
    JiaZombie
    Apr 12, 2018
    7
    5 楼说了,PHP7 新特性,可空参数(nullable parameter)。。。
    fox0001
    fox0001
    Apr 12, 2018 via Android
    8
    楼主真幽默
    strongcoder
    strongcoder
    Apr 12, 2018 via iPhone
    9
    和 swift 的可选类型一样啊,我说看着这么熟悉
    zjyl1994
    zjyl1994
    Apr 12, 2018 via Android
    10
    PHP7.1 新特性,你需要更新一下服务器版本
    cent777
    cent777
    OP
    Apr 13, 2018
    11
    @xbonline
    @JiaZombie
    @zjyl1994
    多谢,看了下服务器 PHP 版本还是 7.0 的,看来太过固步自封得回炉重造下了。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2529 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 10:52 · PVG 18:52 · LAX 02:52 · JFK 05:52
    ♥ Do have faith in what you're doing.