PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Arturs Sosins   Word Solver   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Simple usage example
Class: Word Solver
Generate words or anagrams from specified rules
Author: By
Last change:
Date: 12 years ago
Size: 1,408 bytes


Class file image Download
 * This script is developed by Arturs Sosins aka ar2rsawseen,
 * Feel free to distribute and modify code, but keep reference to its creator
 * Word Solver class can generate words or anagrams using provided rules, for example,
 * possible letters, placement of specific letter, which letters should be used together,
 * or using any character from specified alphabet.
 * This class can be used to generate solutions to scrabble, crosswords, anagrams
 * and other word games.
 * For more information, examples and online documentation visit:

//it can take some time
$time = microtime();
$time = explode(' ', $time);
$start = $time[1] + $time[0];

//declaring class instance
$ws = new word_solver();

//use all provided letters

//setting rules for words

//getting results
$arr = $ws->get_words();

$time = microtime();
$time = explode(' ', $time);
$end = $time[1] + $time[0];
$total_time = round(($end - $start), 4);
'<p>PHP execution: '.$total_time.' seconds.</p>';