php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34519 Unexpected return value
Submitted: 2005-09-16 01:53 UTC Modified: 2005-09-16 17:43 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: douglas at gcoders dot net Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.1.0RC1 OS: FreeBSD
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: douglas at gcoders dot net
New email:
PHP Version: OS:

 

 [2005-09-16 01:53 UTC] douglas at gcoders dot net
Description:
------------
When using mktime(0, 0, 0, 0, 0, 0), the returned value is different of expected.

ONLY after update to 5.1RC1, before, it's ok.

Reproduce code:
---------------
<?php

$ts = mktime(0, 0, 0, 0, 0, 0);
var_dump($ts);


Expected result:
----------------
bool(NULL)

Actual result:
--------------
int(943920000)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-16 01:56 UTC] douglas at gcoders dot net
Sorry, expect result is bool(FALSE) not bool(NULL)
 [2005-09-16 04:57 UTC] derick@php.net
The behavior is correct, although it is different from < PHP 5.1.0.
 [2005-09-16 17:43 UTC] douglas at gcoders dot net
Yes, before 5.1, expected return is -1 instead of FALSE
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 07:01:33 2025 UTC