The converter strips PHP scaffolding: <?php tags, variable assignments ($var =), and trailing semicolons.
It splits by top-level commas (not inside nested brackets or strings) to isolate each key-value pair or array element.
=> separators turn associative arrays into JSON objects. Items without => become JSON array elements.
PHP types map to JSON: true/false/null stay the same, PHP strings become JSON strings, PHP numbers become JSON numbers.