变量变量:什么时候有用? [英] Variable variables: when useful?

查看:122
本文介绍了变量变量:什么时候有用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
变量变量的实际用途是什么?

Possible Duplicate:
What's an actual use of variable variables?

好的,这个问题看起来有点怪异,但是我真的很想知道:什么时候变量变量有用?我已经用PHP编程了几年,但是我从未使用过它们.对我来说,它看起来很有趣而不是有用.

OK, this question may look a little bit point-whoreish, but I'd really like to know: when are variable variables useful? I haved programmed in PHP for several years, but I've never used them. For me it looks rather funny than useful.

现实生活中可变变量的例子有哪些?

What are some real life examples of variable variables?

更新:

真的很抱歉您的投票.链接的重复项"实际上可能是一个重复项,除了以下几点:那里列出的示例向我展示了为什么不使用变量变量.

I'm really sorry about your votes. The linked 'duplicate' may be really a dupe except one thing: the examples listed there show me why not to use variable variables.

推荐答案

从不.此功能及其其他儿童疾病(例如注册全局变量魔术引号,等等.

Never. This feature should be banned from the language as well as its other children diseases such as register globals, magic quotes, etc.

这篇关于变量变量:什么时候有用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆