php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #58369 import/export of variables
Submitted: 2008-10-07 02:43 UTC Modified: 2016-06-21 18:29 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: christoph dot hintermueller at psi dot ch Assigned: jon (profile)
Status: Wont fix Package: python (PECL)
PHP Version: 5.1.2 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-10-07 02:43 UTC] christoph dot hintermueller at psi dot ch
Description:
------------
How far are the efforts on implementing shared import/export of 
variables. Half a year ago when i sent a patch which reactivated 
the code which implements a copy on import/export 
mechanisms for variables which are used by both Python and 
PHP. I do agree that is not the best solution as it consumes the 
memory twice and does not allow to track if a variable is 
reexported/reimported from/to python. At the moment all 
variables which are not boolean, integger, float or string seem to 
be converted to a string which can be brought back to  life by 
means of eval command. Which is an even worse approach then 
the copy on import/export. 
 
Thus would you support the following following 3 Step apporach 
to get from the current situation where only simply types are 
properly shared to a full share on import/export approach. 
1) Officially reactivate the copy on export/import mechanism and 
clearly mark it as temporary solution, or at least provide it as non 
supported non official patch. Whichcan be downloaded separatly 
from the PECL page but may not be usable with newer PiP 
versions and deffinitly not with those using step 2 for 
importing/exporting variables to/from Python. 
2) Implement wrapper classes properly mapping PHP zvalues to 
python classes behaving like the python types coresponding to 
the PHP type. (wrap on import) 
2b) Implement share on export by copying the python variable to 
a zvalue and replacing the original python value by its reimported 
PHP counterpart. 
3) Implement ture share on export: would require how to make a 
python object appear as zvalue which behaves like native PHP 
zvalues. 
 
Is the above approach possible at all how difficult would it be 
and how power full would it be?  
 
Xris 
 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-09-04 06:52 UTC] phpnet at jigsoft dot co dot za
We have moved this issue here http://goo.gl/ce34A our new home on github, You are 
invited: come fetch a fork and lets continue discussions there.
 [2016-06-20 03:43 UTC] jon@php.net
-Status: Assigned +Status: Wont fix
 [2016-06-20 03:43 UTC] jon@php.net
I'm no longer actively developed the python package.
 [2016-06-21 18:29 UTC] cmb@php.net
> I'm no longer actively developed the python package.

Can you please document that on the PECL page, Jon?
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Jan 22 06:01:23 2020 UTC