https://github.com/yanbrasiliano/code-challenge-php-freela
This project includes two PHP scripts designed for a freelance code challenge to print "X" and "cross" patterns on the command line. The scripts are executed within a Docker container, eliminating the need to install PHP locally.
https://github.com/yanbrasiliano/code-challenge-php-freela
php php8 script
Last synced: 5 months ago
JSON representation
This project includes two PHP scripts designed for a freelance code challenge to print "X" and "cross" patterns on the command line. The scripts are executed within a Docker container, eliminating the need to install PHP locally.
- Host: GitHub
- URL: https://github.com/yanbrasiliano/code-challenge-php-freela
- Owner: yanbrasiliano
- License: mit
- Created: 2024-05-06T17:22:06.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-06T17:48:27.000Z (about 1 year ago)
- Last Synced: 2024-12-28T17:31:19.706Z (7 months ago)
- Topics: php, php8, script
- Language: PHP
- Homepage:
- 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.