An open API service indexing awesome lists of open source software.

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.

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.