Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
혹시 벌써 PHP 5.3 클로져를 사용하는 코드가 있나 살펴보다가 (실망스럽게도 없더군요) 불필요한
create_function()
몇 개를 발견했습니다.new $class_name()
문법은 PHP 4에서는 지원되지 않았지만 PHP 5에서는 아무 문제가 없으므로 굳이 성능이 떨어지는 익명 함수를 사용하여 우회할 필요가 없습니다.zdate()
함수에서 한자리수 날짜 앞에 0을 붙여 두자리수로 바꾸는 데 사용하는 익명 함수는 훨씬 간단하고 성능도 좋은sprintf()
로 변경하였습니다.Validator
클래스에서 사용하는 익명 함수는 딱히 클로져로 바꾸기도 뭣해서 그냥 두었습니다.