diff --git a/php-lint/php-lint b/php-lint/php-lint
index afb52f2337d64b0c7e1b97b4daf665909e744329..c14a4f3fc19d134c1aa02ad0396eee672b40d423 100644
--- a/php-lint/php-lint
+++ b/php-lint/php-lint
@@ -51,8 +51,8 @@ for dir in "${LINT_DIRS[@]}"; do
     echo "Scanning directory ${dir} for extension ${ext}"
 
     # Scan current dir and ext and lint them
-    for f in $(find "${dir}" -type f -name "*${ext}"); do
-      OUTPUT=$(php -l $f 2>&1)
+    find "${dir}" -type f -name "*${ext}" -print0 | while IFS= read -r -d '' f; do
+      OUTPUT=$(php -l "$f" 2>&1)
       rc=$?
 
       if [[ $rc != 0 ]]; then # Non-zero exit code, print error and exit