php.net |  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
Votes:1
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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
35 - 16 = ?
Subscribe to this entry?

 
 [2017-12-09 10:10 UTC] charlie dot muldoon12 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.cal-days-in-month
---

cal_days_in_month(CAL_GREGORIAN, 12, 2017);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

cal_days_in_month(CAL_GREGORIAN, 12, 2017) correctly returns 31.
 [2017-12-09 11:09 UTC] kelunik@php.net
-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 http://sandbox.onlinephpfunctions.com/

Add here below code
<?php
  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] kelunik@php.net
-Status: Feedback +Status: Not a bug
 [2017-12-09 13:05 UTC] kelunik@php.net
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 06:01:29 2024 UTC