title: Sharing memory between Java and PHP?
body: <p>Can someone provide me links or snippets where a PHP process writes to memory and a Java process reads from the shared memory?</p>
  
  <p>Thanks for the wonderful answers.</p>
  
  <p>Edited question :
  Suppose i create a shared memory in php like this</p>
  
  <pre><code>&lt;?php
  $shm_key = ftok(__FILE__, 't');
  $shm_id = shmop_open($shm_key, "c", 0644, 100);
  $shm_bytes_written = shmop_write($shm_id, $my_string, 0);
  ?&gt;
  </code></pre>
  
  <p>Now is there some method by which i can pass the value of <code>$shm_id</code> and then read from it in java.</p>