INI to PHP Array Converter
Parse INI files into nested PHP array literals with short or long syntax and optional type coercion.
Convert INI files to PHP arrays
Laravel, WordPress, and legacy PHP apps often read INI-style configuration. Paste INI text to generate nested PHP array literals with short or long syntax, ready to paste into bootstrap code or tests.
Pair with the INI to JSON Converter for JSON pipelines, or the JSON to PHP Array Converter when your source is already JSON.
Frequently Asked Questions
How are INI sections mapped?
Bracketed section headers become top-level array keys. Keys inside a section are nested under that section name, matching common PHP configuration arrays.
What does type coercion do?
When enabled, numeric strings become numbers and true/false strings become PHP booleans. Other values remain quoted strings.
Can I omit the variable assignment?
Yes. Disable "Wrap in PHP variable assignment" to copy only the array literal.