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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 13:01:34 2024 UTC