Skip to main content

Read and write php arrays with python

Project description

php_whisperer

"I heard you help people with PHP problems?" "Truth is, I help PHP with people problems."

Convert PHP arrays to Python objects using read_php

from php_whisperer import read_php
read_php('/tmp/a_php_file.py', variable='data')

Result:

{'My Php Array': ['You', 'get', 'the', 'point']}

Convert Python lists and dictionaries to PHP using generate_php

from php_whisperer import generate_php
generate_php([1, 2, 3, 4])

Result:

array(1, 2, 3, 4);

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

php_whisperer-1.5-py3.8.egg (8.9 kB view hashes)

Uploaded Source

php_whisperer-1.5-py3.6.egg (8.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page