开发者

Interesting bug in PHP [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help cen开发者_如何学编程ter. Closed 12 years ago.

Here in the following block of program it prints 2 instead of 1.

<?php
 f(0, $$var);
 $x = 1;
 $y = 2;
 echo $x;
 function f($a, $b) {}
?>

Any suggestions?

UPDATE 1

This information has been get from http://habrahabr.ru/blogs/php/95595

UPDATE 2

By posting this question mainly I just wanted to 1) inform others about this bug, 2) get ideas of different users about the reasons of why this happens.


Prints 2 on Mac. (PHP 5.3.1)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜