Archive: PHP Coding Challenge

Budget 65$ per month
Posted: 5 years ago
Closed
Description
OK, so a fries is a bit behind with some coursework and has been set the following challenge.

This task will need to demonstrate ability with core programming concepts, such as control-flow statements, conditional statements, array and object manipulation.

Demonstrate your coding style, and good general code organisation skills. The requirement is purposefully lightweight - anything that isn't self-evident, please make the most appropriate assumption.

The Requirement

You should create a PHP script to take a given XML structure, and convert it to a JSON object. Sounds easy right? You need to do this manually - using native PHP XML parsing modules, loops and array / collection parsing. So no json_encode/json_decode, or saving the XML to the filesystem and using readFromFile type techniques!

The Deliverables

1. A single PHP script file containing your structured coding solution. This should work from an online PHP runner such as http://www.writep hponline.com

2. A cover note explaining your solution and anything else you feel warrants an explanation.

Extra consideration will be given to your application for:

Any XML validation

Proper error handling

Unit testing

Any additional (relevant) functionality

XML file will be provided on acceptance.
Skills:
Extensible Markup Language (XML),json,PHP programming language,unit testing
Category