Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.php Subject: Re: parsing print_r() output with preg_match_all() Date: Thu, 07 Jan 2016 14:05:56 +0000 Organization: A noiseless patient Spider Lines: 22 Message-ID: <87poxdwkl7.fsf@bsb.me.uk> References: <568d3dcf$0$23748$e4fe514c@news.xs4all.nl> <87r3huzevd.fsf@bsb.me.uk> <568d6f9c$0$23759$e4fe514c@news.xs4all.nl> <87fuyaza37.fsf@bsb.me.uk> <568e2b23$1$23766$e4fe514c@news.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="17667"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/2IPJk59w72RNRYs9yzJ6t7wQBbV7QvmM=" Cancel-Lock: sha1:zRcXNFDB9+mRkXlah+SpWQDbbjo= sha1:osmm6s2kdHHWuEWCfIqm4s9YhhU= X-BSB-Auth: 1.e3ba232a2c38a3e4b002.20160107140556GMT.87poxdwkl7.fsf@bsb.me.uk Xref: csiph.com comp.lang.php:16142 Jerry Stuckle writes: > On 1/7/2016 4:03 AM, R.Wieser wrote: >> Jerry, >> >>> XML comes to mind. Human readable and made to >>> be easily parsed. >> >> Its also like shooting a cannon at a musquito. :-) > > Not really. It's exactly the type of job XML was designed for. And it > is easily created and read. These things are all relative. If, as I now suspect, a simple json_encode and json_decode call will do the job, XML is going to look over the top unless there's an xml_encode and xml_decode pair that can serialise standard PHP types (I'm not up-to-date with the latest PHP but I could not find such functions). -- Ben.