duanlv1366 2010-01-04 11:11
浏览 26
已采纳

PHP:$ i = $ i ++崩溃了服务器

This happened to me a few years ago before I knew about SO, but I'm still curious. When I was still learning the basics of PHP, I accidentally typed $i = $i++; When I tested the webpage in the browser, The server crashed and it took a long time to get it back up. I've typed in some pretty stupid things before and created a bunch of infinite loops, but for some reason, that was the worst. Does anyone know why this line was so 'poisonous'

  • 写回答

3条回答 默认 最新

  • douya2433 2010-01-04 11:17
    关注

    $i = $i++; is the same as $i = $i; essentially.

    Unfortunately $i = $i++; is known as "undefined behavior".

    Anything could happen simply because the compiler can't fully comprehend what is going on.

    There's an excellent SO question covering similar undefined behavior here.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作