All pastes #485261 Raw Edit

PHP Telekinesis

public php v1 · immutable
·published 2007-05-12 23:10 UTC
rendered paste body
<?php  echo 'Welcome to a Telekinesis test.' . "\n\n";  echo 'Written by Barry R. Dick <barryd.it@gmail.com>' . "\n\n";  echo "\t" . 'Lets clear our minds in 10 secs' . "\n\n";  sleep('10');  $result = array('round' => NULL, 'time' => array('start' => microtime(true), 'end' => NULL), 'bit' => NULL, 'true' => NULL, 'false' => NULL);  while(true) {    $result['round']++;    usleep(200000);    $result['bit'] = rand(0,1);    echo $result['bit'];    if ($result['round'] <= 2000) {      if ($result['bit'] == '0') {        $result['false']++;      }      else {        $result['true']++;      }    }    else {      break;    }  }  $result['time']['end'] = microtime(true);  echo "\n\n" . '1\'s: ' . $result['true'] . ' ( ' . round($result['true'] / $result['round'] * 100)  . ' % )' . "\n";  echo '0\'s: ' . $result['false'] . ' ( ' . round($result['false'] / $result['round'] * 100)  . ' % )' . "\n\n";  echo "Time: " .  $result['time']['end'] - $result['time']['start'];?>