位置: 编程技术 - 正文

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)

  • 增值税一般纳税人税率是多少?
  • 经济补偿影响下份工作吗
  • 增值税怎么记
  • 财务工作中如何做好协同工作
  • 年终奖可以税前扣除嘛
  • 建材公司小规模纳税人税率
  • 在建工程的范围
  • 经营性应收项目和经营性应付项目
  • 固定资产贷款偿还期计算公式
  • 汽车的购置税可以不交吗
  • 无形资产根据什么填列资产负债表
  • 建安企业预缴个税怎么算
  • 成本票和费用票分别是什么
  • 补交之前年度税款怎么调账
  • 发放活动奖金支出怎么入账
  • 一般个体户核定税率多少
  • 发生的费用可以直接计入主营业务成本吗
  • 走物流的货物如何收费
  • 三证合一后未办理税务登记
  • 一般纳税人认定管理办法
  • edge浏览器下载安装
  • 手动设定ip地址后连不上网
  • 建筑公司小规模纳税人怎么做账报税
  • 心绞痛的早期症状表现有哪些
  • 发放职工工资计入什么会计科目
  • win7旗舰版叫啥
  • 非货币性资产投资的会计处理
  • 如何做商品批发
  • 若依项目制作饼状图和柱状图
  • 企业所得税核定征收方法有哪两种
  • 位于阿曼和迪拜的大学
  • thinkphp框架下404页面设置 仅三步
  • go开发web项目
  • 鲜花售卖系统
  • IDEA 2022专业版创建Java Web项目(保姆式小白讲义,强烈建议入手!)
  • 人人都能用英语pdf下载
  • php数组怎么实现的
  • 保险费计入固定资产原值吗
  • python PyQt如何使用资源
  • SQL server 2008安装程序遇到以下错误 sku
  • sql server数字类型
  • 帝国cms移动端
  • 资产负债表日后至财务报告批准报出日之间
  • sqlserver2000分页
  • 存货的入账价值等于
  • 外贸企业出口货物会计分录
  • 银行承兑汇票套利案例
  • 一般纳税人结转税额怎么做会计分录
  • 所得税减免的会计科目
  • 进项税额加计10
  • 公司给别人公司过账应该注意哪些
  • 陪标收费标准
  • 挂靠工程项目预交税金的会计分录如何做?
  • 免税收入怎么做分录
  • centos7.0镜像下载
  • Win7 SP1补丁32/64位 2015年1月汇总篇(内附下载)
  • xp系统问题
  • mac运行很卡怎么办
  • centosgui
  • win7系统注册表文件损坏无法开机怎么修复
  • win xp 内存
  • linux查看所有硬件信息命令
  • win10桌面预览功能怎么打开
  • win8怎么改系统
  • linux解密
  • unity小技巧
  • pcl读取ply文件
  • vue3 todo
  • nodejs怎么调试
  • 安卓退出界面
  • 反序存放字符串
  • 手游开发流程具体
  • bootstrap学习
  • 税基式减免,税率式减免,税额式减免三者之间的联系
  • 车险专票怎么做账
  • 境外取得收入申报期限
  • 关于研发费用的审计程序,下列说法中错误的是
  • 处级工作调动用什么手续
  • 鸿蒙2.0哪个版本续航好
  • 广州代理记账公司地址
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设