Has anybody else experiencing that strptime() hangs?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jeff00seattle
Forum Commoner
Posts: 66
Joined: Sat Feb 28, 2009 3:27 pm

Has anybody else experiencing that strptime() hangs?

Post by jeff00seattle »

I did the first example for PHP function strptime(): http://us2.php.net/manual/en/function.strptime.php

And everytime I run it, function strptime() hangs. No exceptions thrown, nothing, it just hangs.

Code: Select all

$format = '%d/%m/%Y %H:%M:%S';
$strf = strftime($format);
 
echo "$strf\n";
 
print_r(strptime($strf, $format));
Is anybody else experiencing the same issue? I am running PHP 5.2.9.

Thanks

Jeff in Seattle
Eric!
DevNet Resident
Posts: 1146
Joined: Sun Jun 14, 2009 3:13 pm

Re: Has anybody else experiencing that strptime() hangs?

Post by Eric! »

Try turning on errors.
error_reporting(E_ALL);

I get a fatal error on php 5.2.5, undefined function.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Has anybody else experiencing that strptime() hangs?

Post by requinix »

Eric! wrote:I get a fatal error on php 5.2.5, undefined function.
There's no strptime on Windows.
jeff00seattle
Forum Commoner
Posts: 66
Joined: Sat Feb 28, 2009 3:27 pm

Re: Has anybody else experiencing that strptime() hangs?

Post by jeff00seattle »

tasairis wrote:There's no strptime on Windows.
I am on Windows XP.
Where did you find this information?
Just curious, is there an alternative for strptime()?

Thanks

Jeff in Seattle
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Has anybody else experiencing that strptime() hangs?

Post by requinix »

jeff00seattle wrote:I am on Windows XP.
Where did you find this information?
And people wonder why they should read manuals...

http://www.php.net/manual/en/function.strptime.php
Post Reply