Solved

What does this code snippet value represent?

Posted on 2011-02-15
2
341 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
2 Comments
 
LVL 10

Accepted Solution

by:
jfromanski earned 500 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
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 create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

744 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now