位置: 编程技术 - 正文

PHP:unpack()的用法_misc函数(php unset())

编辑:rootadmin
unpack

推荐整理分享PHP:unpack()的用法_misc函数(php unset()),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:php_uname,php uniqid(),php unpack,php_uname,php unserialize,phpunit,php unset(),php uniqid(),内容如对您有帮助,希望把文章链接给更多的朋友!

(PHP 4, PHP 5)

unpack — Unpack data from binary string

说明 array unpack ( string $format , string $data )

Unpacks from a binary string into an array according to the given format.

The unpacked data is stored in an associative array. To accomplish this you have to name the different format codes and separate them by a slash /. If a repeater argument is present, then each of the array keys will have a sequence number behind the given name.

参数

format

See pack() for an explanation of the format codes.

data

The packed data.

返回值

Returns an associative array containing unpacked elements of binary string.

更新日志

版本 说明 5.5.0

Changes were made to bring this function into line with Perl:

The "a" code now retains trailing NULL bytes.

The "A" code now strips all trailing ASCII whitespace (spaces, tabs, newlines, carriage returns, and NULL bytes).

PHP:unpack()的用法_misc函数(php unset())

The "Z" code was added for NULL-padded strings, and removes trailing NULL bytes.

范例

Example #1 unpack() example

<?php$binarydata="xxxa0x";$array=unpack("cchars/nint",$binarydata);?>

The resulting array will contain the entries "chars" with value 4 and "int" with .

Example #2 unpack() example with a repeater

<?php$binarydata="xxxa0x";$array=unpack("c2chars/nint",$binarydata);?>

The resulting array will contain the entries "chars1", "chars2" and "int".

注释 Caution

Note that PHP internally stores integral values as signed. If you unpack a large unsigned long and it is of the same size as PHP internally stored values the result will be a negative number even though unsigned unpacking was specified.

Caution

Be aware that if you do not name an element, an empty string is used. If you do not name more than one element, this means that some data is overwritten as the keys are the same such as in:

Example #3 unpack() example with unnamed keys

<?php$binarydata="xxxxa0";$array=unpack("c2/n",$binarydata);var_dump($array);?>

The resulting array will contain the entries "1" with value and "2" with . The first value from the c specifier is overwritten by the first value from the n specifier.

参见

pack() - Pack data into binary string

PHP:usleep()的用法_misc函数 usleep(PHP4,PHP5)usleep以指定的微秒数延迟执行说明voidusleep(int$micro_seconds)以指定的微秒数延缓程序的执行。参数micro_seconds暂停的时间以微秒计。1微秒(micro

PHP:time_nanosleep()的用法_misc函数 time_nanosleep(PHP5)time_nanosleep延缓执行若干秒和纳秒说明mixedtime_nanosleep(int$seconds,int$nanoseconds)程序延缓执行指定数量的seconds和nanoseconds。参数seconds必须是一

PHP:time_sleep_until()的用法_misc函数 time_sleep_until(PHP5=5.1.0)time_sleep_until使脚本睡眠到指定的时间为止。说明booltime_sleep_until(float$timestamp)使脚本睡眠到指定的timestamp。参数timestamp将脚本唤醒

标签: php unset()

本文链接地址:https://www.jiuchutong.com/biancheng/280621.html 转载请保留说明!

上一篇:PHP:uniqid()的用法_misc函数(phpunicode)

下一篇:PHP:usleep()的用法_misc函数(php lee)

  • 报税显示缺少组件怎么办
  • 税收的自动稳定性主要表现在什么制度
  • 没有发票先入账怎么办
  • 以前年度损益调整在借方是什么意思
  • 公司公积金缴纳比例一般来说是多少?
  • 免税发票是增值税发票吗
  • 发票上的不含税单价怎么算的
  • 房地产企业增值税管理办法
  • 成本模式的投资性房地产折旧计入什么
  • 报销增值税发票和普通发票
  • 公司注销时认缴不到位怎么办
  • 应付股东款可以结转实收资本吗
  • 土地流转承包费拖欠
  • 快递增值税税率
  • 境内企业转让境外股权税收
  • 出售无形资产是收入吗
  • 滞留票的进项税能抵扣吗
  • 小规模纳税人季报需要报什么
  • 携税宝报税流程
  • 以旧换新的销售方式怎样确定销售额
  • 资产负债表日后事项是什么意思?
  • 什么叫变动费用
  • 工会经费的开支必须取得发票么
  • 企业增资还需要增资账户么
  • 一般纳税人何种情况不需要交附加税
  • win8系统怎么连接无线
  • 如何在excel中链接图片对方能显示
  • 开发间接费用定义
  • 暂估入库入库单范本
  • psr.exe是什么意思
  • 出租商品计入什么科目
  • react img onerror
  • PHP生成静态页面
  • 计提职工养老保险金
  • 企业接受现金捐赠如何开具发票
  • php验证码识别
  • 培训公司要交哪些税
  • js怎么实现倒计时
  • html关于边框的代码
  • 安装多版本chrome
  • 大额的维修费用怎么摊销
  • 来料加工企业的税率是多少
  • 没有到位的注资企业
  • 企业会计准则对收入的定义
  • 3分钟学会做蛋挞
  • 清卡操作流程
  • 进项票和销项票金额一样可以吗
  • 固定资产折旧计算方法公式大全
  • 公司帐户转到法人帐户用途写备用金行吗
  • 收到证券公司信息
  • 委托开发费用
  • 应付账款借方余额负数表示什么
  • 分销佣金税务账务怎么做
  • 土地使用税退税怎么做会计分录
  • 其他应付为负数什么意思
  • 单位伙房费用管理制度
  • 分期付款购无形资产怎么入账?
  • 附报资料是什么
  • 加油卡充值发票可以抵税吗
  • 一年以内到期的长期借款属于
  • 加权净资产收益率越高越好吗
  • 其他流动资产是
  • 明细账设置是什么意思
  • mysql学习教程
  • mysql 5.7.17 winx64免安装版配置方法图文教程
  • linux连接ssr
  • win10系统永久激活软件
  • win10语音控制电脑
  • windows8.1rt
  • cocos creator rpg
  • webpack使用场景
  • 瀑布流软件
  • python实现识别相似图片小结
  • javascript产生随机整数随机性强
  • javascript例题
  • javascript标签大全
  • javascript组成
  • 国有企业租赁经营 河北省
  • 土地增值税如何入账
  • 龙岗区龙岗税务局地址
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设