位置: 编程技术 - 正文

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
  • 金蝶专业版仓库反审核怎么做
  • 公司开普票和专票哪个好
  • 收到红字发票如何申报增值税?
  • 房租 收入
  • 房地产开发企业预缴增值税
  • 房地产企业开发间接费用包括哪些
  • 房地产企业土地使用税
  • 基本医疗保险基金与生育保险基金
  • 旧房转让土地增值税扣除项目
  • 房贷利息抵个税细则 两套房
  • 销售商品收入确认的五个条件
  • 委托进口增值税如何抵扣
  • 交防伪税控服务费怎么交
  • 公司买车付首付款个人还贷怎么做会计分录
  • 税控设备全额抵扣政策
  • 以前购买的固定资产现在入账
  • 建设厂房需要几个证
  • 支付证明单打印版
  • 个税手续费返还计入哪个科目
  • 清卡增值税申报比对不通过的原因
  • 允许列支的捐赠比例
  • 增值税又有调整政策吗
  • 个人所得税法规定可减征个税的情形有
  • 货币资金闲置对企业偿债能力的影响
  • 多缴税款如何办理退税
  • 拍卖市场拍售的旧机动车价格是公平市价
  • win11和win10比较
  • 存在标的资产的亏损合同,先进行减值
  • 逆流交易合并报表调整少数损益
  • 土地合并需要什么资料
  • 电脑蓝屏修复方法是什么
  • 捐赠视同销售为什么不确认收入?
  • 处理废料会计分录大全
  • 为什么打开Win10虚拟器后一直在界面
  • win10移动热点开关自动弹回
  • 鸿蒙系统怎么设置桌面小组件
  • 我国现行的关税税率种类及适用
  • php数组函数 菜鸟
  • wmiprvse.exe是什么程序
  • yolov5解析
  • php7多线程支持如何
  • vue vif
  • 小规模负数发票怎么申报增值税
  • 增值税抵扣要求一一对应
  • 小规模增值税减征额怎么算
  • 员工休产假不发工资违法吗
  • 学电脑网站
  • phpcms怎么用
  • 小微企业增值税起征点是多少
  • 开专票明细太多怎么开
  • 合伙企业分配利润会计分录
  • 增值税进项税销项税月末需要结转吗
  • 以前期间留抵税额是什么意思
  • 投资购入房产会亏钱吗
  • 售后租回交易的表述
  • 政府代建工程
  • 增值税加计抵扣账务处理
  • 微信转账截图可以作为会计凭证吗
  • 开票和不开票
  • 根据银行回单做凭证
  • 企业会计准则中职工薪酬
  • 计提折旧有哪些会计科目
  • win10系统如何查看显卡配置
  • freebsd怎么样
  • 苹果7开发者模式怎么打开
  • xp系统怎么没有无线网络连接
  • win7总是弹出广告怎么办
  • android layer
  • js函数详解
  • 编程用到的所有函数
  • nodejs微信小程序开发工具
  • Using Django with GAE Python 后台抓取多个网站的页面全文
  • 很不错的两款Bootstrap Icon图标选择组件
  • android零基础入门教程
  • maxlength属性设置为0
  • 房产原值包括哪些内容
  • 德清社保局固定电话多少
  • 税务稽查机构
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设