dougou8552 2014-10-30 15:49
浏览 83

如果将键值设置为NULL,PHP 5.6中的PHP-Redis是否会崩溃?

This PHP code crashes the host (Apache) with a segfault:

$myRedis->hSet("some key name", NULL);

This is troubling to me, because PHP is supposed to be a high-level language that doesn't dereference NULL pointers, but instead either accepts them as "empty value" or throws an exception.

Am I the only one seeing this? (This code worked fine in PHP 5.3 and 5.5)

  • 写回答

1条回答 默认 最新

  • dongyou6909 2015-07-31 05:57
    关注

    Try this:

    $myRedis->hSet("some key name", null, null);
    

    Further, Check This

    评论

报告相同问题?

悬赏问题

  • ¥15 uniapp连接阿里云无法发布消息和订阅
  • ¥25 麦当劳点餐系统代码纠错
  • ¥15 轮班监督委员会问题。
  • ¥15 基于作物生长模型下,有限水资源的最大化粮食产量的资源优化模型建立
  • ¥20 关于变压器的具体案例分析
  • ¥15 生成的QRCode圖片加上下載按鈕
  • ¥15 板材切割优化算法,数学建模,python,lingo
  • ¥15 科来模拟ARP欺骗困惑求解
  • ¥100 iOS开发关于快捷指令截屏后如何将截屏(或从截屏中提取出的文本)回传给本应用并打开指定页面
  • ¥15 unity连接Sqlserver