PHP Classes

File: example1.php

Recommend this page to a friend!
  Classes of zinsou A.A.E.Mo´se  >  PHP Math Progression Handler  >  example1.php  >  Download  
File: example1.php
Role: Example script
Content type: text/plain
Description: example script
Class: PHP Math Progression Handler
Detect and generate many types of number sequences
Author: By
Last change:
Date: 4 years ago
Size: 819 bytes
 

Contents

Class file image Download
<?php
require_once('progression.class.php');
require_once(
'detector.interface.php');
// progression::include_native_detectors();
// progression::use_bcmath();
echo '<pre>';
$progression=progression(9,8,7,6,5,4,3,2,1,0);
$progression->print_r();

progression::add_native_detectors($progression);

var_dump($progression->detect_type());

var_dump($progression->getNext(false));//get but not pushed

var_dump($progression->getNth(100000));

var_dump($progression->sum());

var_dump($progression->min());


var_dump($progression->max());

var_dump($progression->avg());

$progression->buildToNth(25);

$progression->print_r();

$harmonic=$progression->inverse();

progression::add_native_detectors($harmonic);

$harmonic->print_r();

var_dump($harmonic->detect_type());

echo
'</pre>';

For more information send a message to info at phpclasses dot org.