title: How to pass PHP Object to Python and Vice Versa
body: <p>I am attempting to develop a functionality that involves 3 programs. </p>
  
  <p>Program A (Python): Places a GET request to Program B.</p>
  
  <p>Program B (PHP): Processes the request from Program A and gives it to Program C.</p>
  
  <p>Program C (Python): Processes the data from Program B and returns an object to Program B.</p>
  
  <p>In the end, the execution flow I want is as follows:</p>
  
  <blockquote>
    <p>A (data) -> B (data) -> C (data) -> C (object) -> B (object) -> A
    (object)</p>
  </blockquote>
  
  <p>So how can I "transfer/pass" a Python/PHP object between the two languages? </p>
  
  <p>Does it involve some sort of object serialization?</p>
  
  <p><strong>UPDATE:</strong>
  To be more specific, the data that I want to transfer is a class object created in python. i.e.:</p>
  
  <pre><code>class Foo:
  def __init__(self):
      data = 42
      name = 'Bar'
  </code></pre>