From: sascha dot wildgrube at steganos dot com
Operating system: all
PHP version: 4.3.2
PHP Bug Type: *Programming Data Structures
Bug description: using unreferenced variables does not produce errors

Any variable identifier can be used in a statement - even if it hasn't
been referenced before - without producing an error.

Most of the time when debuggong php code is spent for searching typos in
variable names.

I consider it a bug that php does not produce and display error if it
encounters an unreferenced variable in a statement.

A solution could be a "strict" statement. That tells php to throw errors
in that case to stay backward compatible.

An even better solution would be the need to

Reproduce code:
$nValue1 = 10;
$nValue2 = 20;
print($nVale1 + $nValue2);

Expected result:


No, it is:


Why, because of the typo in line 3. What I want to happen in that case is

P error: p error in /somefile.php4 on line 3: unreferenced object

Actual result:

Edit bug report at [url][/url]
Try a CVS snapshot (php4): [url][/url]
Try a CVS snapshot (php5): [url][/url]
Fixed in CVS: [url][/url]
Fixed in release: [url][/url]
Need backtrace: [url][/url]
Try newer version: [url][/url]
Not developer issue: [url][/url]
Expected behavior: [url][/url]
Not enough info: [url][/url]
Submitted twice: [url][/url]
register_globals: [url][/url]
PHP 3 support discontinued: [url][/url]
Daylight Savings: [url][/url]
IIS Stability: [url][/url]
Install GNU Sed: [url][/url]
Floating point limitations: [url][/url]