|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9237 date function parameters won't work on PWS
Submitted: 2001-02-13 05:26 UTC Modified: 2001-02-20 02:28 UTC
From: ajandris at parks dot lv Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.0.4pl1 OS: NT 4.0 wrkst, win98
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: ajandris at parks dot lv
New email:
PHP Version: OS:


 [2001-02-13 05:26 UTC] ajandris at parks dot lv
On linux (built in) and IIS 4.0 (cgi vers) on nt4.0 wrkst i can use function for example:
 function getThisMonth(){
  return $dat[mon];
 without problem.
On pws it reproduces error (description I don't remember -> it happens at home)
I should put mon in double quotes '"'. Then it works.
This error happens with other parameters like nmon, year ...
With quotes it works on linux and IIS 4.0 too.



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-13 12:44 UTC]
I bet the text of the errmsg is somethign like this:

Warning:  Use of undefined constant x - assumed 'x' in ... on line ...

this is caused by error_reporting set high enough to trigger this warning. 
 [2001-02-20 01:56 UTC] ajandris at parks dot lv
Yes, the message I received is like this ...
I didn't receive that before.

Suggestions: don't set error reporting by default so high in installation wizard for win32 binaries.


 [2001-02-20 02:28 UTC]
The usage of $dat[mon] is not the way it shoudl work. Without the "'s, it's not possible for PHP to see whether mon is a constant, or an index. Therefore you should always use "mon" if you want mon to be the index of your array.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 28 02:01:31 2024 UTC