php不适合做什么工作,断言不能在php中工作.很简单.我究竟做错了什么?

谢谢RiggsFolly.

看起来像断言在7.0的开箱即用.在我的php.ini文件中,zend.assertions设置为-1,这意味着它们被忽略.我已将设置更改为1.

[Assertion]

; Switch whether to compile assertions at all (to have no overhead at run-time)

; -1: Do not compile at all

; 0: Jump over assertion at run-time

; 1: Execute assertions

; Changing from or to a negative value is only possible in php.ini! (For turning assertions on and off at run-time, see assert.active, when zend.assertions = 1)

; Default Value: 1

; Development Value: 1

; Production Value: -1

; http://php.net/zend.assertions

zend.assertions = 1

该脚本现在按预期工作.

:~/code/x/test$php x.php

Hello

PHP Warning: assert(): assert(false) failed in /home/ubuntu/code/x/test/x.php on line 8

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值