Delphi and PHP : problem returning parameter to script

From: Date: Wed, 23 May 2001 14:19:06 +0000
Subject: Delphi and PHP : problem returning parameter to script
Groups: php.general 
Request: Send a blank email to php-general+get-54063@lists.php.net to get a copy of this message
Hi, I' have implemented in Delphi part of the ZEND API for extensions based on the example in the document in http://www.zend.com/apidoc/p2.php. My problem is that I'm not getting back my value (2) in my php script : ... <? $param = 2; $return = first_module($param); print("We sent \"$param\" and got \"$return\""); ?> ... this script prints in the browser : We sent "2" and got "" , but the last line (message box) of my fisrt_module() procedure shows me that the returning value is OK. WHAT'S WRONG ? DELPHI SOURCE CODE FOR first_module() procedure zend_if_first_module(ParamCount : integer; return_value : Pzval; this_ptr : Pzval; return_value_used : integer; executor_globals : pointer); var parameter : PPzval ; begin if (ParamCount <> 1) or (zend_get_parameters_ex(1, @parameter) <> SUCCESS) then begin wrong_param_count; end; convert_to_long(parameter^); zval(return_value^).typeZ := IS_LONG; zval(return_value^).value.lval := (parameter^^).value.lval; // this last line gives me the good result : 2 showmessage(inttostr((return_value^).value.lval)); // return_value_used := 0; end;

« previous php.general (#54063) next »