位置: 编程技术 - 正文

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)

  • 房产公司企业所得税如何预征
  • 付款方和发票抬头不一致如何账务处理
  • 业务招待费进项税额转出表二
  • 大行建筑有限公司分公司
  • 住宿报销是开普票还是专票
  • 当月没有收入,发生的人工和费用怎么办
  • 滞留票税务局会罚款多少
  • 其他应付款长期挂账如何处理
  • 注册资本需要实交吗
  • 开具银行资信证明
  • 设计服务需要交文化建设费吗
  • 物业代收费:有关法律
  • 许可使用费怎么计算
  • 外币报表未分配利润折算
  • 外币报表折算差额在会计报表中应作为( )
  • 固定资产计提折旧的会计科目
  • 建材销售公司需要交哪些税
  • 增值税包括土地整治收入吗
  • 个人到税局开具发票流程
  • 开票人为什么不能改
  • 先开发票再预缴税款吗
  • 房地产企业建设的幼儿园如何缴纳城镇土地使用税
  • 外聘人才一次性工资费用入账什么分录?
  • 以前年度损益申报怎么报所得税
  • 苹果se和华为p9哪个好
  • 总资产净利率和权益乘数之间的关系
  • win10 21h1激活密钥
  • 清除文件夹exe病毒工具
  • php实现的三个常数是什么
  • 经销商计提折扣怎么做账
  • uniapp intent
  • 冲销多计提所得税
  • vue前端开发规范
  • 提取公益金会计科目
  • 资产提前报废需要什么资料
  • 对于小型微利企业的建议
  • 位于阿曼和迪拜的大学
  • php7.3
  • vue如何配置路由
  • vue中的$el
  • 图片美白ps
  • laravel 实例
  • 出口会计分录该怎么写
  • 收到购置税完税通知书
  • 财务报表季报应付职工薪酬为负数
  • c语言中数组怎么用
  • 有效税额可以更改吗
  • 个人所得税数据怎么导入新电脑
  • 个人工作室需要做账吗
  • 存货在报表里是如何体现的
  • 拿工资要开发票,发票去哪儿开?
  • 融资租赁固定资产折旧年限
  • 什么是试算平衡表,编制试算平衡表时应注意哪些方面
  • 招待客户对公司的重要性
  • 应收账款周转率越高越好吗
  • 在建工程中发生的费用
  • 医疗投资机构的定义
  • 结转费用时财务费用为负
  • 公司购买汽车的购置税可以抵税吗
  • 公司账户美金入账后怎么做分录
  • mysql数据库中关于作为临时
  • 如何win8.1升级win10正式版
  • win10硬盘安装器安装教程
  • ubuntu怎么更改用户名
  • windows怎样删除文件
  • win8.1 升级
  • service5.exe - service5是什么进程 有什么用
  • xboxone系统更新错误
  • es6数组函数
  • jquery实现回到顶部
  • linux无法使用yum命令
  • jquery 报表
  • 把下一行的数字去掉
  • 遮罩有什么作用
  • node转go
  • javascript编程基础
  • 辽宁省社保系统操作
  • 北京地税电话咨询
  • 国家税务总局大连电子税务局
  • 12366国税网上申报
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设