开发者

What is the meaning of 'var_export($_REQUEST, true)' in PHP

Can anybody please tell me what this means开发者_如何学C in PHP?

var_export($_REQUEST, true)


It converts $_REQUEST to a string, which would evaluate to the array, then returns it.

See the documentation of var_export.


Actually, your code tries to execute var_export(Array, true) in a shell as you have backticks around it (even though you most likely just accidentally put them when posting the line as code here on SO).

But without the backticks, your code exports $_REQUEST to PHP code which could be used to re-create an array with the same data.

Edit: Aww, now they have been edited away.


Try

var_export($_REQUEST['true'])

Returns true to the client, if the operation was successful.

Otherwise you can send any message.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜