the function is static, no need to export its prototype
fix compile warnings
fix crash happening when going through JudySL with foreach
massive patch fixing memory leaks and segfaults

mostly when using STRING_TO_MIXED arrays and foreach
spaces -> tabs, that's the standard