Mistři v programování na #hovnokod

      $requestParams = array('TOKEN' => $token);
    	$response = $paypal->GetExpressCheckoutDetails($requestParams);
      $payerId=$response["PAYERID"];//Payer id returned by paypal
    	
      $requestParams = array();
      
      foreach($response as $key => $response_vypis)
        {
          $requestParams[$key] = $response_vypis;
        }

Only VanS,

Anče, Kubo, hajnej! True je málo true-ovatý a false je málo false-ovatý!

        if ($response['status'] == 'ERROR') {
            return false;
        }
        return true;

Anonymous,

Proč ne...

function pravidla() {
	$href = "";
	$value = RequestValue('forumtopicid');
	if (!isset($value)) $href = "<a href='http://www.xxxxxxxx.cz/xxxxxx-xxxxxxx.html'>Pravidla diskuse</a>";
	return $href;
}

Michal,

Objeveno v jednom e-shopu.

if((int)$val === 0){
	$val = (int)$val;
}else if((int)$val > 0){
	$val = (int)$val . ".00 Kč";
}
if($val < 1){
	die("Chyba: Nebyla nastavena cena!");
}

Anonymous,

Takový klasický setter :)

public function setStatus($status)
{
    if ($this->status == 'pending' && $status != 'pending') {

        $this->status = $status;
        $this->decided = new \DateTime();
        return true;
    }

    return false;
}

Anonymous,