#36232 [Opn->Bgs]: min() with first boolean param
ID: 36232 User updated by: na at index20 dot ru Reported By: na at index20 dot ru -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: All PHP Version: 5.1.2 New Comment: min(true, 1, 0, -2) == min(min(min(true,1),0),-2) == min(min(true,0),-2) == min(0,-2) == -2; min(true, 1, -2)== min(min(true,1), -2) == min(true, -2) == true; min(true, 1, -2, 0) == min(min(min(true,1),-2),0) == min(min(true, -2), 0) == min(true, 0) == 0; min(-2, 1, 0, true) == min(min(min(-2,1),0),true) == min(min(-2, 0), true) == min(-2, true) == -2; just another one weak type gotcha... Previous Comments: [2006-01-31 17:27:52] na at index20 dot ru Description: min() works abit weird... Tested on 4.4.1, 5.1.1 Reproduce code: --- var_dump(min(true, 1, -2)); var_dump(min(true, 1, 0, -2)); var_dump(min(true, 1, -2, 0)); Expected result: -2 -2 -2 Actual result: -- true -2 0 -- Edit this bug report at http://bugs.php.net/?id=36232&edit=1
#36232 [NEW]: min() with first boolean param
From: na at index20 dot ru Operating system: All PHP version: 5.1.2 PHP Bug Type: Unknown/Other Function Bug description: min() with first boolean param Description: min() works abit weird... Tested on 4.4.1, 5.1.1 Reproduce code: --- var_dump(min(true, 1, -2)); var_dump(min(true, 1, 0, -2)); var_dump(min(true, 1, -2, 0)); Expected result: -2 -2 -2 Actual result: -- true -2 0 -- Edit bug report at http://bugs.php.net/?id=36232&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36232&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36232&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36232&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36232&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36232&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36232&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=36232&r=needscript Try newer version:http://bugs.php.net/fix.php?id=36232&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36232&r=support Expected behavior:http://bugs.php.net/fix.php?id=36232&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36232&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36232&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36232&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36232&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36232&r=dst IIS Stability:http://bugs.php.net/fix.php?id=36232&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36232&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36232&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36232&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=36232&r=mysqlcfg
#34661 [NEW]: checkdate() function returns false on valid date
From: na at index20 dot ru Operating system: Linux PHP version: 4.4.0 PHP Bug Type: Date/time related Bug description: checkdate() function returns false on valid date Description: Checkdate fails if month eq 8 or 9 and passed directly to function. See reproduce code. 5.1 also affected. Reproduce code: --- echo "buggy:\n"; var_dump(checkdate(07, 01, 2005)); var_dump(checkdate(08, 01, 2005)); var_dump(checkdate(09, 01, 2005)); var_dump(checkdate(10, 01, 2005)); $m07 = '07'; $m08 = '08'; $m09 = '09'; $m10 = '10'; echo "ok:\n"; var_dump(checkdate($m07, 01, 2005)); var_dump(checkdate($m08, 01, 2005)); var_dump(checkdate($m09, 01, 2005)); var_dump(checkdate($m10, 01, 2005)); Expected result: buggy: bool(true) bool(true) bool(true) bool(true) ok: bool(true) bool(true) bool(true) bool(true) Actual result: -- buggy: bool(true) bool(false) bool(false) bool(true) ok: bool(true) bool(true) bool(true) bool(true) -- Edit bug report at http://bugs.php.net/?id=34661&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34661&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34661&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34661&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=34661&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=34661&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34661&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34661&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34661&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34661&r=support Expected behavior: http://bugs.php.net/fix.php?id=34661&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34661&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34661&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=34661&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34661&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=34661&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34661&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34661&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34661&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34661&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34661&r=mysqlcfg
#33984 [Bgs->Opn]: Reference problem
ID: 33984 User updated by: na at index20 dot ru Reported By: na at index20 dot ru -Status: Bogus +Status: Open Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 4.4.0 New Comment: I'd like to see a little explanation of this problem. Sorry that wasting your time, but i can't find this 'feature' in documentation. Thanks. Previous Comments: [2005-08-03 20:33:21] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php . [2005-08-03 20:25:46] na at index20 dot ru Description: See reproduce code. Reproduce code: --- a = new A; $this->b =& $this->a; } } $rt = new RefTest(); var_dump($rt); ?> Expected result: object(reftest)(2) { ["a"]=> object(a)(0) { } ["b"]=> &object(a)(0) { } } Actual result: -- object(reftest)(2) { ["a"]=> &object(a)(0) { } ["b"]=> &object(a)(0) { } } -- Edit this bug report at http://bugs.php.net/?id=33984&edit=1
#33984 [NEW]: Reference problem
From: na at index20 dot ru Operating system: Linux PHP version: 4.4.0 PHP Bug Type: Scripting Engine problem Bug description: Reference problem Description: See reproduce code. Reproduce code: --- a = new A; $this->b =& $this->a; } } $rt = new RefTest(); var_dump($rt); ?> Expected result: object(reftest)(2) { ["a"]=> object(a)(0) { } ["b"]=> &object(a)(0) { } } Actual result: -- object(reftest)(2) { ["a"]=> &object(a)(0) { } ["b"]=> &object(a)(0) { } } -- Edit bug report at http://bugs.php.net/?id=33984&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33984&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33984&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33984&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=33984&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=33984&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33984&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33984&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33984&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33984&r=support Expected behavior: http://bugs.php.net/fix.php?id=33984&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33984&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33984&r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=33984&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33984&r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=33984&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33984&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33984&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33984&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33984&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33984&r=mysqlcfg