php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #52271 Versioning problem
Submitted: 2010-07-07 09:10 UTC Modified: 2010-07-07 09:53 UTC
From: tarekonline dot com at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 5.2.13 OS: Windows XP
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: tarekonline dot com at gmail dot com
New email:
PHP Version: OS:

 

 [2010-07-07 09:10 UTC] tarekonline dot com at gmail dot com
Description:
------------
Hi,
on the online documentation you can see the versioning indicator: (PHP 5 >= 5.3.0) 
under functions like (DateTime::diff, DateTime::createFromFormat, date_diff(), 
date_create_from_forma(), ..etc). I think this should indicate that these 
functions are supported in PHP greater than 5.0 (in other words: supported in 5.1 
and 5.2) which is not true as it gives me always the fatal error message: [Call to 
undefined method DateTime::createFromFormat()]!

I am using:
ZendServer of PHP5.2.13 on Windows XP Service Pack3 with IIS5.1

My Script:
$dt = DateTime::createFromFormat('Y-m-d', DateTime::getTimestamp());



Test script:
---------------
$dt = DateTime::createFromFormat('Y-m-d', DateTime::getTimestamp());

Expected result:
----------------
Fatal error: Call to undefined method DateTime::createFromFormat() in 
E:\Private\Projects\syndi\test.php on line 10


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-07 09:45 UTC] salathe@php.net
-Status: Open +Status: Bogus
 [2010-07-07 09:45 UTC] salathe@php.net
The version line "PHP 5 >= 5.2.0" reads "[Available in] PHP 5 versions greater 
than or equal to 5.3.0".  If you care to suggest a way of representing the 
versions for which a method is available in a more clear and equally concise way, 
then please do share that with us. In the mean time, I'll close this as "not a 
bug".
 [2010-07-07 09:53 UTC] salathe@php.net
Oops, please forgive the typo (5.2.0 should be 5.3.0!!) in the first line of my 
comment.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 06:00:01 2026 UTC