Skip to content

Instantly share code, notes, and snippets.

Avatar

Philip Norton philipnorton42

View GitHub Profile
View tictactoe.php
<?php
function renderGame($state, $activeCell, $player) {
$output = '';
$output .= 'Player:' . $player . PHP_EOL;
foreach ($state as $x => $line) {
$output .= '|';
foreach ($line as $y => $item) {
@philipnorton42
philipnorton42 / Config Merge
Last active Dec 2, 2018
A stand alone script that can be used to compare and copy configuration from two different sub-sites into a default configuration.
View Config Merge
<?php
require './vendor/autoload.php';
// Set up the directories needed.
$parentDirectory = 'config/siteone';
$siblingDirectory = 'config/sitetwo';
$destinationDirectory = 'config/default';
View Googl.php
<?php
/**
* Googl
*
* For more information on this file and how to use the class please visit
* http://www.hashbangcode.com/blog/googl-url-shortening-service-class-php-528.html
*
* PHP version 5
*