<?php
class testCase {
private $stores;
public function doFunction($items = array(), $out ) {
foreach($items as $num => $val) {
if($num%2 == 0) {
$out = $val;
} else {
$out = strtoupper($val);
}
/* WHY DO ALL OF THE ABOVE IF WE'RE GOING TO OVERRIDE IT WITH THIS? */
//$out = "<br />";
}
return $this->store = $out;
}
/* PRIVATE, SO NOT ACCESSIBLE! FIX: make public */
private function unFunction($items = '', $out = array()) {
$items = implode("<br >", $items, -1);
foreach($items as $num => $val) {
if($num%2 != 0) {
$out[$num] = $val;
} else {
$out[$num] = strtlower($val);
}
}
echo $out;
}
}
$test = new testCase();
//echo $test -> doFunction(array_merge(range(0,25), range('a','z'))) . "<hr />";
//print_r($test -> unFunction($test->store));
echo $test->doFunction(array_merge(range(0,25)), "test");
array_merge(range(0,25), range('a','z'));
/*
seems like the two functions are about: doing something and undoing that.
*/
?>
preferences:
50.11 ms | 402 KiB | 5 Q