Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

What does this code snippet value represent?

Posted on 2011-02-15
2
Medium Priority
?
347 Views
Last Modified: 2012-08-14
I have this code snippet:

                    $today = date('Ymd');
                    $dateCompare = date('Y') . '0507';
                    if ($today < $dateCompare) {

And I want to know what does the 0507 represent? Is it a date format or something? It looks like it is comparing the Year to 0507...but I don't understand it.

Any help would be appreciated.
0
Comment
Question by:Donnie Walker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
jfromanski earned 2000 total points
ID: 34897528
$today is Ymd, eg. 20110215
$dateCompare is concatenation of two strings: Y and '0507' - this will give eg. 20110507
0
 

Author Closing Comment

by:Donnie Walker
ID: 34897559
Thank you sir!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question