Three lessons I learned the hard way while developing a PHP based product, 3つの教訓を学んだのハードな方法を開発するPHPのベースの製品、 Translator Plugin Pro for WordPress翻訳者のWordPressの差込式のプロ .です。 Let me know if you find them useful.させてかどうかも有益です。

1. 1 。 PHP is no Java. PHPはJavaなしです。
I don’t intend to be sarcastic.私は皮肉な意図していない。 In reality I sorely miss the comfort of Java in more ways than one.痛んで現実に私のミスで他の快適度のJavaよりも1つの方法があります。
PHP lacks several built-in checks of Java to ensure defect free coding; features like strong typing, checked exceptions (by default), and lack of variant types (variable which can take on any data types). PHPの欠けていくつかのビルトインのチェック無料の欠陥を確保するためのJavaコーディング;特徴のような強い型付け、チェック例外(デフォルト) 、およびその他の種類の欠如(変数のことはすべてのデータの種類) 。 So you have to be extra careful in PHP to write high quality code.余分な注意をしなければならないのでPHPの高品質なコードを書いています。 Also PHP is not as platform independent as Java. PHPのではないとしても、プラットフォームに依存しないJavaです。 What I mean is that PHP has several platform dependent capabilities or lack thereof which makes it harder to make it work across platforms.私が言いたいのはどのようないくつかのプラットフォームに依存する機能は、 PHPが不足したことや困難にすることを越えて働くのプラットフォームを作ることです。

2. 2 。 You best friend for PHP development is:あなたのベストフレンドPHPの開発は:
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);にerror_reporting ( e_error |のE_WARNING | e_parse | E_NOTICEが) ;

This little piece of code thrown in at the top of your file is arguably the best PHP debugging tool you can find.この小さな作品のコードをスローにして、ファイルの上部には、おそらく最高のPHPのデバッグツールを見つけることができます。 All your errors, warnings and even notices are displayed on your browser for you to correct.すべてのエラー、警告、お使いのブラウザに表示されても注意事項を修正するためにします。

3. 3 。 Use file based logging instead of logging on browser.ファイルベースのログの代わりに使用するブラウザにログオンしています。 Logging on browser messes up your page layout and can even cause additional problems thereby obscuring your true defect.ブラウザmessesアップにログオンし、お客様のページのレイアウトやその他の問題の原因が覆い隠すこともできますして真の欠陥です。 The best and unobtrusive way to log is to a file.控えめな方法をログに記録するベストとは、ファイルを参照して下さい。 You can try my technique for simple単純な私のテクニックを紹介しようとすることができます。 php logging PHPのログ .です。 Use logging for easy debugging of your code.のログを使用してコードのデバッグを容易です。