doue8385
2012-05-09 00:13
浏览 8
已采纳

PHP中保留术语“句柄”吗? [关闭]

In my php code, I am writing a class to create log files, and therefore have to work with files. I would like to store the variable $handle as a field, however when I refer to it as $this->handle, "handle" changes color, to indicate that perhaps it is a reserved term.

I looked through the php manual as well as some other online sources and haven't found anywhere saying it is actually reserved. Can someone clear this up for me?

Thanks for your help.

Cheers!

------------- Edit ---------------

Getting closer...Screenshot taken from BBEdit, with file extension of .php

It looks like it's recognizing handle as at least 3 static methods...still not sure what the "K" word means. Key?

Screen shot of the actual class that I am using the code in

图片转代码服务由CSDN问答提供 功能建议

在我的PHP代码中,我正在编写一个类来创建日志文件,因此必须使用文件。 我想将变量$ handle存储为一个字段,但是当我将其称为$ this-> handle时,“handle”会改变颜色,以表明它可能是一个保留的术语。 \ n

我查看了php手册以及其他一些在线资源,并没有找到任何说它实际上是保留的。 有人可以为我清楚吗?

感谢您的帮助。

干杯!

- -----------编辑---------------

看起来它至少识别出句柄 3种静态方法......仍不确定“K”字的含义。 键?

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

  • doutang9037 2012-05-09 00:14
    最佳回答

    Not only is it not reserved, but it is a common convention to call resource IDs and more $handle. In fact, you can find it throughout the PHP documentation. For example, fopen.

    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题