|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75658 cal_days_in_month function give error undefined function in php 7.0.26
Submitted: 2017-12-09 10:10 UTC Modified: 2017-12-09 13:05 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: charlie dot muldoon12 at gmail dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 7.0.26 OS: Windows
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: charlie dot muldoon12 at gmail dot com
New email:
PHP Version: OS:


 [2017-12-09 10:10 UTC] charlie dot muldoon12 at gmail dot com
From manual page:

cal_days_in_month(CAL_GREGORIAN, 12, 2017);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-12-09 10:40 UTC]
I cannot reproduce it.

cal_days_in_month(CAL_GREGORIAN, 12, 2017) correctly returns 31.
 [2017-12-09 11:09 UTC]
-Status: Open +Status: Feedback
 [2017-12-09 12:28 UTC] charlie dot muldoon12 at gmail dot com
This problem occurs with php version 7.0.26. 

Check this online site

Add here below code
  echo cal_days_in_month(CAL_GREGORIAN, 12, 2017);

And Select PHP version 5.0.2
It will give fatal error Function undefined.
 [2017-12-09 13:05 UTC]
-Status: Feedback +Status: Not a bug
 [2017-12-09 13:05 UTC]
I guess you meant 7.0.2 there. Yes, it seems to be missing on 7.0.1-7.0.3. This is probably due to the extension not being enabled.

Please check with var_dump(extension_loaded('calendar')), which isn't available on the site you mentioned, because it has been disabled.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 20 07:01:28 2024 UTC