Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yanbrasiliano/code-challenge-php-freela
https://github.com/yanbrasiliano/code-challenge-php-freela
Last synced: about 4 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/yanbrasiliano/code-challenge-php-freela
- Owner: yanbrasiliano
- License: mit
- Created: 2024-05-06T17:22:06.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-05-06T17:48:27.000Z (6 months ago)
- Last Synced: 2024-05-06T19:57:52.467Z (6 months ago)
- Language: PHP
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP Pattern Printer Code Challenge
The challenge is to print an "X" and a "cross" on the command line and this project includes two PHP scripts that print "cross" and "X" patterns in the console for a freelance code challenge. The scripts are designed to be run in a Docker container to avoid the need to install PHP on your local machine.
## Prerequisites
- Docker
## Usage Instructions
1. Build the Docker image:
```bash
docker build -t php-pattern-printer .
```2. Run the container to print the cross:
```bash
docker run --rm php-pattern-printer php printCross.php
```3. Run the container to print the "X":
```bash
docker run --rm php-pattern-printer php printX.php
```These commands allow you to view the output of the scripts directly in your console. Docker takes care of all the environment setup needed to run the PHP scripts.