[PHP-BUG] Bug #64444 [NEW]: Use of quantitative scalar as array.

2013-03-18 Thread koushky at gmail dot com
From: koushky at gmail dot com
Operating system: ubuntu 12.10
PHP version:  5.3.23
Package:  Variables related
Bug Type: Bug
Bug description:Use of quantitative scalar as array.

Description:

If the variable is a quantitative scalar (excluding the strings) and access
as 
array type, php does not returned notice error.

Test script:
---
$array = 1;
var_dump($array[0]); // doesn't return notice error

Expected result:

NULL

Actual result:
--
PHP Notice:  Undefined offset: 0 in Command line code on line 1
NULL

-- 
Edit bug report at https://bugs.php.net/bug.php?id=6&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=6&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=6&r=trysnapshot53
Try a snapshot (trunk): 
https://bugs.php.net/fix.php?id=6&r=trysnapshottrunk
Fixed in SVN:   https://bugs.php.net/fix.php?id=6&r=fixed
Fixed in release:   https://bugs.php.net/fix.php?id=6&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=6&r=needtrace
Need Reproduce Script:  https://bugs.php.net/fix.php?id=6&r=needscript
Try newer version:  https://bugs.php.net/fix.php?id=6&r=oldversion
Not developer issue:https://bugs.php.net/fix.php?id=6&r=support
Expected behavior:  https://bugs.php.net/fix.php?id=6&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=6&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=6&r=submittedtwice
register_globals:   https://bugs.php.net/fix.php?id=6&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=6&r=php4
Daylight Savings:   https://bugs.php.net/fix.php?id=6&r=dst
IIS Stability:  https://bugs.php.net/fix.php?id=6&r=isapi
Install GNU Sed:https://bugs.php.net/fix.php?id=6&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=6&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=6&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=6&r=mysqlcfg



[PHP-BUG] Bug #65304 [NEW]: Use of max int in array_sum

2013-07-21 Thread koushky at gmail dot com
From: koushky at gmail dot com
Operating system: Ubuntu 13.04 64bit
PHP version:  5.4.17
Package:  Arrays related
Bug Type: Bug
Bug description:Use of max int in array_sum

Description:

If we add amount of max INT with number 1 in array_sum function , the
result will 
be false.

While if we add this two via plus (+) operator ,the result will be true.

My operation system is 64 bit.

Test script:
---
/* max INT in 64bit = 9223372036854775807 */

var_dump(array_sum(array(9223372036854775807,1)));

var_dump(9223372036854775807+1);

Expected result:

int(-9223372036854775808)

float(9.2233720368548E+18)

Actual result:
--
float(9.2233720368548E+18)

float(9.2233720368548E+18)

-- 
Edit bug report at https://bugs.php.net/bug.php?id=65304&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=65304&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=65304&r=trysnapshot53
Try a snapshot (trunk): 
https://bugs.php.net/fix.php?id=65304&r=trysnapshottrunk
Fixed in SVN:   https://bugs.php.net/fix.php?id=65304&r=fixed
Fixed in release:   https://bugs.php.net/fix.php?id=65304&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65304&r=needtrace
Need Reproduce Script:  https://bugs.php.net/fix.php?id=65304&r=needscript
Try newer version:  https://bugs.php.net/fix.php?id=65304&r=oldversion
Not developer issue:https://bugs.php.net/fix.php?id=65304&r=support
Expected behavior:  https://bugs.php.net/fix.php?id=65304&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=65304&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=65304&r=submittedtwice
register_globals:   https://bugs.php.net/fix.php?id=65304&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65304&r=php4
Daylight Savings:   https://bugs.php.net/fix.php?id=65304&r=dst
IIS Stability:  https://bugs.php.net/fix.php?id=65304&r=isapi
Install GNU Sed:https://bugs.php.net/fix.php?id=65304&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65304&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65304&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=65304&r=mysqlcfg



Bug #65304 [Opn]: Use of max int in array_sum

2013-07-21 Thread koushky at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=65304&edit=1

 ID: 65304
 User updated by:koushky at gmail dot com
 Reported by:koushky at gmail dot com
 Summary:Use of max int in array_sum
 Status: Open
 Type:   Bug
 Package:Arrays related
 Operating System:   Ubuntu 13.04 64bit
 PHP Version:5.4.17
 Block user comment: N
 Private report: N

 New Comment:

update


Previous Comments:

[2013-07-21 09:37:52] koushky at gmail dot com

Description:

If we add amount of max INT with number 1 in array_sum function , the result 
will 
be false.

While if we add this two via plus (+) operator ,the result will be true.

My operation system is 64 bit.

Test script:
---
/* max INT in 64bit = 9223372036854775807 */

var_dump(array_sum(array(9223372036854775807,1)));

var_dump(9223372036854775807+1);

Expected result:

int(-9223372036854775808)

float(9.2233720368548E+18)

Actual result:
--
float(9.2233720368548E+18)

float(9.2233720368548E+18)






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=65304&edit=1