php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #54314 What I thought before...
Submitted: 2011-03-19 11:30 UTC Modified: 2011-03-22 06:23 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: oop at dr dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: oop at dr dot com
New email:
PHP Version: OS:

 

 [2011-03-19 11:30 UTC] oop at dr dot com
Description:
------------
---
From manual page: http://www.php.net/function.define#Parameters
---
You stated:

bool define  ( string $name  , mixed $value  [, bool $case_insensitive = false  ] )

This contradicts another statement: The default behavior is case-sensitive

Test script:
---------------
bool define  ( string $name  , mixed $value  [, bool $case_insensitive = false  ] )

This contradicts another statement: The default behavior is case-sensitive

Expected result:
----------------
bool define  ( string $name  , mixed $value  [, bool $case_insensitive = true  ] )

The default behavior is case-sensitive

OR...

bool define  ( string $name  , mixed $value  [, bool $case_insensitive = false  ] )

The default behavior is not case-sensitive

Actual result:
--------------
bool define  ( string $name  , mixed $value  [, bool $case_insensitive = false  ] )

The default behavior is case-sensitive

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-19 11:43 UTC] rquadling@php.net
-Status: Open +Status: Bogus
 [2011-03-19 11:43 UTC] rquadling@php.net
The default is case sensitive (CONSTANT !== constant), so the $case_insensitive's 
default value is false.

To make the constant case insensitive (CONSTANT === constant), then you need to 
supply true for $case_insensitive.
 [2011-03-22 06:03 UTC] oop at dr dot com
-Summary: Logical Flaw +Summary: Illogicalness
 [2011-03-22 06:03 UTC] oop at dr dot com
Changed Summary
 [2011-03-22 06:23 UTC] oop at dr dot com
-Summary: Illogicalness +Summary: What I thought before...
 [2011-03-22 06:23 UTC] oop at dr dot com
It was too hard for me to notice that...
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 14:01:36 2025 UTC