Mistři v programování na #hovnokod

Jak rozpoznt, zda kod bezi pod linuxem nebo po widlemi :D

if (DIRECTORY_SEPARATOR == '/') {
    // linux
}

if (DIRECTORY_SEPARATOR == '\\') {
    // windows
}

Anonymous,


Anonymous,

$instance = $instanceAbbreviation !== null ? $instanceAbbreviation : ($instanceLabel !== null ? $instanceLabel : null);

Anonymous,

Odchytavat vyjimky je treba vsude , I tam kde nejsou.

            try
            {
  
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }

Anonymous,

Kazdy si nieco prihpodil...

if ($not_send_si != $check_status["not_send_si"] || $send_si != $check_status["send_si"] || $sOldDeliveryMalaysia != $sNewDeliveryMalaysia || count($update_info_payment_bankslip) > 0 || $statusChanged || $comments !== '' || $notices != $check_status['notices'] || ($check_status['reminder_hold_date'] ? $check_status['reminder_hold_date'] : 'null') != $reminder_hold_date || ($check_status['send_not_earlier'] ? $check_status['send_not_earlier'] : 'null') != $send_not_earlier || ($check_status['report_lock_date'] ? true : false) != $report_lock || ($check_status['send_partially'] ? true : false) != $send_partially || $add_to_db != $check_status['add_to_db'] || $order_by_phone != $check_status['order_by_phone'] || $invoice_by_tradedoubler != $check_status['invoice_by_partner'] || $port_payer != $check_status['port_payer'] || array_sum($update_info_payment_code) != $check_status['paid_amount']) {...}

Anonymous,