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. PHP is no Java. php는 자바합니다.
I don’t intend to be sarcastic. 나는이 냉소하지 않으려는합니다. In reality I sorely miss the comfort of Java in more ways than one. 자바의 테구요하고 안락한 나는 미스의 현실을 여러 방면으로합니다.
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 결여 수 있도록 여러 건설 - 자바의 결함을 검사 무료 코딩; 기능을 강력 타이핑, 검사 예외 (기본적으로), 그리고 부족 기타 유형 (변수를 어떤 데이터 유형에 걸릴 수있습니다). 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는 자바로 플랫폼에 독립적으로합니다. 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. 두합니다. 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. 귀하의 페이지 레이아웃 및 로깅을 브라우저를 망쳐 놨 추가적인 문제가 원인 모호해 수도있습니다 당신의 진정한 결함합니다. 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. 귀하의 코드를 쉽게 디버깅에 대한 로깅을 사용합니다.