This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

A port of the var_dump function of php to python.

Why on earth would you want this?!?!?

Imagine that you have to deploy something in php. You don’t have a choice. You HAVE to.

php_var_dump lets you do all your data processing and management in python. You can then convert your native python data structures into php code, which can then be saved as include fles for php.

Other python modules that can accomplish the general idea:
phpserialize
implements the PHP serialize/unserialize functions in python allows you to serialize a python data structure to PHP allows you to unserialize a php data structure to Python
simplejson
there are json parsers in php, which can read code you save

The main benefit of using the var_dump method, is that there is no overhead in loading/unloading/parsing/etc.

This method allows you to build a php include file that simply runs fast, and that can use multiple includes within the filesystem as a “database” like system. This way you don’t have to set up any databases, libraries, or whatever - you can just deploy PHP code without coding much in PHP.

Usage

>>> from php_var_dump import php_var_dump
>>> data= "Hello World"
>>> as_php = php_var_dump( 'var', data )
>>> print as_php
$var = 'Hello World';

You’d probable then want to save it…

data_string= “<?phpnn%snn?>” % as_php open(‘data.php’, ‘w’).write(data_string.encode( “utf-8” ))

Then just include that file in your php programs.

There’s also a php_as_block function, which does the trivial encapsulation as above.

Release History

Release History

0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
php_var_dump-0.2.tar.gz (2.6 kB) Copy SHA256 Checksum SHA256 Source Jul 17, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting