-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
24 lines (15 loc) · 1.12 KB
/
README
File metadata and controls
24 lines (15 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
XMLTest is my answer to the following PHP exercise:
Write a PHP program that generates an XML file containing every 30th of June since the Unix Epoch, at 1pm GMT, similar to the one attached.
<?xml version="1.0" encoding="UTF-8"?>
<timestamps>
<timestamp time="1246406400" text="2009-06-30 13:00:00" />
</timestamps>
The program must also parse the generated XML file and generate a second XML file sorted by timestamp in descending order, excluding years that are prime numbers. The timestamps generated should be at 1pm PST.
We must be able to run these steps separately.
Remember, you need to solve the problem but also show us your knowledge of professional PHP coding and OOP. The code must be written to production standard - the kind of thing you'd expect from anyone you work with. And it has to run first time!
================================================================================
Intended to be executed from the command line ONLY
Command line usage:
php xmltest.php create <filename> <timezone>
php xmltest.php convert <filename> <timezone>
(timezone is optional - create uses GMT, convert uses PST as a default)