نمایش پست تنها
  #1  
قدیمی 05-17-2013
دانه کولانه آواتار ها
دانه کولانه دانه کولانه آنلاین نیست.
    مدیر کل سایت
        
کوروش نعلینی
 
تاریخ عضویت: Jun 2007
محل سکونت: کرمانشاه
نوشته ها: 12,700
سپاسها: : 1,382

7,486 سپاس در 1,899 نوشته ایشان در یکماه اخیر
دانه کولانه به Yahoo ارسال پیام
پیش فرض اجتناب از 10 اشتباه ناخواسته در زبان پی اچ پی Are You Making These 10 PHP Mistakes?

اجتناب از 10 اشتباه ناخواسته در زبان پی اچ پی Are You Making These 10 PHP Mistakes




One of the best things about PHP is that it’s a great language to just “dive into”, thanks to its wide-ranging popularity. Anyone with the ability to hit “Search” on Google can quickly create a program. However, this also lends to a major criticism of PHP: it’s almost too easy to find and reproduce bad code.
Here are 10 PHP mistakes that any programmer, regardless of skill level, might make at any given time. Some of the mistakes are very basic, but trip up even the best PHP programmer. Other mistakes are hard to spot (even with strict error reporting). But all of these mistakes have one thing in common: They’re easy to avoid



Take the time and make sure that your PHP is secure, clean and running smoothly by checking your site for these common PHP blunders.
------------------------------------------------------
اشتباهات رایجی وجود دارند که گاها برنامه نویس های مبتدی حواسشون نیست و برنامه شون دچار اشکال میشه
که بعضا تقصیر خود برنامه نویس هم نیست بنابراین بهتره که به بعضی از رایج تریناش اشاره بشه



مثلا شما فرض کنید که توی پی اچ پی نسخه 4 و 5 در مورد کارکرد تابع

empty()

تفاوت هست مثلا :
کد PHP:
class Foo {
 function 
Foo() {
 }
 function 
bar() {
 }
 }
 
$foo = new Foo();
 if (empty(
$foo)) {
 
// this code executes in PHP4 (but NOT in PHP5)!
 

__________________
مرا سر نهان گر شود زير سنگ -- از آن به كه نامم بر آيد به ننگ
به نام نكو گر بميــرم رواست -- مرا نام بايد كه تن مرگ راست



پاسخ با نقل قول
جای تبلیغات شما اینجا خالیست با ما تماس بگیرید