位置: 编程技术 - 正文

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)

  • 稳岗返还资金最新账务处理
  • 预付款可以抵扣进度款吗
  • 汇算清缴常见问题
  • 增值税发票四舍五入
  • .申报表税源编码怎么填
  • 发票领用簿怎么领发票
  • 劳务费代扣代缴后还需要开发票吗
  • 小规模购买金税盘
  • 上个月没有结账可以做下个月的账吗
  • 工资发多了需要退回吗
  • 项目部分回款是什么意思
  • 损益类科目计入哪个表
  • 分公司发生修理费能否在总公司列支?
  • 建筑企业存款账户
  • 过桥费和过路费去哪里了
  • 员工赔偿款需要交个税么
  • 离职后绩效奖金应该按照整月发吗
  • 怎样启动powerpoint
  • 英雄联盟登录失败7502013
  • linux系统的文件与目录操作
  • 怎么样防止蹭wi-fi
  • 年度汇算清缴的企业所得税会计分录
  • 抵扣农产品进项税时,也要抵扣运费吗
  • win10待机后无法输入密码
  • 微软系统安装软件
  • 增值税如何在报表里填写
  • php如何实现伪静态
  • vue3组件写法
  • 核定征收印花税的文件
  • 核定征收的企业所得税怎么算
  • html中的标签有哪些
  • 毕业设计烦死了
  • uni-app是干嘛的
  • 大语言模型集成工具
  • 小程序微信认证
  • mysqlmha高可用
  • 长期股权投资初始计量会计科目
  • 合伙企业能享受所得税减半征收
  • 企业收到发票后怎么入账
  • 免征增值税的项目可以开专票吗
  • 预提管理费用怎么计算
  • 数据库平移
  • 定额备用金制度报销时用什么科目
  • 专项应付款的账务处理
  • sql server评估期已过版本升级时重启失败
  • 车票增值税抵扣怎么操作
  • 代扣代缴通用缴款书怎么打印
  • sql server 2016 sp3
  • 季度所得税申报怎么弥补以前年度亏损
  • 投资性房地产累计摊销
  • 农产品收购发票使用范围
  • 抵押贷款购买商品合法吗
  • 废料如何做分录
  • 进项税转出企业所得税调减么
  • 分公司往子公司投资如何做税务处理?
  • 读取mysql binlog
  • XP系统电脑开机密码忘了
  • fedora linux安装教程
  • lumia1020手机
  • 微软系统win10
  • 离线安装macos
  • win8.1关机没反应
  • android开启adb
  • cocos3.0
  • unity游戏之友利拟收购《刀塔传奇》发行商中清龙图
  • js 阻止触发某个事件
  • ie在支持ftp的功能方面
  • Node.js中的事件循环是什么
  • es6十大特性
  • 关于ie浏览器下面说法正确的是
  • 用python写一个学生信息管理系统
  • linux shell脚本命令
  • javascript数据结构与算法百度云视频资源
  • 税务局着装规定文件
  • 县级税务
  • 增值税普通发票有什么用
  • 政府采购合同模板
  • 留抵税额退税政策2022年14号文件
  • 税务局工作业绩
  • 国税总局王军简历
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设