@ 2014-05-22T14:12:01Z <?php
function ifAllElseFails($type, $msg, $file, $line, $context) {
echo ( "Ah what the hell. Doesn't work. But the meaning of life is 42. And chickens or eggs? Nah. It was a mutant gecko." );
}
error_reporting(E_ALL);
set_error_handler("ifAllElseFails");
class TheMeaningOfLif {
var $came_first;
var $the_answer;
var $aeons;
var $doubt;
var $uncertainty;
function TheMeaningOfLif() {
$this->aeons = "150";
$this->doubt = ceil ( 13.3 * $this->Life() );
$this->uncertainty = floor ( 132 / $this->theUniverse() );
$this->the_answer[whatisthemeaning] = $this->andEverything();
$this->came_first = array ( "The Chicken", "The Egg" );
$this->came_first = arsort ( $this->came_first, SORT_NUMERIC );
$this->the_answer[whichcamefirst] = whichCameFirst($this->came_first);
}
function Life () {
for ($x = 1; $x <= $this->aeons; $x++) {
$r = 1 / ($x * $x);
$s += $r;
}
$var = sqrt(6 * $s);
return ( $var );
}
function theUniverse () {
$dw = 1;
$l = 1;
$up = 2;
$var = 4;
for ($x = 2; $x <= $var; $x++) {
$l++;
if ($l % 2 != 0)
$up = $x + 1;
elseif ($l % 2 == 0)
$dw += 2;
$var = $var * ($up/$dw);
if ($l == 4)
$l = 0;
}
return ( $var );
}
function andEverything () {
$carry = $this->doubt & $this->uncertainty;
do {
$carry = $carry << 1;
$num1 = $this->doubt ^ $this->uncertainty;
$sum = $this->doubt ^ $carry;
$num2 = $carry;
$carry = $this->doubt & $this->uncertainty;
} while($carry != 0);
return ( $carry );
}
function whichCameFirst(&$arr) {
function reverse_splice(&$splice, $i1, $i2) {
if($i1>$i2) {
$swp = $i1; $i1 = $i2; $i2 = $swp;
}
for($k=$i2;$k>=$i1;$k--){
$tmpArr[] = $splice[$k];
}
for($k=0;$k<count($tmpArr);$k++) {
$splice[$i1+$k] = $tmpArr[$k];
}
}
$i = count($arr);
mt_srand((double)microtime()*1000000);
while($i>0) {
--$i;
$j = @mt_rand(0, $i);
if($i!=$j) {
reverse_splice($arr, $i, $j);
}
}
}
function theGuruSays () {
return ( $this->the_answer );
}
}
$TheMeaningOfLif = new TheMeaningOfLif;
$the_answer = $TheMeaningOfLif->theGuruSays();
$var = $$the_answer[0];
$var = $$the_answer[1];
echo ( "The meaning of life is " . $whatisthemeaning . "<br>");
echo ( "Which came first? " . $whichcamefirst . " of course!");
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 5.4.28 0.010 2.487 19.05 5.4.27 0.010 2.490 18.93 5.4.26 0.003 2.493 19.19 5.4.25 0.003 2.493 19.05 5.4.24 0.010 2.487 19.03 5.4.23 0.013 2.483 19.04 5.4.22 0.010 2.487 19.05 5.4.21 0.007 2.490 18.95 5.4.20 0.007 2.490 18.83 5.4.19 0.010 2.490 18.94 5.4.18 0.013 2.483 19.25 5.4.17 0.007 2.490 19.00 5.4.16 0.010 2.487 19.00 5.4.15 0.010 2.487 19.25 5.4.14 0.003 2.493 16.68 5.4.13 0.017 2.480 16.44 5.4.12 0.010 2.487 16.34 5.4.11 0.017 2.480 16.58 5.4.10 0.007 2.490 16.59 5.4.9 0.003 2.493 16.46 5.4.8 0.010 2.487 16.55 5.4.7 0.007 2.490 16.44 5.4.6 0.010 2.487 16.54 5.4.5 0.003 2.493 16.44 5.4.4 0.010 2.487 16.53 5.4.3 0.003 2.493 16.37 5.4.2 0.013 2.483 16.34 5.4.1 0.007 2.490 16.41 5.4.0 0.007 2.490 15.78 5.3.28 0.003 2.493 14.55 5.3.27 0.007 2.490 14.56 5.3.26 0.007 2.490 14.61 5.3.25 0.007 2.490 14.39 5.3.24 0.007 2.490 14.47 5.3.23 0.007 2.490 14.40 5.3.22 0.007 2.490 14.43 5.3.21 0.013 2.483 14.40 5.3.20 0.007 2.490 14.37 5.3.19 0.003 2.493 14.45 5.3.18 0.013 2.487 14.43 5.3.17 0.000 2.497 14.56 5.3.16 0.013 2.483 14.44 5.3.15 0.403 2.093 14.51 5.3.14 0.010 2.487 14.48 5.3.13 0.007 2.490 14.41 5.3.12 0.007 2.490 14.32 5.3.11 0.010 2.487 14.34 5.3.10 0.013 2.483 13.98 5.3.9 0.000 2.497 13.83 5.3.8 0.003 2.493 13.80 5.3.7 0.300 2.197 13.96 5.3.6 0.010 2.487 13.75 5.3.5 0.017 2.480 13.77 5.3.4 0.010 2.487 13.68 5.3.3 0.010 2.487 13.71 5.3.2 0.013 2.487 13.48 5.3.1 0.003 2.493 13.46 5.3.0 0.357 2.137 13.53
preferences:dark mode live preview
35.3 ms | 401 KiB | 5 Q