|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-03-08 11:28 UTC] wevegotafileonyou at hotmail dot com
[2004-03-08 12:09 UTC] random at sinfusion dot com
[2004-03-09 08:45 UTC] sniper@php.net
[2004-03-09 12:07 UTC] random at sinfusion dot com
[2004-04-19 17:09 UTC] nlopess@php.net
[2004-04-19 17:10 UTC] nlopess@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 09:00:01 2025 UTC |
Description: ------------ Constants declared within a class are not recognized as such when used as function parameter default values for functions within the class. Reproduce code: --------------- class TestConstants { const CONST_1 = 1; function test ($param = CONST_1) { echo $param; } } $test = new TestConstants(); $test->test(); Expected result: ---------------- 1 Actual result: -------------- Notice: Use of undefined constant CONST_1 - assumed 'CONST_1' in f:\dev\Web\pervercity.com\test\testconstants.class.php on line 8 CONST_1