位置: 编程技术 - 正文

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)

  • 自来水安装增值税税率
  • 缴纳个人所得税会计分录怎么写
  • 企业内部研发支出会计处理探讨
  • 差旅费跨年报销说明
  • 计提工资时金额是应发工资还是实发工资
  • 怎么查对方一个月去了什么地方
  • 装修摊销是当月还是次月摊销?
  • 办公室空调维修报告
  • 什么合同不需要做结算
  • 销售已计提完折旧的固定资产
  • 企业所得税的征税对象包括
  • 出口退税会计处理全部流程
  • 自建的固定资产入账价值具体包括哪些
  • 库存商品报废进项转出
  • 没有运输经营范围能不能开运输发票
  • 财会人员
  • 个人独资企业没有公司章程吗?
  • 固定资产一次性折旧政策2023
  • 企业捐赠现金支出应在哪个项目反应
  • 2套账如何整合为一套账
  • 2021发票勾选认证
  • 苹果电脑重新安装系统磁盘锁了怎么办
  • windows右键刷新总是卡住
  • 公司向银行贷款利息是多少
  • 费用已付款跨年怎么做账
  • 财政应返还额度年末有余额吗?
  • macOS Big Sur 11.3 公开测试版正式推送(附更新内容)
  • javascript局部变量
  • laravel基础
  • 股东分红会计分录摘要
  • 金融负债期末可以转出吗
  • 劳务派遣企业简易征收管理办法
  • vue vif
  • 餐饮定额发票能报销吗怎么报销
  • 零申报的账怎么做
  • cifar10图像分类实验报告
  • 关税计入纳税总额么
  • 本年利润是净利润吗
  • 在岗职工平均工资和社平工资的区别
  • 织梦cms不更新了吗
  • mongodb安装包下载
  • python中except用法
  • 发票商品分类
  • 应收账款是否存在的审计程序
  • 注销小规模财务报表怎么办
  • Win2003系统下SQL Server 2008安装图解教程(详细图解)
  • 经审计的财务报表是否要会计师事务所盖章
  • 过路费发票抵扣政策
  • 成品油发票如何下载库存
  • 销项税额和转出未交增值税余额怎么结转
  • 企业所得税和增值税重复收税了吗
  • 速动比率特别高的原因
  • 简单的辞职报告
  • mysql的zip包怎么安装
  • 数据转换常见策略
  • win10应用商店下载路径更改
  • rtm平台全称
  • mscorsvw.exe是什么
  • ubuntu唤醒快捷键
  • ubuntu怎么禁用nouveau
  • win7开机总是自检
  • w8系统ie浏览器在哪
  • win10重启更新的时候强制关机后会发生啥
  • win7系统电脑蓝牙怎么开
  • linux就该这么些
  • windows8.1版本区别
  • linux硬盘找不到
  • 关于混合基金投资风险以下表述正确的是
  • Extjs Ext.MessageBox.confirm 确认对话框详解
  • sed 处理多行
  • python的nltk
  • jquery的checked
  • python数据清洗的方法有哪些
  • unity data
  • JavaScript toFixed() 方法
  • android network
  • thinkphp withjoin
  • 山西省税务局投诉平台
  • 农村房屋改造问题向谁举报
  • 两利四率完成情况
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设