diff --git a/.gitignore b/.gitignore
index 06ae224..1d9c846 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,10 @@
__history/
-
__recovery/
-*.dcu
\ No newline at end of file
+*.dcu
+*.local
+*.exe
+*.identcache
+*.stat
+*.res
+*.~pas
+*.~dcu
\ No newline at end of file
diff --git a/PHP4DELPHI.HLP b/Documentation/PHP4DELPHI.HLP
similarity index 100%
rename from PHP4DELPHI.HLP
rename to Documentation/PHP4DELPHI.HLP
diff --git a/php4delphi.chm b/Documentation/php4delphi.chm
similarity index 100%
rename from php4delphi.chm
rename to Documentation/php4delphi.chm
diff --git a/php4delphi.chw b/Documentation/php4delphi.chw
similarity index 100%
rename from php4delphi.chw
rename to Documentation/php4delphi.chw
diff --git a/php4delphi.cnt b/Documentation/php4delphi.cnt
similarity index 100%
rename from php4delphi.cnt
rename to Documentation/php4delphi.cnt
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..216be78
--- /dev/null
+++ b/README.md
@@ -0,0 +1,122 @@
+# PHP4Delphi library
+
+PHP - Delphi interface and PHP extensions development framework
+
+{ $Id: readme.txt,v 7.4 07/2020 delphi32 Exp $ }
+
+PHP4Delphi is a Delphi interface to PHP for Delphi {2009, ..., Rio}
+
+PHP4Delphi consists of 3 big subprojects:
+
+1. PHP scripting (using PHP as a scripting language in Delphi applications)
+PHP4Delphi allows to execute the PHP scripts within the Delphi program using
+TpsvPHP component directly without a WebServer.
+It is a PHP extension that enables you to write client-side GUI applications.
+One of the goals behind it was to prove that PHP is a capable general-purpose scripting
+language that is suited for more than just Web applications.
+It is used by "Delphi for PHP" from CodeGear.
+
+2. PHP extensions development framework (using Delphi to extend PHP functionality)
+Visual Development Framework gives possibility to create custom PHP
+Extensions using Delphi.
+PHP extension, in the most basic of terms, is a set of instructions that is
+designed to add functionality to PHP.
+
+3. PHP4Applications (integrate PHP in any application)
+Supports C, C++, Visual Basic, VBA, C#, Delphi, Delphi .NET, Visual Basic .NET etc.
+
+
+More detail information available in php4Delphi manual php4Delphi.pdf
+
+
+This is a source-only release of php4Delphi.
+It includes design-time and run-time packages for Delphi 2009 through Delphi Rio
+
+# Features
+* Compatible with Delphi 2009, 10.1 Seattle, 10.2 Berlin, 10.3 Tokyo
+* PHP 5.0.0 - 5.6.x support
+* Unicode support ( php 5.5 & up )
+ Version history
+
+# Prerequisites
+Before using php4Delphi library:
+
+If you have no PHP installed, you have to download and
+install PHP separately. It is not included in the package.
+You can download the latest version of PHP from
+https://php.net/downloads/
+or
+https://windows.php.net/downloads/releases/archives/
+
+ZEND API documentation available at http://www.zend.com
+PHP API documentation available at http://www.php.net
+
+You need to ensure that the dlls which php uses can be found.
+php5ts.dll is always used. If you are using any php extension dlls then you
+will need those as well.
+To make sure that the dlls can be found, you can either copy them to the
+system directory (e.g. winnt/system32 or windows/system).
+
+Copy the file, php.ini-release to your php installation path
+and rename it to php.ini. By default php is located in
+%WINDOWS% or %SYSTEMROOT% directory:
+c:\windows for Windows
+c:\winnt or c:\winnt40 for NT/2000/XP servers
+
+# Building
+Uninstall previous installed version of php4Delphi Library from Delphi IDE.
+Remove previously compiled php4Delphi packages from your disk.
+
+Select PHP version you are going to use. php4Delphi supports PHP 5.x,
+but not at the same time - this behaviour is legacy, and therefore will be removed.
+You have to compile php4Delphi for selected target version of PHP.
+
+a) Edit PHPver.INC file.
+ Specify PHPver constant:
+ PHPver = 05604; // php 5.6.4 -> 05 6 04
+b) Edit PHP.INC file.
+ Remove dot from preferred features
+
+Use "File\Open..." menu item of Delphi IDE to open php4Delphi group
+choose suitable group from /package directory;
+In "Package..." window select php4DelphiR,
+click "Compile" button to compile BPL.
+Put compiled BPL file into directory that is accessible through the search PATH
+("PATH" environment variable;
+for example, in the Windows\System directory).
+
+After compiling php4Delphi run-time package you must install design-time
+package into the IDE.
+
+In "Package..." window select php4DelphiD,
+click "Compile" button to compile the package
+and then click "Install" button to install php4Delphi components.
+
+# Credits
+
+Since this is a freeware you are strongly encouraged to look
+at the source code and improve on the components if you want to.
+Of course we would appreciate if you create pull request with the
+changes and bug fixes you have made.
+
+For more information on the PHP Group and the PHP project,
+please see .
+
+
+PHP4Delphi forum
+http://sourceforge.net/forum/forum.php?forum_id=324242
+
+Authors:
+Serhiy Perevoznyk
+Belgium
+serge_perevoznyk@hotmail.com
+http://users.telenet.be/ws36637
+http://delphi32.blogspot.com
+
+Lew Zienin
+Ukraine
+levzenin@pm.me
+
+Nikita Ganzikov
+Ukraine
+pig-l@mail.ru
diff --git a/Source/Clear.bat b/Source/Clear.bat
index 235952d..a1358fa 100644
--- a/Source/Clear.bat
+++ b/Source/Clear.bat
@@ -1 +1,8 @@
-del *.dcu
+del /f php4delphi.dcu
+del /f phpFunctions.dcu
+del /f DelphiFunctions.dcu
+del /f PHPCommon.dcu
+del /f PHPAPI.dcu
+del /f ZENDAPI.dcu
+del /f PHPTypes.dcu
+del /f ZendTypes.dcu
diff --git a/Source/ConverterBackup/php4DelphiR2010.dpk b/Source/ConverterBackup/php4DelphiR2010.dpk
new file mode 100644
index 0000000..8ffc056
--- /dev/null
+++ b/Source/ConverterBackup/php4DelphiR2010.dpk
@@ -0,0 +1,50 @@
+package php4DelphiR2010;
+
+{$R *.res}
+{$R 'php4delphi.dcr'}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'php4Delphi (run-rime)'}
+{$RUNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl;
+
+contains
+ ZENDAPI in 'ZENDAPI.pas',
+ DelphiFunctions in 'DelphiFunctions.pas',
+ php4delphi in 'php4delphi.pas',
+ PHPAPI in 'PHPAPI.pas',
+ phpModules in 'phpModules.pas',
+ PHPLibrary in 'PHPLibrary.pas',
+ PHPFunctions in 'PHPFunctions.pas',
+ PHPTypes in 'PHPTypes.pas',
+ ZENDTypes in 'ZENDTypes.pas',
+ phpClass in 'phpClass.pas',
+ PHPCommon in 'PHPCommon.pas';
+
+end.
diff --git a/Source/ConverterBackup/php4DelphiR2010.dproj b/Source/ConverterBackup/php4DelphiR2010.dproj
new file mode 100644
index 0000000..113eeaf
--- /dev/null
+++ b/Source/ConverterBackup/php4DelphiR2010.dproj
@@ -0,0 +1,122 @@
+
+
+ {DB360964-FCA5-4943-AD27-13C4B2BC0549}
+ php4DelphiR2010.dpk
+ Debug
+ DCC32
+ 12.0
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ ..\..\..\..\..\..\Public\Documents\RAD Studio\6.0\Bpl\php4DelphiR2010.bpl
+ 00400000
+ true
+ x86
+ php4Delphi (run-rime)
+ true
+ false
+ false
+ true
+ true
+ false
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiR2010.dpk
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Source/ConverterBackup/php4DelphiR2010.dproj.2007 b/Source/ConverterBackup/php4DelphiR2010.dproj.2007
new file mode 100644
index 0000000..3d746af
--- /dev/null
+++ b/Source/ConverterBackup/php4DelphiR2010.dproj.2007
@@ -0,0 +1,120 @@
+
+
+ {DB360964-FCA5-4943-AD27-13C4B2BC0549}
+ php4DelphiR2010.dpk
+ Debug
+ DCC32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ ..\..\..\..\..\..\Public\Documents\RAD Studio\6.0\Bpl\php4DelphiR2010.bpl
+ 00400000
+ true
+ x86
+ php4Delphi (run-rime)
+ true
+ false
+ false
+ true
+ true
+ false
+ false
+ false
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ false
+
+
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiR2010.dpk
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ 12
+
+
diff --git a/Source/DelphiFunctions.pas b/Source/DelphiFunctions.pas
index c5f24e3..23892b4 100644
--- a/Source/DelphiFunctions.pas
+++ b/Source/DelphiFunctions.pas
@@ -6,6 +6,7 @@
{ Serhiy Perevoznyk }
{ serge_perevoznyk@hotmail.com }
{ http://users.telenet.be/ws36637 }
+{ http://users.chello.be/ws36637 }
{*******************************************************}
{$I PHP.INC}
@@ -15,10 +16,9 @@
interface
uses
+ Dialogs,
SysUtils, Classes,
- Controls,
- ZendTypes, ZendAPI, PHPTypes, PHPAPI, Dialogs, typinfo,
- Forms, stdctrls;
+ ZendTypes, ZendAPI, PHPTypes, PHPAPI, typinfo;
{$ifdef fpc}
{$mode delphi}
@@ -28,131 +28,27 @@ interface
author_class_entry : Tzend_class_entry;
delphi_object_entry : TZend_class_entry;
-
- object_functions : array[0..2] of zend_function_entry;
- author_functions : array[0..2] of zend_function_entry;
-
DelphiObject : pzend_class_entry;
ce : pzend_class_entry;
-
- {$IFDEF PHP5}
- DelphiObjectHandlers : zend_object_handlers;
- {$ENDIF}
+ DelphiObjectHandlers : _zend_object_handlers;
procedure RegisterInternalClasses(p : pointer);
-
-//proto string delphi_get_system_directory(void)
-{$IFDEF PHP510}
-procedure delphi_get_system_directory(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_get_system_directory(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-
//proto string delphi_str_date(void)
-{$IFDEF PHP510}
procedure delphi_str_date(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_str_date(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
//proto float delphi_date(void)
-{$IFDEF PHP510}
procedure delphi_date(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_date(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-
-//proto string delphi_extract_file_dir(string source)
-{$IFDEF PHP510}
-procedure delphi_extract_file_dir(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_extract_file_dir(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-
-//proto string delphi_extract_file_drive(string source)
-{$IFDEF PHP510}
-procedure delphi_extract_file_drive(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_extract_file_drive(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-
-//proto string delphi_extract_file_name(string source)
-{$IFDEF PHP510}
-procedure delphi_extract_file_name(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_extract_file_name(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-
-//proto string delphi_extract_file_ext(string source)
-{$IFDEF PHP510}
-procedure delphi_extract_file_ext(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_extract_file_ext(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-
-//proto void delphi_show_message(string message)
-{$IFDEF PHP510}
-procedure delphi_show_message(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_show_message(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
//proto string delphi_input_box(string caption, string prompt, string default)
-{$IFDEF PHP510}
procedure delphi_input_box(ht : integer; return_value : pzval; return_value_ptr : ppzval;
this_ptr : pzval; return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_input_box(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-{$IFDEF PHP510}
-procedure register_delphi_object(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure register_delphi_object(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-
-{$IFDEF PHP5}
procedure delphi_get_author(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_get_author(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-{$IFDEF PHP5}
-procedure delphi_is_uc(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_is_uc(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-{$IFDEF PHP510}
-procedure register_delphi_component(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure register_delphi_component(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
const
SimpleProps = [tkInteger, tkChar, tkEnumeration, tkFloat,
@@ -160,114 +56,22 @@ procedure register_delphi_component(ht : integer; return_value : pzval; this_ptr
implementation
-
-
-//proto string delphi_get_system_directory(void)
-{$IFDEF PHP510}
-procedure delphi_get_system_directory(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_get_system_directory(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-begin
-
-end;
-
//proto string delphi_str_date(void)
-{$IFDEF PHP510}
procedure delphi_str_date(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_str_date(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
begin
ZVAL_STRING(return_value, zend_pchar(DateToStr(Date)), true);
end;
//proto float delphi_date(void)
-{$IFDEF PHP510}
procedure delphi_date(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_date(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-begin
- ZVAL_DOUBLE(return_value, Date);
-end;
-
-//proto string delphi_extract_file_dir(string source)
-{$IFDEF PHP510}
-procedure delphi_extract_file_dir(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_extract_file_dir(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-begin
-
-end;
-
-//proto string delphi_extract_file_drive(string source)
-{$IFDEF PHP510}
-procedure delphi_extract_file_drive(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_extract_file_drive(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
begin
-
+ ZVALVAL(return_value, Date);
end;
-
-//proto string delphi_extract_file_name(string source)
-{$IFDEF PHP510}
-procedure delphi_extract_file_name(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_extract_file_name(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-begin
-
-end;
-
-//proto string delphi_extract_file_ext(string source)
-{$IFDEF PHP510}
-procedure delphi_extract_file_ext(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_extract_file_ext(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-begin
-
-end;
-
-//proto void delphi_show_message(string message)
-{$IFDEF PHP510}
-procedure delphi_show_message(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_show_message(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-
-begin
-
-end;
-
-
//proto string delphi_input_box(string caption, string prompt, string default)
-{$IFDEF PHP510}
procedure delphi_input_box(ht : integer; return_value : pzval; return_value_ptr : ppzval;
this_ptr : pzval; return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_input_box(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
var p: pzval_array;
begin
if ht <> 3 then
@@ -276,343 +80,15 @@ procedure delphi_input_box(ht : integer; return_value : pzval; this_ptr : pzval;
exit;
end;
zend_get_parameters_my(ht, p, TSRMLS_DC);
+ {$IFNDEF PHP7}
ZVAL_STRINGW(return_value, PWideChar(InputBox( Z_STRVAL(p[0]^), Z_STRVAL(p[1]^), Z_STRVAL(p[2]^) )), true);
+ {$ENDIF}
dispose_pzval_array(p);
end;
-//proto void delphi_send_message(void)
-{$IFDEF PHP510}
-procedure delphi_send_email(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_send_email(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-begin
- //ShellExecute(0, 'open', 'mailto:serge_perevoznyk@hotmail.com', nil, nil, SW_SHOWNORMAL);
-end;
-
-//proto void delphi_visit_homepage(void)
-{$IFDEF PHP510}
-procedure delphi_visit_homepage(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_visit_homepage(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-begin
- //ShellExecute(0, 'open', 'http://users.chello.be/ws36637', nil, nil, SW_SHOW);
-end;
-
-
//Delphi objects support
-
-{$IFDEF PHP510}
-procedure delphi_object_classname(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_object_classname(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-begin
-
-end;
-
-{$IFDEF PHP510}
-procedure delphi_object_classnameis(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_object_classnameis(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-begin
-end;
-
-
-
-{$IFDEF PHP4}
-function delphi_set_property_handler(property_reference : Pzend_property_reference; value : pzval) : integer; cdecl;
-var
- this_ptr : pzval;
- OBJ : TObject;
- data: ^ppzval;
- element : pzend_list_element;
- prop : pzend_overloaded_element;
- p : pointer;
- propname : zend_ustr;
-// --> hupu, 2006.06.01
-// pt : TTypeKind;
-{$IFDEF VERSION7}
- Scripter : TPHPScriptableObject;
-{$ELSE}
- pt : TypInfo.TTypeKind;
-{$ENDIF}
-// <-- hupu, 2006.06.01
-begin
- element := property_reference^.elements_list^.head;
- p := @element^.data;
- prop := pzend_overloaded_element(p);
- propname := prop^.element.value.str.val;
-
- this_ptr := property_reference^._object;
- new(data);
- zend_hash_find(this_ptr^.value.obj.properties, 'instance', strlen('instance') + 1, data);
- Obj := TObject(data^^^.value.lval);
- freemem(data);
-
-// --> hupu, 2006.06.01
-{$IFDEF VERSION7}
- Scripter := TPHPScriptableObject(Obj);
- if SameText('Parent', propname) then
- begin
- TWinControl(Scripter.InstanceObj).Parent :=
- TWinControl(value^.value.lval);
- end
- else
- Scripter.SetPropertyByID(Scripter.NameToDispID(propname),
- [zval2variant(value^)] );
-{$ELSE}
-// <-- hupu, 2006.06.01
-
- pt := PropType(Obj, propname);
- if ( pt in SimpleProps) then
- SetPropValue(OBJ, propname, zval2variant(value^))
- else
- if pt = tkClass then
- begin
- Obj := GetObjectProp(Obj, propname);
- while element <> nil do
- begin
- element := element^.prev;
- p := @element^.data;
- prop := pzend_overloaded_element(p);
- propname := prop^.element.value.str.val;
- pt := PropType(Obj, propname);
- if ( pt in SimpleProps) then
- begin
- SetPropValue(OBJ, propname, zval2variant(value^));
- break;
- end
- else
- if pt = tkClass then
- Obj := GetObjectProp(Obj, propname);
- end;
- end;
-
-// --> hupu, 2006.06.01
-{$ENDIF}
-// <-- hupu, 2006.06.01
- Result := SUCCESS;
-end;
-
-
-
-procedure delphi_get_property_handler(val : pzval; property_reference : PZend_property_reference); cdecl;
-var
- this_ptr : pzval;
- OBJ : TObject;
- data: ^ppzval;
- element : pzend_list_element;
- prop : pzend_overloaded_element;
- p : pointer;
- propname : zend_ustr;
-// --> hupu, 2006.06.01
-// pt : TTypeKind;
-{$IFDEF VERSION7}
- Scripter : TPHPScriptableObject;
-{$ELSE}
- pt : TypInfo.TTypeKind;
-{$ENDIF}
-// <-- hupu, 2006.06.01
-begin
- element := property_reference^.elements_list^.head;
- p := @element^.data;
- prop := pzend_overloaded_element(p);
- propname := prop^.element.value.str.val;
- this_ptr := property_reference^._object;
- new(data);
- zend_hash_find(this_ptr^.value.obj.properties, 'instance', strlen('instance') + 1, data);
- Obj := TObject(data^^^.value.lval);
- freemem(data);
-
-// --> hupu, 2006.06.01
-{$IFDEF VERSION7}
-Scripter := TPHPScriptableObject(Obj);
-if SameText('Parent', propname) then
-begin
-TWinControl(Scripter.InstanceObj).Parent :=
-TWinControl(val^.value.lval);
-end
-else
-
-Scripter.SetPropertyByID(Scripter.NameToDispID(propname),
-[zval2variant(val^)] );
-{$ELSE}
-// <-- hupu, 2006.06.01
- pt := PropType(Obj, propname);
- if ( pt in SimpleProps) then
- variant2zval(GetPropValue(OBJ, propname), val)
- else
- if pt = tkClass then
- begin
- Obj := GetObjectProp(Obj, propname);
- while element <> nil do
- begin
- element := element^.prev;
- p := @element^.data;
- prop := pzend_overloaded_element(p);
- propname := prop^.element.value.str.val;
- pt := PropType(Obj, propname);
- if ( pt in SimpleProps) then
- begin
- variant2zval(GetPropValue(OBJ, propname), val);
- break;
- end
- else
- if pt = tkClass then
- Obj := GetObjectProp(Obj, propname);
- end;
- end;
-// --> hupu, 2006.06.01
-{$ENDIF}
-// <-- hupu, 2006.06.01
-end;
-
-
-
-procedure _delphi_get_property_wrapper; assembler;
-asm
- push ebp
- mov ebp,esp
- sub esp,50h
- push ebx
- push esi
- push edi
- lea edi,[ebp-50h]
- mov ecx,14h
- mov eax,0CCCCCCCCh
- rep stosd
- mov eax,dword ptr [ebp+0Ch]
- push eax
- lea ecx,[ebp-10h]
- push ecx
- call delphi_get_property_handler
- add esp,8
- mov edx,dword ptr [ebp+8]
- mov eax,dword ptr [ebp-10h]
- mov dword ptr [edx],eax
- mov ecx,dword ptr [ebp-0Ch]
- mov dword ptr [edx+4],ecx
- mov eax,dword ptr [ebp-8]
- mov dword ptr [edx+8],eax
- mov ecx,dword ptr [ebp-4]
- mov dword ptr [edx+0Ch],ecx
- mov eax,dword ptr [ebp+8]
-
- pop edi
- pop esi
- pop ebx
- add esp,50h
- cmp ebp,esp
- mov esp,ebp
- pop ebp
- ret
-end;
-
-
-procedure delphi_call_function(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer; property_reference : Pzend_property_reference ); cdecl;
-var
- OBJ : TObject;
- data: ^ppzval;
- element : pzend_list_element;
- prop : pzend_overloaded_element;
- p : pointer;
- MethodName : zend_ustr;
- Params : pzval_array;
- M, D : integer;
-begin
- element := property_reference^.elements_list^.head;
- p := @element^.data;
- prop := pzend_overloaded_element(p);
- MethodName := prop^.element.value.str.val;
- this_ptr := property_reference^._object;
- new(data);
- zend_hash_find(this_ptr^.value.obj.properties, 'instance', strlen('instance') + 1, data);
- Obj := TObject(data^^^.value.lval);
- freemem(data);
- if ( Obj.InheritsFrom(TCustomEdit) ) then
- begin
- if SameText(MethodName, 'Clear') then
- TCustomEdit(Obj).Clear;
- if SameText(MethodName, 'ClearSelection') then
- TCustomEdit(Obj).ClearSelection;
- if SameText(MethodName, 'CopyToClipboard') then
- TCustomEdit(Obj).CopyToClipboard;
- if SameText(MethodName, 'ControlCount') then
- ZVAL_LONG(return_value, TCustomEdit(Obj).ControlCount);
- if SameText(MethodName, 'ScaleBy') then
- begin
- if ht > 0 then
- begin
- if ( not (zend_get_parameters_ex(ht, Params) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
- end;
- M := Params[0]^.value.lval;
- D := Params[1]^.value.lval;
- TCustomEdit(Obj).ScaleBy(M, D);
- dispose_pzval_array(Params);
- end;
- end;
-end;
-{$ENDIF}
-
-
-
-{$IFDEF PHP5}
-
-// Read object property value (getter)
-function delphi_get_property_handler(_object : pzval; member : pzval; _type : integer; TSRMLS_DC : pointer) : pzval; cdecl;
-begin
-
-end;
-
-// Write object property value (setter)
-procedure delphi_set_property_handler(_object : pzval; member : pzval; value : pzval; TSRMLS_DC : pointer); cdecl;
-begin
-
-end;
-
-{$IFDEF PHP510}
-function delphi_call_method(method : zend_pchar; ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer) : integer; cdecl;
-{$ELSE}
-function delphi_call_method(method : zend_pchar; ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer) : integer; cdecl;
-{$ENDIF}
-begin
-
-end;
-
-function delphi_get_method(_object : pzval; method_name : zend_pchar; method_len : integer; TSRMLS_DC : pointer) : PzendFunction; cdecl;
-
-begin
-
-end;
-
-
-{$ENDIF}
-
-{$IFDEF PHP5}
procedure delphi_get_author(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_get_author(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
var
properties : array[0..3] of zend_pchar;
begin
@@ -620,134 +96,28 @@ procedure delphi_get_author(ht : integer; return_value : pzval; this_ptr : pzval
properties[1] := 'last';
properties[2] := 'height';
properties[3] := 'email';
- {$IFDEF PHP4}
- _object_init_ex(return_value, ce, nil, 0, TSRMLS_DC );
- {$ELSE}
object_init(return_value, ce, TSRMLS_DC );
- {$ENDIF}
-
- {$IFDEF PHP4}
- add_property_string_ex(return_value, properties[0], strlen(properties[0]) + 1, 'Serhiy', 1);
- add_property_string_ex(return_value, properties[1], strlen(properties[1]) + 1, 'Perevoznyk', 1);
- {$ELSE}
add_property_string_ex(return_value, properties[0], strlen(properties[0]) + 1, 'Serhiy', 1, TSRMLS_DC);
add_property_string_ex(return_value, properties[1], strlen(properties[1]) + 1, 'Perevoznyk', 1, TSRMLS_DC);
- {$ENDIF}
-
- {$IFDEF PHP5}
add_property_long_ex(return_value, properties[2], strlen(properties[2]) + 1, 185, TSRMLS_DC);
- {$ELSE}
- add_property_long_ex(return_value, properties[2], strlen(properties[2]) + 1, 185);
- {$ENDIF}
-
- {$IFDEF PHP4}
- add_property_string_ex(return_value, properties[3], strlen(properties[3]) + 1, 'serge_perevoznyk@hotmail.com', 1);
- {$ELSE}
add_property_string_ex(return_value, properties[3], strlen(properties[3]) + 1, 'serge_perevoznyk@hotmail.com', 1, TSRMLS_DC);
- {$ENDIF}
end;
-{$IFDEF PHP5}
-procedure delphi_is_uc(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure delphi_is_uc(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer);
-{$ENDIF}
-begin
- {$IFDEF PHP_UNICE}ZVAL_TRUE{$ELSE}ZVAL_FALSE{$ENDIF}(return_value);
-end;
-
-{$IFDEF PHP510}
-procedure register_delphi_object(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure register_delphi_object(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-
-begin
-
-end;
-
-{$IFDEF PHP510}
-procedure register_delphi_component(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure register_delphi_component(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-
-begin
-
-
-end;
procedure RegisterInternalClasses(p : pointer);
begin
- object_functions[0].fname := 'delphi_classname';
- object_functions[0].handler := @delphi_object_classname;
-
- object_functions[1].fname := 'delphi_classnameis';
- object_functions[1].handler := @delphi_object_classnameis;
-
- object_functions[2].fname := nil;
- object_functions[2].handler := nil;
-
- INIT_CLASS_ENTRY(delphi_object_entry, 'delphi_class' , @object_functions);
-
- {$IFDEF PHP4}
- Delphi_Object_Entry.handle_property_get := @_delphi_get_property_wrapper;
- Delphi_Object_Entry.handle_property_set := @delphi_set_property_handler;
- Delphi_Object_Entry.handle_function_call := @delphi_call_function;
+ {$IFDEF PHP7}
+ !
{$ELSE}
- Move(zend_get_std_object_handlers()^, DelphiObjectHandlers, sizeof(zend_object_handlers));
- DelphiObjectHandlers.read_property := @delphi_get_property_handler;
- DelphiObjecthandlers.write_property := @delphi_set_property_handler;
- DelphiObjectHandlers.call_method := @delphi_call_method;
- DelphiObjectHandlers.get_method := @delphi_get_method;
- {$ENDIF}
+ Move(zend_get_std_object_handlers()^, DelphiObjectHandlers, sizeof(_zend_object_handlers));
DelphiObject := zend_register_internal_class(@delphi_object_entry, p);
- author_functions[0].fname := 'send_email';
- author_functions[0].handler := @delphi_send_email;
-
- author_functions[1].fname := 'visit_homepage';
- author_functions[1].handler := @delphi_visit_homepage;
-
- author_functions[2].fname := nil;
- author_functions[2].handler := nil;
- INIT_CLASS_ENTRY(author_class_entry, 'php4delphi_author', @author_functions);
+ INIT_CLASS_ENTRY(author_class_entry, 'php4delphi_author', nil);
ce := zend_register_internal_class(@author_class_entry, p);
-
-end;
-
-{$IFDEF VERSION7}
-
-{
-Delphi scripting support
-The Original Code is: JvOle2Auto.PAS, released on 2002-07-04.
-The Initial Developers of the Original Code are: Fedor Koshevnikov, Igor Pavluk and Serge Korolev
-Copyright (c) 1997, 1998 Fedor Koshevnikov, Igor Pavluk and Serge Korolev
-Copyright (c) 2001,2002 SGB Software
-All Rights Reserved.
-}
-
-
-function WashVariant(const Value: Variant): OleVariant;
-begin
- if TVarData(Value).VType = (varString or varByRef) then
- Result := PString(TVarData(VAlue).VString)^ + ''
- else
- Result := Value;
+ {$ENDIF}
end;
-
-
-
-{$ENDIF}
-
end.
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 2/delphi_class2.dpr b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 2/delphi_class2.dpr
index b487c8b..9879358 100644
--- a/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 2/delphi_class2.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/Delphi Class 2/delphi_class2.dpr
@@ -7,7 +7,7 @@
{ http://users.telenet.be/ws36637 }
{*******************************************************}
-{$I php.inc}
+{$I PHP.INC}
library delphi_class2;
@@ -59,43 +59,24 @@ begin
DelphiTable[4].fname := 'delphi_extract_file_ext';
DelphiTable[4].handler := @delphi_extract_file_ext;
- {$IFDEF PHP4}
- DelphiTable[4].func_arg_types := nil;
- {$ELSE}
DelphiTable[4].arg_info := nil;
- {$ENDIF}
DelphiTable[5].fname := 'delphi_show_message';
DelphiTable[5].handler := @delphi_show_message;
- {$IFDEF PHP4}
- DelphiTable[5].func_arg_types := nil;
- {$ELSE}
DelphiTable[5].arg_info := nil;
- {$ENDIF}
DelphiTable[6].fname := 'register_delphi_object';
delphitable[6].handler := @register_delphi_object;
- {$IFDEF PHP4}
- DelphiTable[6].func_arg_types := nil;
- {$ELSE}
DelphiTable[6].arg_info := nil;
- {$ENDIF}
DelphiTable[7].fname := 'delphi_get_author';
DelphiTable[7].handler := @delphi_get_author;
- {$IFDEF PHP4}
- DelphiTable[7].func_arg_types := nil;
- {$ELSE}
DelphiTable[7].arg_info := nil;
- {$ENDIF}
+
DelphiTable[8].fname := 'delphi_str_date';
DelphiTable[8].handler := @delphi_str_date;
- {$IFDEF PHP4}
- DelphiTable[8].func_arg_types := nil;
- {$ELSE}
DelphiTable[8].arg_info := nil;
- {$ENDIF}
PHP_FUNCTION(DelphiTable[9], 'delphi_get_system_directory', @delphi_get_system_directory);
@@ -122,9 +103,6 @@ begin
ModuleEntry.request_startup_func := @rinit;
ModuleEntry.request_shutdown_func := @rshutdown;
ModuleEntry.info_func := @php_info_module;
- {$IFDEF PHP4}
- Module_entry_table[0].func_arg_types := nil;
- {$ENDIF}
ModuleEntry.functions := @DelphiTable[0];
ModuleEntry._type := MODULE_PERSISTENT;
{$IFDEF PHP530}
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/css/css.dpr b/Source/Demos Delphi 2009 (WideString support)/Extensions/css/css.dpr
index 209efd7..52aae8e 100644
--- a/Source/Demos Delphi 2009 (WideString support)/Extensions/css/css.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/css/css.dpr
@@ -114,9 +114,7 @@ begin
ModuleEntry.info_func := @php_info_module;
module_entry_table[0].fname := 'delphi_css';
module_entry_table[0].handler := @delphi_css;
- {$IFDEF PHP4}
- Module_entry_table[0].func_arg_types := nil;
- {$ENDIF}
+
ModuleEntry.functions := @module_entry_table[0];
ModuleEntry._type := MODULE_PERSISTENT;
{$IFDEF PHP530}
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/php class/php_class.dpr b/Source/Demos Delphi 2009 (WideString support)/Extensions/php class/php_class.dpr
index 1fbe696..fe9c521 100644
--- a/Source/Demos Delphi 2009 (WideString support)/Extensions/php class/php_class.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/php class/php_class.dpr
@@ -100,25 +100,12 @@ begin
properties[0] := 'name';
properties[1] := 'tool';
properties[2] := 'height';
- {$IFDEF PHP4}
- _object_init_ex(return_value, ce, nil, 0, TSRMLS_DC );
- {$ELSE}
object_init(return_value, ce, TSRMLS_DC );
- {$ENDIF}
- {$IFDEF PHP4}
- add_property_string_ex(return_value, properties[0], strlen(properties[0]) + 1, 'Serhiy', 1);
- add_property_string_ex(return_value, properties[1], strlen(properties[1]) + 1, 'Delphi', 1);
- {$ELSE}
add_property_string_ex(return_value, properties[0], strlen(properties[0]) + 1, 'Serhiy', 1, TSRMLS_DC);
add_property_string_ex(return_value, properties[1], strlen(properties[1]) + 1, 'Delphi', 1, TSRMLS_DC);
- {$ENDIF}
- {$IFDEF PHP4}
- add_property_long_ex(return_value, properties[2], strlen(properties[2]) + 1, 185);
- {$ELSE}
add_property_long_ex(return_value, properties[2], strlen(properties[2]) + 1, 185, TSRMLS_DC);
- {$ENDIF}
end;
@@ -143,9 +130,6 @@ begin
ModuleEntry.info_func := @php_info_module;
module_entry_table[0].fname := 'get_demo_class';
module_entry_table[0].handler := @get_demo_class;
- {$IFDEF PHP4}
- module_entry_table[0].func_arg_types := nil;
- {$ENDIF}
ModuleEntry.functions := @module_entry_table[0];
ModuleEntry._type := MODULE_PERSISTENT;
{$IFDEF PHP530}
diff --git a/Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/skeleton.dpr b/Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/skeleton.dpr
index b768421..a2c7c38 100644
--- a/Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/skeleton.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/Extensions/skeleton/skeleton.dpr
@@ -9,7 +9,7 @@
{ $Id: skeleton.dpr,v 7.4 10/2009 delphi32 Exp $ }
-{$I php.inc}
+{$I PHP.INC}
library skeleton;
@@ -102,9 +102,6 @@ begin
ModuleEntry.info_func := @php_info_module;
Module_entry_table[0].fname := 'confirm_extname_compiled';
Module_entry_table[0].handler := @confirm_extname_compiled;
- {$IFDEF PHP4}
- Module_entry_table[0].func_arg_types := nil;
- {$ENDIF}
ModuleEntry.functions := @module_entry_table[0];
ModuleEntry._type := MODULE_PERSISTENT;
{$IFDEF PHP530}
diff --git a/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Project1.dpr b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Project1.dpr
index dfa3f13..0114347 100644
--- a/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Project1.dpr
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Project1.dpr
@@ -2,7 +2,9 @@ program Project1;
uses
Forms,
- Unit1 in 'Unit1.pas' {Form1};
+ Unit1 in 'Unit1.pas' {Form1},
+ php4AppIntf in '..\..\..\php4AppIntf.pas',
+ ZendTypes in '..\..\..\ZendTypes.pas';
{$R *.RES}
diff --git a/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Unit1.pas
index 10d384c..b5d3415 100644
--- a/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Unit1.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/php4Applications/Delphi/Unit1.pas
@@ -15,7 +15,8 @@ interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, PHP4AppIntf;
+ StdCtrls,
+ php4AppIntf;
type
TForm1 = class(TForm)
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/Unit1.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/Unit1.pas
index d0afb70..5a9e4e9 100644
--- a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/Unit1.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Components/Unit1.pas
@@ -86,18 +86,6 @@ procedure TfrmTest.FormCreate(Sender: TObject);
memScript.Lines.Clear;
with memScript.Lines do
begin
- {$IFDEF PHP4}
- Add('$btnClose = register_delphi_component("btnClose");');
- Add('$frmTest = register_delphi_component("frmTest");');
- Add('$btnClose->Caption = "&Exit";');
- Add('$frmTest->Caption = "PHP4Delphi demo";');
- Add('$btnClose->Top = 150;');
- Add('$btnClose->Font->Size = 10;');
- Add('$btnClose->Cursor = -21;');
- Add('$frmTest->Color = clGreen;');
- Add('$st = delphi_input_box("InputBox", "Type your message", "Done");');
- Add('delphi_show_message($st);');
- {$ELSE}
Add('$btnClose = register_delphi_component("btnClose");');
Add('$frmTest = register_delphi_component("frmTest");');
Add('$btnClose->Caption = "&Exit";');
@@ -108,7 +96,6 @@ procedure TfrmTest.FormCreate(Sender: TObject);
Add('$frmTest->Color = clGreen;');
Add('$st = delphi_input_box("InputBox", "Type your message", "Done");');
Add('delphi_show_message($st);');
- {$ENDIF}
end;
PHPEngine.StartupEngine;
end;
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.dproj b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.dproj
index 4d406d5..8e2a16e 100644
--- a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.dproj
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.dproj
@@ -1,106 +1,169 @@
-
-
- {94D8351C-D7FA-4AB4-B4FA-8A463EB52A65}
- MultithreadSample.dpr
- Debug
- DCC32
- 12.0
-
-
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- 00400000
- false
- x86
- MultithreadSample.exe
- false
- false
- false
- false
-
-
- false
- RELEASE;$(DCC_Define)
- 0
- false
-
-
- DEBUG;$(DCC_Define)
-
-
-
- MainSource
-
-
-
-
-
-
- Base
-
-
- Cfg_2
- Base
-
-
- Cfg_1
- Base
-
-
-
-
- Delphi.Personality.12
- VCLApplication
-
-
-
- MultithreadSample.dpr
-
-
- False
- True
- False
-
-
- False
- False
- 1
- 0
- 0
- 0
- False
- False
- False
- False
- False
- 2057
- 1252
-
-
-
-
- 1.0.0.0
-
-
-
-
-
- 1.0.0.0
-
-
-
-
- 12
-
-
+
+
+ {94D8351C-D7FA-4AB4-B4FA-8A463EB52A65}
+ MultithreadSample.dpr
+ Debug
+ DCC32
+ 18.2
+ VCL
+ True
+ Win32
+ 1
+ Application
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Cfg_1
+ true
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Cfg_2
+ true
+ true
+
+
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)
+ MultithreadSample
+ 2057
+ 00400000
+ false
+ x86
+ MultithreadSample.exe
+ false
+ false
+ false
+ false
+
+
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+ true
+ $(BDS)\bin\default_app.manifest
+ MultithreadSample_Icon4.ico
+ $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
+ 1033
+ true
+ $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
+ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName)
+ Debug
+
+
+ $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
+ MultithreadSample_Icon4.ico
+ $(BDS)\bin\default_app.manifest
+ $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
+ true
+
+
+ false
+ RELEASE;$(DCC_Define)
+ 0
+ 0
+
+
+ true
+ true
+
+
+ DEBUG;$(DCC_Define)
+
+
+ true
+ true
+
+
+
+ MainSource
+
+
+
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ VCLApplication
+
+
+
+ MultithreadSample.dpr
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 2057
+ 1252
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ True
+ False
+
+
+ 12
+
+
+
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.otares b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.otares
new file mode 100644
index 0000000..7435995
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.otares differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.res b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.res
index c791b86..8afa5b2 100644
Binary files a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.res and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample.res differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon.ico b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon.ico
new file mode 100644
index 0000000..43bf002
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon.ico differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon1.ico b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon1.ico
new file mode 100644
index 0000000..43bf002
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon1.ico differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon2.ico b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon2.ico
new file mode 100644
index 0000000..43bf002
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon2.ico differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon3.ico b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon3.ico
new file mode 100644
index 0000000..43bf002
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon3.ico differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon4.ico b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon4.ico
new file mode 100644
index 0000000..43bf002
Binary files /dev/null and b/Source/Demos Delphi 2009 (WideString support)/psvPHP/Multithread simple/MultithreadSample_Icon4.ico differ
diff --git a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/frm_phpDemo.pas b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/frm_phpDemo.pas
index 6cff647..38f0f7f 100644
--- a/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/frm_phpDemo.pas
+++ b/Source/Demos Delphi 2009 (WideString support)/psvPHP/sample1/frm_phpDemo.pas
@@ -118,13 +118,8 @@ procedure TfrmPHPDemo.DisplayResultInBrowser(AStr: AnsiString);
AStr := StringReplace(AStr, 'src="http://github.com/?=PHPE9568F34-D428-11d2-A769-00AA001ACF42"',
'src="/service/res://'+ParamStr(0)+'/php"', [rfReplaceAll, rfIgnoreCase]);
- {$IFDEF PHP4}
- AStr := StringReplace(AStr, 'src="http://github.com/?=PHPE9568F35-D428-11d2-A769-00AA001ACF42"',
- 'src="/service/res://'+ ParamStr(0) + '/zend1"', [rfReplaceAll, rfIgnoreCase]);
- {$ELSE}
AStr := StringReplace(AStr, 'src="http://github.com/?=PHPE9568F35-D428-11d2-A769-00AA001ACF42"',
'src="/service/res://'+ ParamStr(0) + '/zend2"', [rfReplaceAll, rfIgnoreCase]);
- {$ENDIF}
Stream := StringToOleStream(AStr);
StreamInit := Webbrowser1.Document as IPersistStreamInit;
diff --git a/Source/Demos/Bonus/JpegConverter/php_jpeg.dpr b/Source/Demos/Bonus/JpegConverter/php_jpeg.dpr
index 2ef4892..4ab728d 100644
--- a/Source/Demos/Bonus/JpegConverter/php_jpeg.dpr
+++ b/Source/Demos/Bonus/JpegConverter/php_jpeg.dpr
@@ -266,9 +266,6 @@ begin
Module_entry_table[2].fname := 'sign_jpeg';
Module_entry_table[2].handler := @sign_jpeg;
- {$IFDEF PHP4}
- Module_entry_table[0].func_arg_types := nil;
- {$ENDIF}
ModuleEntry.functions := @module_entry_table[0];
ModuleEntry._type := MODULE_PERSISTENT;
diff --git a/Source/Demos/Bonus/PHPEncoder/phpencoder.dpr b/Source/Demos/Bonus/PHPEncoder/phpencoder.dpr
index 0f03996..93396ad 100644
--- a/Source/Demos/Bonus/PHPEncoder/phpencoder.dpr
+++ b/Source/Demos/Bonus/PHPEncoder/phpencoder.dpr
@@ -85,9 +85,6 @@ begin
Module_entry_table[0].fname := 'ex_dec';
Module_entry_table[0].handler := @ex_dec;
- {$IFDEF PHP4}
- Module_entry_table[0].func_arg_types := nil;
- {$ENDIF}
ModuleEntry.functions := @module_entry_table[0];
ModuleEntry._type := MODULE_PERSISTENT;
{$IFDEF PHP530}
diff --git a/Source/Demos/Bonus/phpRegistry/php_registry.dpr b/Source/Demos/Bonus/phpRegistry/php_registry.dpr
index ef0bd03..39319e2 100644
--- a/Source/Demos/Bonus/phpRegistry/php_registry.dpr
+++ b/Source/Demos/Bonus/phpRegistry/php_registry.dpr
@@ -562,75 +562,39 @@ begin
module_entry_table[0].fname := 'regcreatekey';
module_entry_table[0].handler := @php_regcreatekey;
- {$IFDEF PHP4}
- module_entry_table[0].func_arg_types := nil;
- {$ENDIF}
module_entry_table[1].fname := 'regdeleteentry';
module_entry_table[1].handler := @php_regdeleteentry;
- {$IFDEF PHP4}
- module_entry_table[1].func_arg_types := nil;
- {$ENDIF}
module_entry_table[2].fname := 'regdeletekeytree';
- module_entry_table[2].handler := @php_regdeletekeytree;
- {$IFDEF PHP4}
- module_entry_table[2].func_arg_types := nil;
- {$ENDIF}
+ module_entry_table[2].handler := p_regdeletekeytree;
module_entry_table[3].fname := 'reghassubkeys';
module_entry_table[3].handler := @php_reghassubkeys;
- {$IFDEF PHP4}
- module_entry_table[3].func_arg_types := nil;
- {$ENDIF}
module_entry_table[4].fname := 'regkeyexists';
module_entry_table[4].handler := @php_regkeyexists;
- {$IFDEF PHP4}
- module_entry_table[4].func_arg_types := nil;
- {$ENDIF}
module_entry_table[5].fname := 'regreadbool';
module_entry_table[5].handler := @php_regreadbool;
- {$IFDEF PHP4}
- module_entry_table[5].func_arg_types := nil;
- {$ENDIF}
module_entry_table[6].fname := 'regreadinteger';
module_entry_table[6].handler := @php_regreadinteger;
- {$IFDEF PHP4}
- module_entry_table[6].func_arg_types := nil;
- {$ENDIF}
module_entry_table[7].fname := 'regreadstring';
module_entry_table[7].handler := @php_regreadstring;
- {$IFDEF PHP4}
- module_entry_table[7].func_arg_types := nil;
- {$ENDIF}
module_entry_table[8].fname := 'regwritebool';
module_entry_table[8].handler := @php_regwritebool;
- {$IFDEF PHP4}
- module_entry_table[8].func_arg_types := nil;
- {$ENDIF}
module_entry_table[9].fname := 'regwriteinteger';
module_entry_table[9].handler := @php_regwriteinteger;
- {$IFDEF PHP4}
- module_entry_table[9].func_arg_types := nil;
- {$ENDIF}
module_entry_table[10].fname := 'regwritestring';
module_entry_table[10].handler := @php_regwritestring;
- {$IFDEF PHP4}
- module_entry_table[10].func_arg_types := nil;
- {$ENDIF}
module_entry_table[11].fname := nil;
module_entry_table[11].handler := nil;
- {$IFDEF PHP4}
- module_entry_table[11].func_arg_types := nil;
- {$ENDIF}
ModuleEntry.functions := @module_entry_table[0];
ModuleEntry._type := MODULE_PERSISTENT;
diff --git a/Source/Demos/Delphi4PHP/DesignIDE/d4pide.dpr b/Source/Demos/Delphi4PHP/DesignIDE/d4pide.dpr
index f8afdd2..aedcde9 100644
--- a/Source/Demos/Delphi4PHP/DesignIDE/d4pide.dpr
+++ b/Source/Demos/Delphi4PHP/DesignIDE/d4pide.dpr
@@ -7,7 +7,7 @@
{ http://users.chello.be/ws36637 }
{*******************************************************}
-{$I php.inc}
+{$I PHP.INC}
library d4pide;
diff --git a/Source/Demos/Extensions/Delphi Class 2/delphi_class2.dpr b/Source/Demos/Extensions/Delphi Class 2/delphi_class2.dpr
index bc1d2d8..cb67916 100644
--- a/Source/Demos/Extensions/Delphi Class 2/delphi_class2.dpr
+++ b/Source/Demos/Extensions/Delphi Class 2/delphi_class2.dpr
@@ -7,7 +7,7 @@
{ http://users.chello.be/ws36637 }
{*******************************************************}
-{$I php.inc}
+{$I PHP.INC}
library delphi_class2;
@@ -59,43 +59,23 @@ begin
DelphiTable[4].fname := 'delphi_extract_file_ext';
DelphiTable[4].handler := @delphi_extract_file_ext;
- {$IFDEF PHP4}
- DelphiTable[4].func_arg_types := nil;
- {$ELSE}
DelphiTable[4].arg_info := nil;
- {$ENDIF}
DelphiTable[5].fname := 'delphi_show_message';
- DelphiTable[5].handler := @delphi_show_message;
- {$IFDEF PHP4}
- DelphiTable[5].func_arg_types := nil;
- {$ELSE}
+ DelphiTable[5].handler := @delphi_show_message;}
DelphiTable[5].arg_info := nil;
- {$ENDIF}
DelphiTable[6].fname := 'register_delphi_object';
delphitable[6].handler := @register_delphi_object;
- {$IFDEF PHP4}
- DelphiTable[6].func_arg_types := nil;
- {$ELSE}
DelphiTable[6].arg_info := nil;
- {$ENDIF}
DelphiTable[7].fname := 'delphi_get_author';
DelphiTable[7].handler := @delphi_get_author;
- {$IFDEF PHP4}
- DelphiTable[7].func_arg_types := nil;
- {$ELSE}
- DelphiTable[7].arg_info := nil;
- {$ENDIF}
+ DelphiTable[7].arg_info := nil;}
DelphiTable[8].fname := 'delphi_str_date';
DelphiTable[8].handler := @delphi_str_date;
- {$IFDEF PHP4}
- DelphiTable[8].func_arg_types := nil;
- {$ELSE}
DelphiTable[8].arg_info := nil;
- {$ENDIF}
PHP_FUNCTION(DelphiTable[9], 'delphi_get_system_directory', @delphi_get_system_directory);
@@ -122,9 +102,6 @@ begin
ModuleEntry.request_startup_func := @rinit;
ModuleEntry.request_shutdown_func := @rshutdown;
ModuleEntry.info_func := @php_info_module;
- {$IFDEF PHP4}
- Module_entry_table[0].func_arg_types := nil;
- {$ENDIF}
ModuleEntry.functions := @DelphiTable[0];
ModuleEntry._type := MODULE_PERSISTENT;
{$IFDEF PHP530}
diff --git a/Source/Demos/Extensions/css/css.dpr b/Source/Demos/Extensions/css/css.dpr
index 79f0d5a..0b04986 100644
--- a/Source/Demos/Extensions/css/css.dpr
+++ b/Source/Demos/Extensions/css/css.dpr
@@ -104,9 +104,7 @@ begin
ModuleEntry.info_func := @php_info_module;
module_entry_table[0].fname := 'delphi_css';
module_entry_table[0].handler := @delphi_css;
- {$IFDEF PHP4}
- Module_entry_table[0].func_arg_types := nil;
- {$ENDIF}
+
ModuleEntry.functions := @module_entry_table[0];
ModuleEntry._type := MODULE_PERSISTENT;
{$IFDEF PHP530}
diff --git a/Source/Demos/Extensions/php class/php_class.dpr b/Source/Demos/Extensions/php class/php_class.dpr
index c0938e1..8333ffc 100644
--- a/Source/Demos/Extensions/php class/php_class.dpr
+++ b/Source/Demos/Extensions/php class/php_class.dpr
@@ -100,25 +100,11 @@ begin
properties[0] := 'name';
properties[1] := 'tool';
properties[2] := 'height';
- {$IFDEF PHP4}
- _object_init_ex(return_value, ce, nil, 0, TSRMLS_DC );
- {$ELSE}
object_init(return_value, ce, TSRMLS_DC );
- {$ENDIF}
-
- {$IFDEF PHP4}
- add_property_string_ex(return_value, properties[0], strlen(properties[0]) + 1, 'Serhiy', 1);
- add_property_string_ex(return_value, properties[1], strlen(properties[1]) + 1, 'Delphi', 1);
- {$ELSE}
add_property_string_ex(return_value, properties[0], strlen(properties[0]) + 1, 'Serhiy', 1, TSRMLS_DC);
add_property_string_ex(return_value, properties[1], strlen(properties[1]) + 1, 'Delphi', 1, TSRMLS_DC);
- {$ENDIF}
- {$IFDEF PHP4}
- add_property_long_ex(return_value, properties[2], strlen(properties[2]) + 1, 185);
- {$ELSE}
add_property_long_ex(return_value, properties[2], strlen(properties[2]) + 1, 185, TSRMLS_DC);
- {$ENDIF}
end;
@@ -143,9 +129,7 @@ begin
ModuleEntry.info_func := @php_info_module;
module_entry_table[0].fname := 'get_demo_class';
module_entry_table[0].handler := @get_demo_class;
- {$IFDEF PHP4}
- module_entry_table[0].func_arg_types := nil;
- {$ENDIF}
+
ModuleEntry.functions := @module_entry_table[0];
ModuleEntry._type := MODULE_PERSISTENT;
{$IFDEF PHP530}
diff --git a/Source/Demos/Extensions/skeleton/skeleton.dpr b/Source/Demos/Extensions/skeleton/skeleton.dpr
index b2c3c91..4bebef7 100644
--- a/Source/Demos/Extensions/skeleton/skeleton.dpr
+++ b/Source/Demos/Extensions/skeleton/skeleton.dpr
@@ -10,7 +10,7 @@
{ $Id: skeleton.dpr,v 7.4 10/2009 delphi32 Exp $ }
-{$I php.inc}
+{$I PHP.INC}
library skeleton;
@@ -103,9 +103,6 @@ begin
ModuleEntry.info_func := @php_info_module;
Module_entry_table[0].fname := 'confirm_extname_compiled';
Module_entry_table[0].handler := @confirm_extname_compiled;
- {$IFDEF PHP4}
- Module_entry_table[0].func_arg_types := nil;
- {$ENDIF}
ModuleEntry.functions := @module_entry_table[0];
ModuleEntry._type := MODULE_PERSISTENT;
{$IFDEF PHP530}
diff --git a/Source/Demos/psvPHP/Components/Unit1.pas b/Source/Demos/psvPHP/Components/Unit1.pas
index d0afb70..5a9e4e9 100644
--- a/Source/Demos/psvPHP/Components/Unit1.pas
+++ b/Source/Demos/psvPHP/Components/Unit1.pas
@@ -86,18 +86,6 @@ procedure TfrmTest.FormCreate(Sender: TObject);
memScript.Lines.Clear;
with memScript.Lines do
begin
- {$IFDEF PHP4}
- Add('$btnClose = register_delphi_component("btnClose");');
- Add('$frmTest = register_delphi_component("frmTest");');
- Add('$btnClose->Caption = "&Exit";');
- Add('$frmTest->Caption = "PHP4Delphi demo";');
- Add('$btnClose->Top = 150;');
- Add('$btnClose->Font->Size = 10;');
- Add('$btnClose->Cursor = -21;');
- Add('$frmTest->Color = clGreen;');
- Add('$st = delphi_input_box("InputBox", "Type your message", "Done");');
- Add('delphi_show_message($st);');
- {$ELSE}
Add('$btnClose = register_delphi_component("btnClose");');
Add('$frmTest = register_delphi_component("frmTest");');
Add('$btnClose->Caption = "&Exit";');
@@ -108,7 +96,6 @@ procedure TfrmTest.FormCreate(Sender: TObject);
Add('$frmTest->Color = clGreen;');
Add('$st = delphi_input_box("InputBox", "Type your message", "Done");');
Add('delphi_show_message($st);');
- {$ENDIF}
end;
PHPEngine.StartupEngine;
end;
diff --git a/Source/Demos/psvPHP/console/phpcon.dpr b/Source/Demos/psvPHP/console/phpcon.dpr
index 1aa6530..59005ac 100644
--- a/Source/Demos/psvPHP/console/phpcon.dpr
+++ b/Source/Demos/psvPHP/console/phpcon.dpr
@@ -1,4 +1,4 @@
-{$APPTYPE CONSOLE}
+{$APPTYPE CONSOLE}
{*******************************************************}
{ PHP4Delphi }
@@ -13,22 +13,61 @@
program phpcon;
-uses SysUtils, php4delphi;
+uses
+ SysUtils,
+ Dialogs,
+ php4delphi,
+ zendAPI,
+ ZENDTypes;
var
php : TpsvPHP;
Engine : TPHPEngine;
+ ft : Byte = 0;
+
+procedure gui_message(ht: integer; return_value: pzval;
+ return_value_ptr: pzval; this_ptr: pzval; return_value_used: integer;
+ TSRMLS_DC: pointer); cdecl;
+var
+ Text: pzval;
+begin
+ if zend_parse_method_parameters(1, TSRMLS_DC, this_ptr, 'z', @Text) = 0 then
+ begin
+ ShowMessage(Z_STRVAL(Text));
+ end;
+end;
+ procedure grc(ht: integer; return_value: pzval;
+ return_value_ptr: pzval; this_ptr: pzval; return_value_used: integer;
+ TSRMLS_DC: pointer); cdecl;
+var
+ p: pzval;
begin
- if ParamCount <> 1 then
+ if zend_parse_method_parameters(1, TSRMLS_DC, this_ptr, 'z', @p) = 0 then
begin
- writeln(Format('Usage: %s ', [ParamStr(0)]));
- Halt(1);
+ ZVAL_STRINGW(p,'🐆🐆🐆 .-=WPD=-. 🐆🐆🐆',true);
end;
+end;
+begin
Engine := TPHPEngine.Create(nil);
+ Engine.AddFunction('gui_message', @gui_message);
+ Engine.AddFunction('g_r_c', @grc);
+ Engine.HandleErrors := True;
Engine.StartupEngine;
php := TpsvPHP.Create(nil);
- php.FileName := ParamStr(1);
- write(php.Execute);
+ if ParamCount = 1 then
+ begin
+ php.FileName := zend_ustr(ParamStr(1));
+ if FileExists(ParamStr(1)) then
+ ft := 1;
+ end;
+
+ if ft = 1 then
+ write(php.Execute)
+ else
+ begin
+ writeLn(Format('Usage: %s ', [ParamStr(0)]));
+ writeLn(php.RunCode(''));
+ end;
php.Free;
Engine.ShutdownEngine;
Engine.Free;
diff --git a/Source/Demos/psvPHP/console/phpcon.dproj b/Source/Demos/psvPHP/console/phpcon.dproj
new file mode 100644
index 0000000..3847e22
--- /dev/null
+++ b/Source/Demos/psvPHP/console/phpcon.dproj
@@ -0,0 +1,511 @@
+
+
+ {BDB76098-EDD6-4A5A-AF30-D7A6B0BCF914}
+ phpcon.dpr
+ True
+ Debug
+ 3
+ Console
+ None
+ 18.2
+ Win32
+ DCC32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ phpcon.exe
+ ..\..\..\;$(DCC_UnitSearchPath)
+
+ false
+ 1058
+ false
+ 00400000
+ System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ $(BDS)\bin\delphi_PROJECTICON.ico
+ phpcon
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ false
+ false
+ false
+ $(BDS)\bin\delphi_PROJECTICNS.icns
+
+
+ 0
+ false
+ 0
+ RELEASE;$(DCC_Define)
+
+
+ true
+ DEBUG;$(DCC_Define)
+ false
+
+
+
+ MainSource
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+
+
+
+
+ phpcon.dpr
+
+
+ Embarcadero C++Builder Office 2000 Servers Package
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ False
+ True
+ True
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ phpcon.exe
+ true
+
+
+
+
+
+ Contents\Resources
+ 1
+
+
+
+
+ classes
+ 1
+
+
+
+
+ Contents\MacOS
+ 0
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ library\lib\mips
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+ 1
+
+
+ 1
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+ 1
+
+
+
+
+ 0
+
+
+ 1
+ .framework
+
+
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+
+ library\lib\armeabi
+ 1
+
+
+
+
+ 0
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ res\drawable-normal
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-large
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+
+
+ res\drawable-small
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ 0
+ .bpl
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-xlarge
+ 1
+
+
+
+
+ res\drawable-ldpi
+ 1
+
+
+
+
+ 0
+ .dll;.bpl
+
+
+ 1
+ .dylib
+
+
+
+
+
+
+
+
+
+
+
+
+ 12
+
+
diff --git a/Source/Demos/psvPHP/console/test.php b/Source/Demos/psvPHP/console/test.php
index f4f3614..97d44b7 100644
--- a/Source/Demos/psvPHP/console/test.php
+++ b/Source/Demos/psvPHP/console/test.php
@@ -1,4 +1,7 @@
-
-
+
\ No newline at end of file
diff --git a/Source/Demos/psvPHP/sample1/Unit1.pas b/Source/Demos/psvPHP/sample1/Unit1.pas
index 53d68ce..7b7281e 100644
--- a/Source/Demos/psvPHP/sample1/Unit1.pas
+++ b/Source/Demos/psvPHP/sample1/Unit1.pas
@@ -110,13 +110,8 @@ procedure TfrmPHPDemo.DisplayResultInBrowser(AStr: string);
AStr := StringReplace(AStr, 'src="http://github.com/?=PHPE9568F34-D428-11d2-A769-00AA001ACF42"',
'src="/service/res://'+ParamStr(0)+'/php"', [rfReplaceAll, rfIgnoreCase]);
- {$IFDEF PHP4}
- AStr := StringReplace(AStr, 'src="http://github.com/?=PHPE9568F35-D428-11d2-A769-00AA001ACF42"',
- 'src="/service/res://'+ ParamStr(0) + '/zend1"', [rfReplaceAll, rfIgnoreCase]);
- {$ELSE}
AStr := StringReplace(AStr, 'src="http://github.com/?=PHPE9568F35-D428-11d2-A769-00AA001ACF42"',
'src="/service/res://'+ ParamStr(0) + '/zend2"', [rfReplaceAll, rfIgnoreCase]);
- {$ENDIF}
Stream := StringToOleStream(AStr);
StreamInit := Webbrowser1.Document as IPersistStreamInit;
diff --git a/Source/Demos/psvPHP/sample1/frm_phpDemo.pas b/Source/Demos/psvPHP/sample1/frm_phpDemo.pas
index 4593e8e..98e98f3 100644
--- a/Source/Demos/psvPHP/sample1/frm_phpDemo.pas
+++ b/Source/Demos/psvPHP/sample1/frm_phpDemo.pas
@@ -117,13 +117,8 @@ procedure TfrmPHPDemo.DisplayResultInBrowser(AStr: string);
AStr := StringReplace(AStr, 'src="http://github.com/?=PHPE9568F34-D428-11d2-A769-00AA001ACF42"',
'src="/service/res://'+ParamStr(0)+'/php"', [rfReplaceAll, rfIgnoreCase]);
- {$IFDEF PHP4}
- AStr := StringReplace(AStr, 'src="http://github.com/?=PHPE9568F35-D428-11d2-A769-00AA001ACF42"',
- 'src="/service/res://'+ ParamStr(0) + '/zend1"', [rfReplaceAll, rfIgnoreCase]);
- {$ELSE}
AStr := StringReplace(AStr, 'src="http://github.com/?=PHPE9568F35-D428-11d2-A769-00AA001ACF42"',
'src="/service/res://'+ ParamStr(0) + '/zend2"', [rfReplaceAll, rfIgnoreCase]);
- {$ENDIF}
Stream := StringToOleStream(AStr);
StreamInit := Webbrowser1.Document as IPersistStreamInit;
diff --git a/Source/PHP.INC b/Source/PHP.INC
index 73c7da3..6b8aca2 100644
--- a/Source/PHP.INC
+++ b/Source/PHP.INC
@@ -5,111 +5,128 @@
{ Author: }
{ Serhiy Perevoznyk }
{ serge_perevoznyk@hotmail.com }
-{ http://users.chello.be/ws36637 }
-{ http://delphi32.blogspot.com }
+{ https://users.chello.be/ws36637 }
+{ https://delphi32.blogspot.com }
{*******************************************************}
-{ $Id: PHP.INC,v 7.4 10/2009 delphi32 Exp $ }
+{ $Id: PHP.INC,v 7.4 07/2020 delphi32 Exp $ }
{IMPORTANT:
-If you are using PHP version 4.2.x...4.3.0 please change $DEFINE PHP433 to $DEFINE PHP430
-If you are using PHP version 5.0 please change $DEFINE PHP433 to $DEFINE PHP5 or remove it
-If you are using PHP version 5.0.4 please add $DEFINE PHP504
-If you are using PHP version 5.1.0 or higher please add $DEFINE PHP510
-If you are using PHP version 5.1.1 or higher please add $DEFINE PHP511
-If you are using PHP version 5.1.2 or higher please add $DEFINE PHP512
-If you are using PHP version 5.2.0 or higher please add $DEFINE PHP520
-IF you are using PHP version 5.3.0 or highre please add $DEFINE PHP530
-IF you are using PHP version 5.4.0 or highre please add $DEFINE PHP540
-IF you are using PHP version 5.5.0 or highre please add $DEFINE PHP550
-IF you are using PHP version 5.6.0 or highre please add $DEFINE PHP560
-If you are using PHP compiled via:
-id, define compiler_id
-VC9 COMPILER_VC9
-VC10 COMPILER_VC10
-VC11 COMPILER_VC11
-VC12 COMPILER_VC12
-VC13 COMPILER_VC13
-VC14 COMPILER_VC14
-Sorry for such complicated configuration, but PHP team does not keep
-backward compatibility between PHP versions.
+Define suitable PHP version, the table is represented below:
+| Version | Directive |
+ 5.0 $DEFINE PHP5
+ 5.0.4 $DEFINE PHP504
+ 5.1.0 $DEFINE PHP510
+ 5.1.1 $DEFINE PHP511
+ 5.1.2 $DEFINE PHP512
+ 5.2 $DEFINE PHP520
+ 5.3 $DEFINE PHP530
+ 5.4 $DEFINE PHP540
+ 5.5 $DEFINE PHP550
+ 5.6 $DEFINE PHP560
+ 7.0 $DEFINE PHP7
+ 7.1 $DEFINE PHP710
+
+Define suitable visual library
+| Library | Directive |
+ VCL $DEFINE VCL
+ FMX $DEFINE FMX
}
+//Version
+//{$DEFINE PHP520}
+{$DEFINE PHP560}
+ //PHP Version
+{$DEFINE COMPILER_VC6}
+ //Compiler Version
+{$DEFINE ZTS}
+ //Thread Safe mode (php7ts, e.g)
+{$DEFINE VCL}
+ //visual library - Kylix, VCL, FMX for Delphi and LCL, fpGUI for Lazarus
+
+//Features
+{$DEFINE PHP_UNICODE}
+ //PHP unicode support *Enables WideString and UnicodeString
+{.$DEFINE REGISTER_COLOURS}
+ //constants for Delphi colours
+{.$DEFINE php_side_handler}
+ //enable ability to define own error handler from php side ~NON_TC
+{.$DEFINE QUIET_LOAD}
+ //Do not show errors while loading php library
+{.$DEFINE PHP4DELPHI_AUTOLOAD}
+ //Load php library at initialization
+{.$DEFINE PHP4DELPHI_AUTOUNLOAD}
+ // Unload php library at finalization
+
+//Compiler switches
+{.$DEFINE COMPILER_php7pv}
+ // use macroses from PHP sources patch
+ // https://github.com/resistancelion/no-name-engine/tree/master/php-src
+{.$DEFINE PHP_DEBUG}
+ //use debug libraries (php7debug, f.e)
+
+
+
+
+
-{.$DEFINE PHP4}
-{.$DEFINE PHP430}
-{.$DEFINE PHP433}
-{.$DEFINE PHP435}
-{.$DEFINE PHP446}
-{If you are using PHP 4 please comment $DEFINE PHP5}
-{PHP5 must be defined if you are using PHP5}
-{$DEFINE PHP5}
-{For PHP5 you have to define the subversion of PHP}
-{$DEFINE PHP504}
-{$DEFINE PHP510}
-{$DEFINE PHP511}
-{$DEFINE PHP512}
-{$DEFINE PHP520}
-{$DEFINE PHP530}
-{$DEFINE PHP540}
-{$DEFINE PHP550}
-{$DEFINE PHP560}
+
+
+
+//E N D
+{$WARN UNIT_DEPRECATED OFF}
+{$IFDEF PHP_UNICODE} {$DEFINE UNICODE} {$ENDIF}
+
+{$IFDEF PHP710} {$DEFINE PHP700} {$ENDIF}
+{$IFDEF PHP700} {$DEFINE PHP7} {$ENDIF}
+
+{$IFDEF PHP7} {$DEFINE PHP560} {$ENDIF}
+{$IFDEF PHP560} {$DEFINE PHP550} {$ENDIF}
+{$IFDEF PHP550} {$DEFINE PHP540} {$ENDIF}
+{$IFDEF PHP540} {$DEFINE PHP530} {$ENDIF}
{$IFDEF PHP530}
+ {$DEFINE PHP520}
{$DEFINE ZEND_WIN32}
{$DEFINE PHP_COMPILER_ID}
{$ENDIF}
- {$IFDEF PHP7}
- {$DEFINE COMPILER_VC14}
- {$DEFINE PHP560}
- {$ENDIF}
-{$IFDEF PHP560}
- {$DEFINE PHP530}
- {$DEFINE PHP540}
- {$DEFINE PHP550}
- {$DEFINE PHP_UNICE}
- {$DEFINE ZEND_WIN32}
- {$DEFINE PHP_COMPILER_ID}
-{$ENDIF}
-//Warning! You must select one of the compilers
-//Look at the version of PHP you have installed
-//I DO recommend to use php-5.6.40-Win32-VC11-x86, specially if you are using
-//php4delphi component with php5ts.dll. If you are building PHP extensions,
-//you have to define the right compiler, otherwise you would have incompatibility
-//problems
-
+{$IFDEF PHP520} {$DEFINE PHP512} {$ENDIF}
+{$IFDEF PHP512} {$DEFINE PHP511} {$ENDIF}
+{$IFDEF PHP511} {$DEFINE PHP510} {$ENDIF}
+{$IFDEF PHP510} {$DEFINE PHP504} {$ENDIF}
+{$IFDEF PHP504} {$DEFINE PHP5} {$ENDIF}
{$IFDEF PHP_COMPILER_ID}
- {.$DEFINE COMPILER_VC6}
- {$DEFINE COMPILER_VC9}
{$IFNDEF PHP7}
{$IFDEF PHP550} {$DEFINE COMPILER_VC11} {$ENDIF}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF PHP5}
- {$UNDEF PHP4}
- {$UNDEF PHP430}
- {$UNDEF PHP433}
- {$UNDEF PHP435}
- {$UNDEF PHP446}
+ {$ELSE}
+ {$DEFINE COMPILER_VC14}
+ {$ENDIF}
{$ENDIF}
-{$WARN UNIT_DEPRECATED OFF}
-
-{.$DEFINE QUIET_LOAD} //Do not show error while loading php4ts.dll or php5ts.dll (depends from php version)
-
-{.$DEFINE PHP4DELPHI_AUTOLOAD} //Load php4ts.dll or php5ts.dll at initialization
-{.$DEFINE PHP4DELPHI_AUTOUNLOAD} // Unload php4ts.dll or php5ts.dll at finalization
-{.$DEFINE PHP_DEBUG}
-
-{$DEFINE REGISTER_COLORS} //register php constants for colors
-{$IFNDEF LINUX}
- {$DEFINE ZTS} {zts support}
-{$ENDIF}
+{$ifdef FPC}
+ {$DEFINE VERSION1}
+ {$DEFINE VERSION2}
+ {$DEFINE VERSION3}
+ {$DEFINE VERSION4}
+ {$DEFINE VERSION5}
+ {$DEFINE VERSION6}
+ {$DEFINE VERSION7}
+ {$DEFINE VERSION8}
+ {$DEFINE VERSION9}
+ {$DEFINE VERSION10}
+ {$DEFINE VERSION11}
+ {$DEFINE VERSION12}
+ {$DEFINE VERSION13}
+ {$DEFINE VERSION14}
+{$else}
+ {$if CompilerVersion > 25}
+ {$LEGACYIFEND ON}
+ {$ifend}
+{$endif}
{$IFNDEF VER80} {Delphi 1.0}
{$DEFINE VERSION2} {Delphi 2.0 and BCB 1 or higher}
@@ -185,6 +202,17 @@ backward compatibility between PHP versions.
{$ENDIF}
{$ENDIF}
+{$IFNDEF VER180}
+ {$DEFINE OLD_PATHS}
+{$ENDIF}
+
+{$IFDEF VERSION12}
+ {$DEFINE WSTR}
+{$ELSE}
+ {$IFDEF PHP_UNICODE} {$UNDEF PHP_UNICODE} {$ENDIF}
+{$ENDIF}
+
+
{$IFDEF VERSION6}
{$WARN SYMBOL_PLATFORM OFF}
{$IFDEF VERSION7}
@@ -213,3 +241,17 @@ backward compatibility between PHP versions.
{$J+}
{$WARNINGS OFF}
{$ENDIF}
+
+{$IFDEF MSWINDOWS} {$DEFINE WINDOWS} {$ENDIF}
+{$IFDEF FPC}
+ {$IFDEF FMX} {$UNDEF FMX} {$ENDIF}
+ {$IFDEF VCL} {$UNDEF VCL} {$ENDIF}
+ {$DEFINE LCL}
+{$ELSE}
+ {$UNDEF LCL}
+ {$IFDEF WINDOWS}
+ {$DEFINE VCL}
+ {$ELSE}
+ {$DEFINE KYLIX}
+ {$ENDIF}
+{$ENDIF}
diff --git a/Source/PHP4DelphiD2006.dpk b/Source/PHP4DelphiD2006.dpk
index 35082b9..2ff391a 100644
--- a/Source/PHP4DelphiD2006.dpk
+++ b/Source/PHP4DelphiD2006.dpk
@@ -30,7 +30,7 @@ package php4DelphiD2006;
{$DESIGNONLY}
{$IMPLICITBUILD OFF}
-rrequires
+requires
rtl,
vcl,
designide,
@@ -38,11 +38,11 @@ rrequires
vclx,
php4DelphiR2006;
-ocontains
+contains
PHPProjectWizard in 'PHPProjectWizard.pas',
php4DelphiReg in 'php4DelphiReg.pas',
php4DelphiWeb in 'php4DelphiWeb.pas',
phpWeb in 'phpWeb.pas',
phpAbout in 'phpAbout.pas' {dlgAbout};
-d.
+end.
diff --git a/Source/PHP4DelphiD2006.dproj.local b/Source/PHP4DelphiD2006.dproj.local
deleted file mode 100644
index b3811b7..0000000
--- a/Source/PHP4DelphiD2006.dproj.local
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/Source/PHP4DelphiD2006.stat b/Source/PHP4DelphiD2006.stat
deleted file mode 100644
index 2539032..0000000
--- a/Source/PHP4DelphiD2006.stat
+++ /dev/null
@@ -1,10 +0,0 @@
-[Stats]
-EditorSecs=1
-DesignerSecs=1
-InspectorSecs=1
-CompileSecs=1
-OtherSecs=4
-StartTime=21.09.2018 3:07:34
-RealKeys=0
-EffectiveKeys=0
-DebugSecs=1
diff --git a/Source/PHPAPI.pas b/Source/PHPAPI.pas
index bc220cd..fefeccc 100644
--- a/Source/PHPAPI.pas
+++ b/Source/PHPAPI.pas
@@ -22,14 +22,14 @@ interface
uses
{Windows} SysUtils,
-
{$IFDEF FPC}
dynlibs
{$ELSE}
Windows
{$ENDIF},
- ZendTypes, PHPTypes, zendAPI,
+ ZendTypes,
+ PHPTypes, zendAPI,
{$IFDEF VERSION6}Variants{$ENDIF}{WinSock};
@@ -65,7 +65,7 @@ interface
sapi_add_header_ex: function(header_line : zend_pchar; header_line_len : uint; duplicated : zend_bool; replace : zend_bool; TSRMLS_DC : pointer) : integer; cdecl;
- php_execute_script : function (primary_file: pointer; TSRMLS_D : pointer) : Integer; cdecl;
+ php_execute_script : function (primary_file: PZendFileHandle; TSRMLS_D : pointer) : longint; cdecl;
php_handle_aborted_connection: procedure; cdecl;
@@ -119,15 +119,17 @@ interface
php_get_output_start_filename: function (TSRMLS_D : pointer) : zend_pchar; cdecl;
php_get_output_start_lineno: function (TSRMLS_D : pointer) : integer; cdecl;
php_ob_handler_used: function (handler_name : zend_pchar; TSRMLS_DC : pointer) : integer; cdecl;
+ {$IF not defined(PHP520) and not Defined(PHP540) and not Defined(PHP550) and not Defined(PHP560)}
php_ob_init_conflict: function (handler_new : zend_pchar; handler_set : zend_pchar; TSRMLS_DC : pointer) : integer; cdecl;
- {$ENDIF}
+ {$ifend}
+ {$endif}
//php_output.h
function GetSymbolsTable : PHashTable;
-function GetTrackHash(Name : zend_ustr) : PHashTable;
+function GetTrackHash(Name : zend_ustr) : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF};
function GetSAPIGlobals : Psapi_globals_struct; overload;
function GetSAPIGlobals(TSRMLS_DC : pointer) : Psapi_globals_struct; overload;
//procedure phperror(Error : zend_pchar);
@@ -174,9 +176,9 @@ function GetSAPIGlobals(TSRMLS_DC : pointer) : Psapi_globals_struct; overload;
-
+{$IFNDEF COMPILER_php7pv}
php_log_err: procedure (err_msg : zend_pchar; TSRMLS_DC : pointer); cdecl;
-
+{$ENDIF}
php_html_puts: procedure (str : zend_pchar; str_len : integer; TSRMLS_DC : pointer); cdecl;
_php_error_log: function (opt_err : integer; msg : zend_pchar; opt: zend_pchar; headers: zend_pchar; TSRMLS_DC : pointer) : integer; cdecl;
@@ -198,11 +200,6 @@ function GetSAPIGlobals(TSRMLS_DC : pointer) : Psapi_globals_struct; overload;
php_ini_double: function(name : zend_pchar; name_length : uint; orig : Integer) : Double; cdecl;
php_ini_string: function(name : zend_pchar; name_length : uint; orig : Integer) : zend_pchar; cdecl;
-
-function zval2variant(value : zval) : variant;
-procedure variant2zval(value : variant; var z : pzval);
-
-
var
php_url_free: procedure (theurl : pphp_url); cdecl;
@@ -217,12 +214,7 @@ procedure variant2zval(value : variant; var z : pzval);
php_raw_url_encode: function (s : zend_pchar; len : Integer; new_length : PInteger) : zend_pchar; cdecl;
-{$IFDEF PHP510}
-php_register_extensions: function (ptr : pointer; count: integer; TSRMLS_DC: pointer) : integer; cdecl;
-{$ELSE}
-php_startup_extensions: function (ptr: pointer; count : integer) : integer; cdecl;
-{$ENDIF}
-
+php_register_extensions: function (ptr : PPzend_module_entry; count: integer; TSRMLS_DC: pointer) : integer; cdecl;
php_error_docref0: procedure (const docref : zend_pchar; TSRMLS_DC : pointer; _type : integer; const Msg : zend_pchar); cdecl;
php_error_docref: procedure (const docref : zend_pchar; TSRMLS_DC : pointer; _type : integer; const Msg : zend_pchar); cdecl;
@@ -239,26 +231,23 @@ function GetEnvVariables : pzval;
function GetFilesVariables : pzval;
function GetPHPGlobals(TSRMLS_DC : pointer) : Pphp_Core_Globals;
-function PG(TSRMLS_DC : pointer) : Pphp_Core_Globals;
+//function PG(TSRMLS_DC : pointer) : Pphp_Core_Globals;
procedure PHP_FUNCTION(var AFunction : zend_function_entry; AName : zend_pchar; AHandler : pointer);
-function LoadPHP(const DllFileName: zend_ustr = PHPWin) : boolean;
+function LoadPHP(const LibraryPath: zend_ustr = PHPlp) : boolean;
procedure UnloadPHP;
function PHPLoaded : boolean;
-{$IFNDEF QUIET_LOAD}
-procedure CheckPHPErrors;
-{$ENDIF}
-
function FloatToValue(Value: Extended): zend_ustr;
function ValueToFloat(Value : zend_ustr) : extended;
var
+//Info.h
php_print_info: procedure (flag : Integer; TSRMLS_DC : pointer); cdecl;
@@ -279,12 +268,14 @@ function ValueToFloat(Value : zend_ustr) : extended;
php_info_print_table_row : procedure (n2 : integer; c1, c2 : zend_pchar); cdecl;
php_info_print_table_end: procedure (); cdecl;
-
+{$IF defined(PHP520) Defined(PHP540) or Defined(PHP550) or Defined(PHP560)}
+php_write: function (const str : zend_pchar; str_length: uint; TSRMLS_DC : pointer) : integer; cdecl;
+{$ELSE}
php_body_write: function (const str : zend_pchar; str_length: uint; TSRMLS_DC : pointer) : integer; cdecl;
php_header_write: function (const str : zend_pchar; str_length: uint; TSRMLS_DC : pointer) : integer; cdecl;
+{$ifend}
-
-php_header: function() : integer; cdecl;
+php_header: function(TSRMLS_D: pointer) : integer; cdecl;
php_setcookie: function (name : zend_pchar; name_len : integer; value : zend_pchar; value_len: integer;
expires : longint; path : zend_pchar; path_len : integer; domain : zend_pchar; domain_len : integer;
secure : integer; TSRMLS_DC : pointer) : integer; cdecl;
@@ -314,128 +305,55 @@ function PHPLoaded : boolean;
procedure UnloadPHP;
var
H : THandle;
+ vt: Integer;
begin
- H := InterlockedExchange(integer(PHPLib), 0);
+ vt := integer(PHPLib);
+ H := InterlockedExchange(vt, 0);
if H > 0 then
begin
FreeLibrary(H);
end;
end;
-{$IFDEF PHP4}
-function GetSymbolsTable : PHashTable;
-var
- executor_globals : pointer;
- executor_globals_value : integer;
- executor_hash : PHashTable;
- tsrmls_dc : pointer;
-begin
- if not PHPLoaded then
- begin
- Result := nil;
- Exit;
- end;
-
- executor_globals := GetProcAddress(PHPLib, 'executor_globals_id');
- executor_globals_value := integer(executor_globals^);
- tsrmls_dc := tsrmls_fetch;
- asm
- mov ecx, executor_globals_value
- mov edx, dword ptr tsrmls_dc
- mov eax, dword ptr [edx]
- mov ecx, dword ptr [eax+ecx*4-4]
- add ecx, 0DCh
- mov executor_hash, ecx
- end;
- Result := executor_hash;
-end;
-{$ELSE}
function GetSymbolsTable : PHashTable;
begin
Result := @GetExecutorGlobals.symbol_table;
end;
-{$ENDIF}
-
-function GetTrackHash(Name : zend_ustr) : PHashTable;
+function GetTrackHash(Name : zend_ustr) : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF};
var
data : ^ppzval;
- arr : PHashTable;
+ arr : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF};
ret : integer;
begin
Result := nil;
- {$IFDEF PHP4}
arr := GetSymbolsTable;
- {$ELSE}
- arr := @GetExecutorGlobals.symbol_table;
- {$ENDIF}
if Assigned(Arr) then
begin
new(data);
ret := zend_hash_find(arr, zend_pchar(Name), Length(Name)+1, Data);
if ret = SUCCESS then
begin
- Result := data^^^.value.ht;
+ Result := {$IFDEF PHP7}data^^^.value.arr{$ELSE}data^^^.value.ht{$ENDIF};
end;
end;
end;
function GetSAPIGlobals : Psapi_globals_struct;
-var
- sapi_globals_value : integer;
- sapi_globals : Psapi_globals_struct;
- tsrmls_dc : pointer;
begin
Result := nil;
if Assigned(sapi_globals_id) then
- begin
- tsrmls_dc := tsrmls_fetch;
- sapi_globals_value := integer(sapi_globals_id^);
- asm
- mov ecx, sapi_globals_value
- mov edx, dword ptr tsrmls_dc
- mov eax, dword ptr [edx]
- mov ecx, dword ptr [eax+ecx*4-4]
- mov sapi_globals, ecx
- end;
- Result := sapi_globals;
- end;
+ Result := __fgsapi(pointer(sapi_globals_id^), tsrmls_fetch);
end;
function GetSAPIGlobals(TSRMLS_DC : pointer) : Psapi_globals_struct;
var
sapi_global_id : pointer;
- sapi_globals_value : integer;
- sapi_globals : Psapi_globals_struct;
-
begin
Result := nil;
sapi_global_id := GetProcAddress(PHPLib, 'sapi_globals_id');
if Assigned(sapi_global_id) then
- begin
- sapi_globals_value := integer(sapi_global_id^);
- asm
- mov ecx, sapi_globals_value
- mov edx, dword ptr tsrmls_dc
- mov eax, dword ptr [edx]
- mov ecx, dword ptr [eax+ecx*4-4]
- mov sapi_globals, ecx
- end;
- Result := sapi_globals;
- end;
-end;
-
-function zval2variant(value : zval) : variant;
-begin
- case Value._type of
- IS_NULL : Result := NULL;
- IS_LONG : Result := Value.value.lval;
- IS_DOUBLE : Result := Value.value.dval;
- IS_STRING : Result := zend_ustr(Value.Value.str.val);
- IS_BOOL : Result := Boolean(Value.Value.lval);
- else
- Result := NULL;
- end;
+ Result := __fgsapi(pointer(sapi_globals_id^), TSRMLS_DC);
end;
function GetStringOf(const V: TVarData): string;
@@ -484,112 +402,22 @@ function GetStringOf(const V: TVarData): string;
end;
end;
-
-procedure variant2zval(value : variant;var z : pzval);
-var
- W : WideString;
- S: String;
-begin
- if VarIsEmpty(value) then
- begin
- ZVAL_NULL(z);
- Exit;
- end;
- // MessageBoxA(0, zend_pchar(zend_ustr( TVarData(Value).VType.ToString)), '', 0 ) ;
- case TVarData(Value).VType of
- varString : //Peter Enz
- begin
- if Assigned ( TVarData(Value).VString ) then
- begin
- ZVAL_STRING(z, TVarData(Value).VString , true);
- end
- else
- begin
- ZVAL_STRING(z, '', true);
- end;
- end;
-
- varUString : //Peter Enz
- begin
- S := string(TVarData(Value).VUString);
-
- ZVAL_STRING(z, zend_pchar(zend_ustr(S)), true);
- end;
-
- varOleStr : //Peter Enz
- begin
- if Assigned ( TVarData(Value).VOleStr ) then
- begin
- W := WideString(Pointer(TVarData(Value).VOleStr));
- ZVAL_STRINGW(z, PWideChar(W), true);
- end
- else
- begin
- ZVAL_STRING(z, '', true);
- end;
- end;
- varSmallInt : ZVAL_LONG(z, Integer(TVarData(Value).VSmallint));
- varInteger : ZVAL_LONG(z, TVarData(Value).VInteger);
- varBoolean : ZVAL_BOOL(z, TVarData(Value).VBoolean);
- varSingle : ZVAL_DOUBLE(z, TVarData(Value).VSingle);
- varDouble : ZVAL_DOUBLE(z, TVarData(Value).VDouble);
- varError : ZVAL_LONG(z, Integer(TVarData(Value).VError));
- varByte : ZVAL_LONG(z, Integer(TVarData(Value).VByte));
- varDate : ZVAL_DOUBLE(z, TVarData(Value).VDate);
- //varArray : ZVAL_ARRAY(z, Value);
- else
- ZVAL_NULL(Z);
- end;
-end;
-
-
function GetPHPGlobals(TSRMLS_DC : pointer) : Pphp_Core_Globals;
-var
- core_globals_value : integer;
- core_globals : Pphp_core_globals;
begin
Result := nil;
if Assigned(core_globals_id) then
- begin
- core_globals_value := integer(core_globals_id^);
- asm
- mov ecx, core_globals_value
- mov edx, dword ptr tsrmls_dc
- mov eax, dword ptr [edx]
- mov ecx, dword ptr [eax+ecx*4-4]
- mov core_globals, ecx
- end;
- Result := core_globals;
- end;
-end;
-
-
-
-function PG(TSRMLS_DC : pointer) : Pphp_Core_Globals;
-begin
- result := GetPHPGlobals(TSRMLS_DC);
+ Result := Pphp_Core_Globals(__fgsapi(pointer(core_globals_id^), TSRMLS_DC));
end;
-
-
procedure PHP_FUNCTION(var AFunction : zend_function_entry; AName : zend_pchar; AHandler : pointer);
begin
AFunction.fname := AName;
AFunction.handler := AHandler;
- {$IFDEF PHP4}
- AFunction.func_arg_types := nil;
- {$ELSE}
AFunction.arg_info := nil;
- {$ENDIF}
end;
-
-{procedure phperror(Error : zend_pchar);
-begin
- zend_error(E_PARSE, Error);
-end; }
{$IFDEF PHP540}
//HERE
@@ -604,13 +432,13 @@ procedure php_end_implicit_flush(TSRMLS_D : pointer);
{$ENDIF}
-function LoadPHP(const DllFileName: zend_ustr = PHPWin) : boolean;
+function LoadPHP(const LibraryPath: zend_ustr = PHPlp) : boolean;
begin
Result := false;
if not PHPLoaded then
begin
- if not LoadZend(DllFileName) then
+ if not LoadZend(LibraryPath) then
Exit;
end;
@@ -620,321 +448,231 @@ function LoadPHP(const DllFileName: zend_ustr = PHPWin) : boolean;
php_default_post_reader := GetProcAddress(PHPLib, 'php_default_post_reader');
- sapi_add_header_ex := GetProcAddress(PHPLib, 'sapi_add_header_ex');
+ LFunc(@sapi_add_header_ex, 'sapi_add_header_ex');
- php_request_startup := GetProcAddress(PHPLib, 'php_request_startup');
+ LFunc(@php_request_startup, 'php_request_startup');
- php_request_shutdown := GetProcAddress(PHPLib, 'php_request_shutdown');
+ LFunc(@php_request_shutdown, 'php_request_shutdown');
- php_module_startup := GetProcAddress(PHPLib, 'php_module_startup');
+ LFunc(@php_module_startup, 'php_module_startup');
- php_module_shutdown := GetProcAddress(PHPLib, 'php_module_shutdown');
+ LFunc(@php_module_shutdown, 'php_module_shutdown');
- php_module_shutdown_wrapper := GetProcAddress(PHPLib, 'php_module_shutdown_wrapper');
+ LFunc(@php_module_shutdown_wrapper, 'php_module_shutdown_wrapper');
- sapi_startup := GetProcAddress(PHPLib, 'sapi_startup');
+ LFunc(@sapi_startup, 'sapi_startup');
- sapi_shutdown := GetProcAddress(PHPLib, 'sapi_shutdown');
+ LFunc(@sapi_shutdown, 'sapi_shutdown');
- sapi_activate := GetProcAddress(PHPLib, 'sapi_activate');
+ LFunc(@sapi_activate, 'sapi_activate');
- sapi_deactivate := GetProcAddress(PHPLib, 'sapi_deactivate');
+ LFunc(@sapi_deactivate, 'sapi_deactivate');
- php_execute_script := GetProcAddress(PHPLib, 'php_execute_script');
+ LFunc(@php_execute_script, 'php_execute_script');
- php_handle_aborted_connection := GetProcAddress(PHPLib, 'php_handle_aborted_connection');
+ LFunc(@php_handle_aborted_connection, 'php_handle_aborted_connection');
- php_register_variable := GetProcAddress(PHPLib, 'php_register_variable');
+ LFunc(@php_register_variable, 'php_register_variable');
- php_register_variable_safe := GetProcAddress(PHPLib, 'php_register_variable_safe');
+ LFunc(@php_register_variable_safe, 'php_register_variable_safe');
- php_register_variable_ex := GetProcAddress(PHPLib, 'php_register_variable_ex');
+ LFunc(@php_register_variable_ex, 'php_register_variable_ex');
- php_output_startup := GetProcAddress(PHPLib, 'php_output_startup');
+ LFunc(@php_output_startup, 'php_output_startup');
- php_output_activate := GetProcAddress(PHPLib, 'php_output_activate');
+ LFunc(@php_output_activate, 'php_output_activate');
- php_output_set_status := GetProcAddress(PHPLib, 'php_output_set_status');
+ LFunc(@php_output_set_status, 'php_output_set_status');
- php_output_register_constants := GetProcAddress(PHPLib, 'php_output_register_constants');
+ LFunc(@php_output_register_constants, 'php_output_register_constants');
{$IFDEF PHP540}
- php_start_ob_buffer := GetProcAddress(PHPLib, 'php_output_start_user');
+ LFunc(@php_start_ob_buffer, 'php_output_start_user');
- php_start_ob_buffer_named := GetProcAddress(PHPLib, 'php_output_start_internal');
+ LFunc(@php_start_ob_buffer_named, 'php_output_start_internal');
- php_end_ob_buffer := GetProcAddress(PHPLib, 'php_output_end');
+ LFunc(@php_end_ob_buffer, 'php_output_end');
- php_end_ob_buffers := GetProcAddress(PHPLib, 'php_output_end_all');
+ LFunc(@php_end_ob_buffers, 'php_output_end_all');
- php_ob_get_buffer := GetProcAddress(PHPLib, 'php_output_get_contents');
+ LFunc(@php_ob_get_buffer, 'php_output_get_contents');
- php_ob_get_length := GetProcAddress(PHPLib, 'php_output_get_length');
+ LFunc(@php_ob_get_length, 'php_output_get_length');
- php_output_set_implicit_flush :=GetProcAddress(PHPLib, 'php_output_set_implicit_flush');
+ LFunc(@php_output_set_implicit_flush, 'php_output_set_implicit_flush');
- php_get_output_start_filename := GetProcAddress(PHPLib, 'php_output_get_start_filename');
+ LFunc(@php_get_output_start_filename, 'php_output_get_start_filename');
- php_get_output_start_lineno := GetProcAddress(PHPLib, 'php_output_get_start_lineno');
+ LFunc(@php_get_output_start_lineno, 'php_output_get_start_lineno');
- php_output_handler_started := GetProcAddress(PHPLib, 'php_output_handler_started');
+ LFunc(@php_output_handler_started, 'php_output_handler_started');
{$ELSE}
- php_start_ob_buffer := GetProcAddress(PHPLib, 'php_start_ob_buffer');
+ LFunc(@php_start_ob_buffer, 'php_start_ob_buffer');
- php_start_ob_buffer_named := GetProcAddress(PHPLib, 'php_start_ob_buffer_named');
+ LFunc(@php_start_ob_buffer_named, 'php_start_ob_buffer_named');
- php_end_ob_buffer := GetProcAddress(PHPLib, 'php_end_ob_buffer');
+ LFunc(@php_end_ob_buffer, 'php_end_ob_buffer');
- php_end_ob_buffers := GetProcAddress(PHPLib, 'php_end_ob_buffers');
+ LFunc(@php_end_ob_buffers, 'php_end_ob_buffers');
- php_ob_get_buffer := GetProcAddress(PHPLib, 'php_ob_get_buffer');
+ LFunc(@php_ob_get_buffer, 'php_ob_get_buffer');
- php_ob_get_length := GetProcAddress(PHPLib, 'php_ob_get_length');
+ LFunc(@php_ob_get_length, 'php_ob_get_length');
- php_start_implicit_flush := GetProcAddress(PHPLib, 'php_start_implicit_flush');
+ LFunc(@php_start_implicit_flush, 'php_start_implicit_flush');
- php_end_implicit_flush := GetProcAddress(PHPLib, 'php_end_implicit_flush');
+ LFunc(@php_end_implicit_flush, 'php_end_implicit_flush');
- php_get_output_start_filename := GetProcAddress(PHPLib, 'php_get_output_start_filename');
+ LFunc(@php_get_output_start_filename, 'php_get_output_start_filename');
- php_get_output_start_lineno := GetProcAddress(PHPLib, 'php_get_output_start_lineno');
+ LFunc(@php_get_output_start_lineno, 'php_get_output_start_lineno');
- php_ob_handler_used := GetProcAddress(PHPLib, 'php_ob_handler_used');
+ LFunc(@php_ob_handler_used, 'php_ob_handler_used');
{$ENDIF}
+ {$IF not defined(PHP520) and not Defined(PHP540) and not Defined(PHP550) and not Defined(PHP560)}
+ LFunc(@php_ob_init_conflict, 'php_ob_init_conflict');
+ {$ifend}
+ LFunc(@php_strtoupper, 'php_strtoupper');
- php_ob_init_conflict := GetProcAddress(PHPLib, 'php_ob_init_conflict');
-
- php_strtoupper := GetProcAddress(PHPLib, 'php_strtoupper');
-
- php_strtolower := GetProcAddress(PHPLib, 'php_strtolower');
-
- php_strtr := GetProcAddress(PHPLib, 'php_strtr');
+ LFunc(@php_strtolower,'php_strtolower');
- php_stripcslashes := GetProcAddress(PHPLib, 'php_stripcslashes');
+ LFunc(@php_strtr, 'php_strtr');
- php_basename := GetProcAddress(PHPLib, 'php_basename');
+ LFunc(@php_stripcslashes, 'php_stripcslashes');
- php_dirname := GetProcAddress(PHPLib, 'php_dirname');
+ LFunc(@php_basename, 'php_basename');
- php_stristr := GetProcAddress(PHPLib, 'php_stristr');
+ LFunc(@php_dirname, 'php_dirname');
- php_str_to_str := GetProcAddress(PHPLib, 'php_str_to_str');
+ LFunc(@php_stristr, 'php_stristr');
- php_strip_tags := GetProcAddress(PHPLib, 'php_strip_tags');
+ LFunc(@php_str_to_str, 'php_str_to_str');
- php_implode := GetProcAddress(PHPLib, 'php_implode');
+ LFunc(@php_strip_tags, 'php_strip_tags');
- php_explode := GetProcAddress(PHPLib, 'php_explode');
+ LFunc(@php_implode, 'php_implode');
- php_info_html_esc := GetProcAddress(PHPLib, 'php_info_html_esc');
+ LFunc(@php_explode, 'php_explode');
- php_print_info_htmlhead := GetProcAddress(PHPLib, 'php_print_info_htmlhead');
+ LFunc(@php_info_html_esc, 'php_info_html_esc');
- php_print_info := GetProcAddress(PHPLib, 'php_print_info');
+ LFunc(@php_print_info_htmlhead, 'php_print_info_htmlhead');
- php_info_print_table_colspan_header := GetProcAddress(PHPLib, 'php_info_print_table_colspan_header');
+ LFunc(@php_print_info, 'php_print_info');
- php_info_print_box_start := GetProcAddress(PHPLib, 'php_info_print_box_start');
+ LFunc(@php_info_print_table_colspan_header, 'php_info_print_table_colspan_header');
- php_info_print_box_end := GetProcAddress(PHPLib, 'php_info_print_box_end');
+ LFunc(@php_info_print_box_start, 'php_info_print_box_start');
- php_info_print_hr := GetProcAddress(PHPLib, 'php_info_print_hr');
+ LFunc(@php_info_print_box_end, 'php_info_print_box_end');
- php_info_print_table_start := GetProcAddress(PHPLib, 'php_info_print_table_start');
+ LFunc(@php_info_print_hr, 'php_info_print_hr');
- php_info_print_table_row1 := GetProcAddress(PHPLib, 'php_info_print_table_row');
+ LFunc(@php_info_print_table_start, 'php_info_print_table_start');
- php_info_print_table_row2 := GetProcAddress(PHPLib, 'php_info_print_table_row');
+ LFunc(@php_info_print_table_row1, 'php_info_print_table_row');
- php_info_print_table_row3 := GetProcAddress(PHPLib, 'php_info_print_table_row');
+ LFunc(@php_info_print_table_row2, 'php_info_print_table_row');
- php_info_print_table_row4 := GetProcAddress(PHPLib, 'php_info_print_table_row');
+ LFunc(@php_info_print_table_row3, 'php_info_print_table_row');
- php_info_print_table_row := GetProcAddress(PHPLib, 'php_info_print_table_row');
+ LFunc(@php_info_print_table_row4, 'php_info_print_table_row');
- php_info_print_table_end := GetProcAddress(PHPLib, 'php_info_print_table_end');
+ LFunc(@php_info_print_table_row, 'php_info_print_table_row');
- php_body_write := GetProcAddress(PHPLib, 'php_body_write');
-
- php_header_write := GetProcAddress(PHPLib, 'php_header_write');
-
- php_log_err := GetProcAddress(PHPLib, 'php_log_err');
-
- php_html_puts := GetProcAddress(PHPLib, 'php_html_puts');
-
- _php_error_log := GetProcAddress(PHPLib, '_php_error_log');
-
- php_print_credits := GetProcAddress(PHPLib, 'php_print_credits');
+ LFunc(@php_info_print_table_end, 'php_info_print_table_end');
+ {$IF Defined(PHP520) or Defined(PHP540) or Defined(PHP550) or Defined(PHP560)}
+ LFunc(@php_write, 'php_write' );
+ {$ELSE}
+ LFunc(@php_body_write, 'php_body_write' );
+ LFunc(@php_header_write, 'php_header_write');
+ {$ifend}
+ {$IFNDEF COMPILER_php7pv}
+ LFunc(@php_log_err, 'php_log_err');
+ {$ENDIF}
+ LFunc(@php_html_puts, 'php_html_puts');
- php_info_print_css := GetProcAddress(PHPLib, 'php_info_print_css');
+ LFunc(@_php_error_log, '_php_error_log');
- php_set_sock_blocking := GetProcAddress(PHPLib, 'php_set_sock_blocking');
+ LFunc(@php_print_credits, 'php_print_credits');
- php_copy_file := GetProcAddress(PHPLib, 'php_copy_file');
+ LFunc(@php_info_print_css, 'php_info_print_css');
- {$IFDEF PHP4}
- php_flock := GetProcAddress(PHPLib, 'php_flock');
- php_lookup_hostname := GetProcAddress(PHPLib, 'php_lookup_hostname');
- {$ENDIF}
+ LFunc(@php_set_sock_blocking, 'php_set_sock_blocking');
+ LFunc(@php_copy_file, 'php_copy_file');
- php_header := GetProcAddress(PHPLib, 'php_header');
+ LFunc(@php_header, 'php_header');
- php_setcookie := GetProcAddress(PHPLib, 'php_setcookie');
+ LFunc(@php_setcookie, 'php_setcookie');
- php_escape_html_entities := GetProcAddress(PHPLib, 'php_escape_html_entities');
+ LFunc(@php_escape_html_entities, 'php_escape_html_entities');
- php_ini_long := GetProcAddress(PHPLib, 'zend_ini_long');
+ LFunc(@php_ini_long, 'zend_ini_long');
- php_ini_double := GetProcAddress(PHPLib, 'zend_ini_double');
+ LFunc(@php_ini_double, 'zend_ini_double');
- php_ini_string := GetProcAddress(PHPLib, 'zend_ini_string');
+ LFunc(@php_ini_string, 'zend_ini_string');
- php_url_free := GetProcAddress(PHPLib, 'php_url_free');
+ LFunc(@php_url_free, 'php_url_free');
- php_url_parse := GetProcAddress(PHPLib, 'php_url_parse');
+ LFunc(@php_url_parse, 'php_url_parse');
- php_url_decode := GetProcAddress(PHPLib, 'php_url_decode');
+ LFunc(@php_url_decode, 'php_url_decode');
- php_raw_url_decode := GetProcAddress(PHPLib, 'php_raw_url_decode');
+ LFunc(@php_raw_url_decode, 'php_raw_url_decode');
- php_url_encode := GetProcAddress(PHPLib, 'php_url_encode');
+ LFunc(@php_url_encode, 'php_url_encode');
- php_raw_url_encode := GetProcAddress(PHPLib, 'php_raw_url_encode');
+ LFunc(@php_raw_url_encode, 'php_raw_url_encode');
- {$IFDEF PHP510}
- php_register_extensions := GetProcAddress(PHPLib, 'php_register_extensions');
+ {$IFDEF PHP5}
+ LFunc(@php_register_extensions, 'php_register_extensions');
{$ELSE}
- php_startup_extensions := GetProcAddress(PHPLib, 'php_startup_extensions');
+ LFunc(@php_startup_extensions, 'php_startup_extensions');
{$ENDIF}
- php_error_docref0 := GetProcAddress(PHPLib, 'php_error_docref0');
-
- php_error_docref := GetProcAddress(PHPLib, 'php_error_docref0');
+ LFunc(@php_error_docref0, 'php_error_docref0');
- php_error_docref1 := GetProcAddress(PHPLib, 'php_error_docref1');
+ LFunc(@php_error_docref, 'php_error_docref0');
- php_error_docref2 := GetProcAddress(PHPLib, 'php_error_docref2');
+ LFunc(@php_error_docref1, 'php_error_docref1');
-
-
- {$IFNDEF QUIET_LOAD}
- CheckPHPErrors;
- {$ENDIF}
+ LFunc(@php_error_docref2, 'php_error_docref2');
Result := true;
end;
-
-
-{$IFNDEF QUIET_LOAD}
-procedure CheckPHPErrors;
-begin
- if @sapi_add_header_ex = nil then raise EPHP4DelphiException.Create('sapi_add_header_ex');
- if @php_request_startup = nil then raise EPHP4DelphiException.Create('php_request_startup');
- if @php_request_shutdown = nil then raise EPHP4DelphiException.Create('php_request_shutdown');
- if @php_module_startup = nil then raise EPHP4DelphiException.Create('php_module_startup');
- if @php_module_shutdown = nil then raise EPHP4DelphiException.Create('php_module_shutdown');
- if @php_module_shutdown_wrapper = nil then raise EPHP4DelphiException.Create('php_module_shutdown_wrapper');
- if @sapi_startup = nil then raise EPHP4DelphiException.Create('sapi_startup');
- if @sapi_shutdown = nil then raise EPHP4DelphiException.Create('sapi_shutdown');
- if @sapi_activate = nil then raise EPHP4DelphiException.Create('sapi_activate');
- if @sapi_deactivate = nil then raise EPHP4DelphiException.Create('sapi_deactivate');
- if @php_execute_script = nil then raise EPHP4DelphiException.Create('php_execute_script');
- if @php_handle_aborted_connection = nil then raise EPHP4DelphiException.Create('php_handle_aborted_connection');
- if @php_register_variable = nil then raise EPHP4DelphiException.Create('php_register_variable');
- if @php_register_variable_safe = nil then raise EPHP4DelphiException.Create('php_register_variable_safe');
- if @php_register_variable_ex = nil then raise EPHP4DelphiException.Create('php_register_variable_ex');
- if @php_strip_tags = nil then raise EPHP4DelphiException.Create('php_strip_tags');
- if @php_log_err = nil then raise EPHP4DelphiException.Create('php_log_err');
- if @php_html_puts = nil then raise EPHP4DelphiException.Create('php_html_puts');
- if @_php_error_log = nil then raise EPHP4DelphiException.Create('_php_error_log');
- if @php_print_credits = nil then raise EPHP4DelphiException.Create('php_print_credits');
- if @php_info_print_css = nil then raise EPHP4DelphiException.Create('php_info_print_css');
- if @php_set_sock_blocking = nil then raise EPHP4DelphiException.Create('php_set_sock_blocking');
- if @php_copy_file = nil then raise EPHP4DelphiException.Create('php_copy_file');
-
- if @php_ini_long = nil then raise EPHP4DelphiException.Create('php_ini_long');
- if @php_ini_double = nil then raise EPHP4DelphiException.Create('php_ini_double');
- if @php_ini_string = nil then raise EPHP4DelphiException.Create('php_ini_string');
- if @php_url_free = nil then raise EPHP4DelphiException.Create('php_url_free');
- if @php_url_parse = nil then raise EPHP4DelphiException.Create('php_url_parse');
- if @php_url_decode = nil then raise EPHP4DelphiException.Create('php_url_decode');
- if @php_raw_url_decode = nil then raise EPHP4DelphiException.Create('php_raw_url_decode');
- if @php_url_encode = nil then raise EPHP4DelphiException.Create('php_url_encode');
- if @php_raw_url_encode = nil then raise EPHP4DelphiException.Create('php_raw_url_encode');
-
- {$IFDEF PHP510}
- if @php_register_extensions = nil then raise EPHP4DelphiException.Create('php_register_extensions');
- {$ELSE}
- if @php_startup_extensions = nil then raise EPHP4DelphiException.Create('php_startup_extensions');
- {$ENDIF}
-
- if @php_error_docref0 = nil then raise EPHP4DelphiException.Create('php_error_docref0');
- if @php_error_docref = nil then raise EPHP4DelphiException.Create('php_error_docref');
- if @php_error_docref1 = nil then raise EPHP4DelphiException.Create('php_error_docref1');
- if @php_error_docref2 = nil then raise EPHP4DelphiException.Create('php_error_docref2');
-end;
-{$ENDIF}
-
function GetPostVariables: pzval;
-var
- TSRMLS_D : pointer;
- CoreGlobals : Pphp_Core_Globals;
begin
- TSRMLS_D := ts_resource_ex(0, nil);
- CoreGlobals := PG(TSRMLS_D);
- Result := CoreGlobals^.http_globals[0];
+ Result := GetPHPGlobals(ts_resource_ex(0, nil))^.http_globals[0];
end;
function GetGetVariables : pzval;
-var
- TSRMLS_D : pointer;
- CoreGlobals : Pphp_Core_Globals;
begin
- TSRMLS_D := ts_resource_ex(0, nil);
- CoreGlobals := PG(TSRMLS_D);
- Result := CoreGlobals^.http_globals[1];
+ Result := GetPHPGlobals(ts_resource_ex(0, nil))^.http_globals[1];
end;
function GetServerVariables : pzval;
-var
- TSRMLS_D : pointer;
- CoreGlobals : Pphp_Core_Globals;
begin
- TSRMLS_D := ts_resource_ex(0, nil);
- CoreGlobals := PG(TSRMLS_D);
- Result := CoreGlobals^.http_globals[3];
+ Result := GetPHPGlobals(ts_resource_ex(0, nil))^.http_globals[3];
end;
function GetEnvVariables : pzval;
-var
- TSRMLS_D : pointer;
- CoreGlobals : Pphp_Core_Globals;
begin
- TSRMLS_D := ts_resource_ex(0, nil);
- CoreGlobals := PG(TSRMLS_D);
- Result := CoreGlobals^.http_globals[4];
+ Result := GetPHPGlobals(ts_resource_ex(0, nil))^.http_globals[4];
end;
function GetFilesVariables : pzval;
-var
- TSRMLS_D : pointer;
- CoreGlobals : Pphp_Core_Globals;
begin
- TSRMLS_D := ts_resource_ex(0, nil);
- CoreGlobals := PG(TSRMLS_D);
- Result := CoreGlobals^.http_globals[5];
+ Result := GetPHPGlobals(ts_resource_ex(0, nil))^.http_globals[5];
end;
function FloatToValue(Value: Extended): zend_ustr;
var
- {$IFDEF VERSION12}
- c: WideChar;
- {$ELSE}
- c: AnsiChar;
- {$ENDIF}
+ c: CharPtr;
begin
+ {$if CompilerVersion > 21}
c := FormatSettings.DecimalSeparator;
try
FormatSettings.DecimalSeparator := '.';
@@ -942,23 +680,38 @@ function FloatToValue(Value: Extended): zend_ustr;
finally
FormatSettings.DecimalSeparator := c;
end;
+ {$else}
+ c := DecimalSeparator;
+ try
+ DecimalSeparator := '.';
+ Result := SysUtils.FormatFloat('0.####', Value);
+ finally
+ DecimalSeparator := c;
+ end;
+ {$ifend}
end;
function ValueToFloat(Value : zend_ustr) : extended;
var
- {$IFDEF VERSION12}
- c: WideChar;
- {$ELSE}
- c : AnsiChar;
- {$ENDIF}
+ c: CharPtr;
begin
+ {$if CompilerVersion > 21}
c := FormatSettings.DecimalSeparator;
try
FormatSettings.DecimalSeparator := '.';
- Result := SysUtils.StrToFloat(Value);
+ Result := SysUtils.StrToFloat( Value);
+ finally
+ FormatSettings.DecimalSeparator := c;
+ end;
+ {$else}
+ c := DecimalSeparator;
+ try
+ DecimalSeparator := '.';
+ Result := SysUtils.StrToFloat( Value);
finally
- FormatSettings.DecimalSeparator := c;
+ DecimalSeparator := c;
end;
+ {$ifend}
end;
@@ -970,7 +723,7 @@ function GetPHPVersion: TPHPFileInfo;
{$ELSE}
function GetPHPVersion: TPHPFileInfo;
var
- FileName: {$IFDEF PHP_UNICE}String{$ELSE}AnsiString{$ENDIF};
+ FileName: String;
InfoSize, Wnd: DWORD;
VerBuf: Pointer;
FI: PVSFixedFileInfo;
@@ -980,21 +733,13 @@ function GetPHPVersion: TPHPFileInfo;
Result.MinorVersion := 0;
Result.Release := 0;
Result.Build := 0;
- FileName := PHPWin;
- {$IFDEF PHP_UNICE}
+ FileName := PHPlp;
InfoSize := GetFileVersionInfoSize(PWideChar(Filename), Wnd);
- {$ELSE}
- InfoSize := GetFileVersionInfoSizeA(PAnsiChar(FileName), Wnd);
- {$ENDIF}
if InfoSize <> 0 then
begin
GetMem(VerBuf, InfoSize);
try
- {$IFDEF PHP_UNICE}
if GetFileVersionInfo(PWideChar(FileName), Wnd, InfoSize, VerBuf) then
- {$ELSE}
- if GetFileVersionInfoA(PAnsiChar(FileName), Wnd, InfoSize, VerBuf) then
- {$ENDIF}
if VerQueryValue(VerBuf, '\', Pointer(FI), VerSize) then
begin
Result.MajorVersion := HIWORD(FI.dwFileVersionMS);
@@ -1009,13 +754,13 @@ function GetPHPVersion: TPHPFileInfo;
end;
{$ENDIF}
-initialization
{$IFDEF PHP4DELPHI_AUTOLOAD}
+initialization
LoadPHP;
{$ENDIF}
-finalization
{$IFDEF PHP4DELPHI_AUTOUNLOAD}
+finalization
UnloadPHP;
{$ENDIF}
diff --git a/Source/PHPCommon.pas b/Source/PHPCommon.pas
index d594f7c..d0a3a41 100644
--- a/Source/PHPCommon.pas
+++ b/Source/PHPCommon.pas
@@ -19,7 +19,27 @@
interface
uses
- Windows, Messages, SysUtils, Classes, VCL.Graphics, VCL.Controls, VCL.Forms, VCL.Dialogs,
+ Windows, Messages, SysUtils, Classes,
+ {$if CompilerVersion > 21}
+ VCL.Controls,
+ VCL.Dialogs,
+ VCL.Forms, VCL.Graphics,
+ {$elseif defined(FMX)}
+ FMX.Controls,
+ FMX.Dialogs,
+ FMX.Forms, FMX.Graphics,
+ {$else}
+ {$ifdef KYLIX}
+ QControls,
+ QDialogs,
+ QForms, QGraphics,
+ {$else}
+ Controls,
+ Dialogs,
+ Forms, Graphics,
+ {$endif}
+ {$ifend}
+
ZendTypes, ZendAPI, PHPTypes, PHPAPI;
type
@@ -272,12 +292,9 @@ function TPHPVariable.GetAsFloat: double;
function TPHPVariable.GetAsInteger: integer;
var
- {$IFDEF VERSION12}
- c : WideChar;
- {$ELSE}
- c : AnsiChar;
- {$ENDIF}
+ c: CharPtr;
begin
+{$if CompilerVersion > 21}
c := FormatSettings.DecimalSeparator;
try
FormatSettings.DecimalSeparator := '.';
@@ -285,6 +302,15 @@ function TPHPVariable.GetAsInteger: integer;
finally
FormatSettings.DecimalSeparator := c;
end;
+{$else}
+ c := DecimalSeparator;
+ try
+ DecimalSeparator := '.';
+ Result := Round(ValueToFloat(FValue));
+ finally
+ DecimalSeparator := c;
+ end;
+{$ifend}
end;
function TPHPVariable.GetDisplayName: string;
@@ -310,12 +336,9 @@ procedure TPHPVariable.SetAsFloat(const Value: double);
procedure TPHPVariable.SetAsInteger(const Value: integer);
var
- {$IFDEF VERSION12}
- c : WideChar;
- {$ELSE}
- c : AnsiChar;
- {$ENDIF}
+ c: CharPtr;
begin
+{$if CompilerVersion > 21}
c := FormatSettings.DecimalSeparator;
try
FormatSettings.DecimalSeparator := '.';
@@ -323,6 +346,15 @@ procedure TPHPVariable.SetAsInteger(const Value: integer);
finally
FormatSettings.DecimalSeparator := c;
end;
+{$else}
+ c := DecimalSeparator;
+ try
+ DecimalSeparator := '.';
+ FValue := IntToStr(Value);
+ finally
+ DecimalSeparator := c;
+ end;
+{$ifend}
end;
{ TPHPConstant }
diff --git a/Source/PHPFunctions.pas b/Source/PHPFunctions.pas
index 4f192ae..eef5c76 100644
--- a/Source/PHPFunctions.pas
+++ b/Source/PHPFunctions.pas
@@ -19,8 +19,11 @@
interface
uses
- Windows, SysUtils, Classes, {$IFDEF VERSION6} Variants,
- {$ENDIF} ZendTypes, PHPTypes, ZendAPI, PHPAPI ;
+ Windows, SysUtils, Classes,
+ {$IFDEF PHP_UNICODE}WideStrUtils, {$ENDIF}
+ {$IFDEF VERSION6} Variants,
+ {$ENDIF}
+ ZendTypes, PHPTypes, ZendAPI, PHPAPI ;
type
TParamType = (tpString, tpInteger, tpFloat, tpBoolean, tpArray, tpUnknown);
@@ -165,7 +168,9 @@ function ZendTypeToString(_type : integer) : string;
IS_BOOL : Result := 'IS_BOOL';
IS_RESOURCE : Result := 'IS_RESOURCE';
IS_CONSTANT : Result := 'IS_CONSTANT';
+ {$IFNDEF PHP7}
IS_CONSTANT_ARRAY : Result := 'IS_CONSTANT_ARRAY';
+ {$ENDIF}
end;
end;
@@ -173,7 +178,7 @@ function IsParamTypeCorrect(AParamType : TParamType; z : Pzval) : boolean;
var
ZType : integer;
begin
- ZType := Z^._type;
+ ZType := {$IFDEF PHP7}Z^.u1.v._type{$ELSE} Z^._type{$ENDIF};
case AParamType Of
tpString : Result := (ztype in [IS_STRING, IS_NULL]);
tpInteger : Result := (ztype in [IS_LONG, IS_BOOL, IS_NULL, IS_RESOURCE]);
@@ -311,17 +316,17 @@ procedure TPHPFunction.SetDisplayName(const Value: string);
NameValue : zend_ustr;
begin
NameValue := Value;
- if {$IFDEF PHP_UNICE}CompareText{$ELSE}AnsiCompareText{$ENDIF}(NameValue, FFunctionName) <> 0 then
+ if {$IFDEF PHP_UNICODE}CompareText{$ELSE}AnsiCompareText{$ENDIF}(NameValue, FFunctionName) <> 0 then
begin
if Collection <> nil then
for I := 0 to Collection.Count - 1 do
begin
F := TPHPFunctions(Collection).Items[I];
if (F <> Self) and (F is TPHPFunction) and
- ({$IFDEF PHP_UNICE}CompareText{$ELSE}AnsiCompareText{$ENDIF}(NameValue, F.FunctionName) = 0) then
+ ({$IFDEF PHP_UNICODE}CompareText{$ELSE}AnsiCompareText{$ENDIF}(NameValue, F.FunctionName) = 0) then
raise Exception.CreateFmt('Duplicate function name: %s', [Value]);
end;
- FFunctionName := {$IFDEF PHP_UNICE}LowerCase{$ELSE}AnsiLowerCase{$ENDIF}(Value);
+ FFunctionName := {$IFDEF PHP_UNICODE}UTF8LowerCase{$ELSE}AnsiLowerCase{$ENDIF}(Value);
Changed(False);
end;
end;
@@ -386,31 +391,17 @@ procedure TFunctionParams.SetItem(Index: Integer; Value: TFunctionParam);
procedure TFunctionParams.SetItemName(Item: TCollectionItem);
var
- I, J: Integer;
- ItemName: string;
+ J: Integer;
CurItem: TFunctionParam;
begin
J := 1;
- while True do
+ CurItem := ParamByName('Param1');
+ while (CurItem <> nil) and (CurItem <> Item) do
begin
- ItemName := Format('Param%d', [J]);
- I := 0;
- while I < Count do
- begin
- CurItem := Items[I] as TFunctionParam;
- if (CurItem <> Item) and (CompareText(CurItem.Name, ItemName) = 0) then
- begin
- Inc(J);
- Break;
- end;
- Inc(I);
- end;
- if I >= Count then
- begin
- (Item as TFunctionParam).Name := ItemName;
- Break;
- end;
+ inc(J);
+ CurItem := ParamByName('Param' + inttostr(J));
end;
+ (Item as TFunctionParam).Name := 'Param' + inttostr(J);
end;
function TFunctionParams.Values(AName: string): Variant;
@@ -476,14 +467,14 @@ procedure TFunctionParam.SetDisplayName(const Value: string);
I: Integer;
F: TFunctionParam;
begin
- if {$IFDEF PHP_UNICE}CompareText{$ELSE}AnsiCompareText{$ENDIF}(Value, FName) <> 0 then
+ if {$IFDEF PHP_UNICODE}CompareText{$ELSE}AnsiCompareText{$ENDIF}(Value, FName) <> 0 then
begin
if Collection <> nil then
for I := 0 to Collection.Count - 1 do
begin
F := TFunctionParams(Collection).Items[I];
if ((F <> Self) and (F is TFunctionParam) and
- ({$IFDEF PHP_UNICE}CompareText{$ELSE}AnsiCompareText{$ENDIF}(Value, F.Name) = 0)) then
+ ({$IFDEF PHP_UNICODE}CompareText{$ELSE}AnsiCompareText{$ENDIF}(Value, F.Name) = 0)) then
raise Exception.Create('Duplicate parameter name');
end;
FName := Value;
@@ -520,7 +511,7 @@ function TZendVariable.GetAsBoolean: boolean;
Exit;
end;
- case FValue^._type of
+ case{$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF} of
IS_STRING :
begin
if SameText(GetAsString, 'True') then
@@ -543,7 +534,7 @@ function TZendVariable.GetAsDate: TDateTime;
Exit;
end;
- case FValue^._type of
+ case{$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF} of
IS_STRING : Result := StrToDate(GetAsString);
IS_DOUBLE : Result := FValue^.value.dval;
else
@@ -559,7 +550,7 @@ function TZendVariable.GetAsDateTime: TDateTime;
Exit;
end;
- case FValue^._type of
+ case {$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF} of
IS_STRING : Result := StrToDateTime(GetAsString);
IS_DOUBLE : Result := FValue^.value.dval;
else
@@ -583,7 +574,7 @@ function TZendVariable.GetAsFloat: double;
Exit;
end;
- case FValue^._type of
+ case {$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF} of
IS_STRING : Result := StrToFloatDef(GetAsString,0.0);
IS_DOUBLE : Result := FValue^.value.dval;
else
@@ -599,7 +590,7 @@ function TZendVariable.GetAsInteger: integer;
Exit;
end;
- case FValue^._type of
+ case {$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF} of
IS_STRING : result := StrToIntDef(GetAsString, 0);
IS_DOUBLE : result := Round(FValue^.value.dval);
IS_NULL : result := 0;
@@ -619,7 +610,7 @@ function TZendVariable.GetAsString: zend_ustr;
Exit;
end;
- case FValue^._type of
+ case {$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF} of
IS_STRING : begin
try
SetLength(Result, FValue^.value.str.len);
@@ -652,7 +643,7 @@ function TZendVariable.GetAsTime: TDateTime;
Exit;
end;
- case FValue^._type of
+ case {$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF} of
IS_STRING : Result := StrToTime(GetAsString);
IS_DOUBLE : Result := FValue^.value.dval;
else
@@ -668,39 +659,31 @@ function TZendVariable.GetAsVariant: variant;
Exit;
end;
- result := zval2variant(FValue^);
+ result := ZendToVariant(FValue);
end;
function TZendVariable.GetDataType: integer;
begin
if not Assigned(FValue) then
- begin
- Result := IS_NULL;
- Exit;
- end;
+ Exit(IS_NULL);
- Result := FValue^._type;
+ Result := {$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF};
end;
function TZendVariable.GetIsNull: boolean;
begin
if not Assigned(FValue) then
- begin
- Result := true;
- Exit;
- end;
- Result := FValue^._type = IS_NULL;
+ Exit(True);
+
+ Result := {$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF} = IS_NULL;
end;
function TZendVariable.GetTypeName: string;
begin
if not Assigned(FValue) then
- begin
- Result := 'null';
- Exit;
- end;
+ Exit('null');
- case FValue^._type of
+ case {$IFDEF PHP7}FValue^.u1.v._type{$ELSE} FValue^._type{$ENDIF} of
IS_NULL: result := 'null';
IS_LONG: result := 'integer';
IS_DOUBLE: result := 'double';
@@ -720,7 +703,7 @@ procedure TZendVariable.SetAsBoolean(const Value: boolean);
begin
Exit;
end;
- ZVAL_BOOL(FValue, Value);
+ ZVALVAL(FValue, Value);
end;
procedure TZendVariable.SetAsDate(const Value: TDateTime);
@@ -729,7 +712,7 @@ procedure TZendVariable.SetAsDate(const Value: TDateTime);
begin
Exit;
end;
- ZVAL_DOUBLE(FValue, Value);
+ ZVALVAL(FValue, Value);
end;
procedure TZendVariable.SetAsDateTime(const Value: TDateTime);
@@ -738,7 +721,7 @@ procedure TZendVariable.SetAsDateTime(const Value: TDateTime);
begin
Exit;
end;
- ZVAL_DOUBLE(FValue, Value);
+ ZVALVAL(FValue, Value);
end;
procedure TZendVariable.SetAsFloat(const Value: double);
@@ -747,7 +730,7 @@ procedure TZendVariable.SetAsFloat(const Value: double);
begin
Exit;
end;
- ZVAL_DOUBLE(FValue, Value);
+ ZVALVAL(FValue, Value);
end;
procedure TZendVariable.SetAsInteger(const Value: integer);
@@ -756,7 +739,7 @@ procedure TZendVariable.SetAsInteger(const Value: integer);
begin
Exit;
end;
- ZVAL_LONG(FValue, Value);
+ ZVALVAL(FValue, Value);
end;
procedure TZendVariable.SetAsString(const Value: zend_ustr);
@@ -765,7 +748,7 @@ procedure TZendVariable.SetAsString(const Value: zend_ustr);
begin
Exit;
end;
- ZVAL_STRINGL(FValue, zend_pchar(Value), Length(Value), true);
+ ZVALVAL(FValue, zend_pchar(Value), Length(Value));
end;
procedure TZendVariable.SetAsTime(const Value: TDateTime);
@@ -774,7 +757,7 @@ procedure TZendVariable.SetAsTime(const Value: TDateTime);
begin
Exit;
end;
- ZVAL_DOUBLE(FValue, Value);
+ ZVALVAL(FValue, Value);
end;
procedure TZendVariable.SetAsVariant(const Value: variant);
@@ -783,7 +766,7 @@ procedure TZendVariable.SetAsVariant(const Value: variant);
begin
Exit;
end;
- variant2zval(Value, FValue);
+ VariantToZend(Value, FValue);
end;
@@ -793,7 +776,7 @@ procedure TZendVariable.UnAssign;
begin
Exit;
end;
- ZVAL_NULL(FValue);
+ ZVALVAL(FValue);
end;
diff --git a/Source/PHPLibrary.pas b/Source/PHPLibrary.pas
index 531998f..1ffad85 100644
--- a/Source/PHPLibrary.pas
+++ b/Source/PHPLibrary.pas
@@ -16,6 +16,9 @@
interface
uses
Windows, SysUtils, Classes,
+ {$IFDEF PHP_UNICODE}
+ WideStrUtils,
+ {$ENDIF}
{$IFDEF VERSION6}
Variants,
{$ENDIF}
@@ -178,7 +181,7 @@ procedure TPHPSimpleLibrary.RegisterMethod(AName: zend_ustr; ADescription : zend
begin
Func := TPHPFunction(Functions.Add);
Func.FunctionName :=
- {$IFDEF PHP_UNICE}LowerCase{$ELSE}AnsiLowerCase{$ENDIF}(AName);
+ {$IFDEF PHP_UNICODE}UTF8LowerCase{$ELSE}AnsiLowerCase{$ENDIF}(AName);
Func.Description := ADescription;
for cnt := 0 to Length(AParams) - 1 do
@@ -353,28 +356,28 @@ procedure TPHPSystemLibrary.CompareTextProc;
procedure TPHPSystemLibrary.AnsiUpperCaseProc;
begin
ReturnOutputArg(
- {$IFDEF PHP_UNICE}UpperCase{$ELSE}AnsiUpperCase{$ENDIF}( GetInputArgAsString( 0 ) )
+ {$IFDEF PHP_UNICODE}UTF8UpperCase{$ELSE}AnsiUpperCase{$ENDIF}( GetInputArgAsString( 0 ) )
);
end;
procedure TPHPSystemLibrary.AnsiLowerCaseProc;
begin
ReturnOutputArg(
- {$IFDEF PHP_UNICE}LowerCase{$ELSE}AnsiLowerCase{$ENDIF}( GetInputArgAsString( 0 ) )
+ {$IFDEF PHP_UNICODE}UTF8LowerCase{$ELSE}AnsiLowerCase{$ENDIF}( GetInputArgAsString( 0 ) )
);
end;
procedure TPHPSystemLibrary.AnsiCompareStrProc;
begin
ReturnOutputArg(
- {$IFDEF PHP_UNICE}CompareStr{$ELSE}AnsiCompareStr{$ENDIF}( GetInputArgAsString( 0 ),GetInputArgAsString( 1 ) )
+ {$IFDEF PHP_UNICODE}CompareStr{$ELSE}AnsiCompareStr{$ENDIF}( GetInputArgAsString( 0 ),GetInputArgAsString( 1 ) )
);
end;
procedure TPHPSystemLibrary.AnsiCompareTextProc;
begin
ReturnOutputArg(
- {$IFDEF PHP_UNICE}CompareText{$ELSE}AnsiCompareText{$ENDIF}( GetInputArgAsString( 0 ),GetInputArgAsString( 1 ) )
+ {$IFDEF PHP_UNICODE}CompareText{$ELSE}AnsiCompareText{$ENDIF}( GetInputArgAsString( 0 ),GetInputArgAsString( 1 ) )
);
end;
diff --git a/Source/PHPProjectWizard.pas b/Source/PHPProjectWizard.pas
index 49edc4a..78c8a6e 100644
--- a/Source/PHPProjectWizard.pas
+++ b/Source/PHPProjectWizard.pas
@@ -10,13 +10,13 @@
{$I PHP.INC}
{ $Id: PHPProjectWizard.pas,v 7.4 10/2009 delphi32 Exp $ }
-{$I PHP.inc}
+
unit PHPProjectWizard;
interface
uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ {$IFNDEF FPC} Windows, {$ELSE} LCLType,LCLIntf,dynlibs,libc,{$ENDIF} Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ToolsAPI,
{$IFDEF VERSION6}
DesignIntf,
@@ -268,7 +268,7 @@ function TPHPProjectCreator.GetFileName: string;
begin
try
TempFileName := ProjGroup.Projects[i].FileName;
- if {$IFDEF PHP_UNICE}CompareFileName{$ELSE}AnsiCompareFileName{$ENDIF}(ExtractFileName(TempFileName), ExtractFileName(TempFileName2)) = 0 then
+ if CompareFileName(ExtractFileName(TempFileName), ExtractFileName(TempFileName2)) = 0 then
begin
Found := True;
Break;
diff --git a/Source/PHPTypes.pas b/Source/PHPTypes.pas
index 5dbbbc6..bbca1da 100644
--- a/Source/PHPTypes.pas
+++ b/Source/PHPTypes.pas
@@ -16,15 +16,10 @@
interface
uses
- Windows, ZENDTypes;
+ {$IFNDEF FPC} Windows{$ELSE} LCLType{$ENDIF}, ZendTypes;
-{$IFDEF PHP4}
const
- phpVersion = 4;
-{$ELSE}
-const
- phpVersion = 5;
-{$ENDIF}
+ phpVersion = {$IFDEF PHP7}7{$ELSE}5{$ENDIF};
const
TRequestName : array [0..3] of zend_ustr =
@@ -240,7 +235,7 @@ interface
sapi_started : zend_bool;
{$IFDEF PHP510}
global_request_time : longint;
- known_post_content_types : THashTable;
+ known_post_content_types : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF};
{$ENDIF}
{$ENDIF}
end;
@@ -313,7 +308,9 @@ interface
phpinfo_as_text : integer;
+ {$IFDEF PHP520}
ini_entries : zend_pchar;
+ {$ENDIF}
additional_functions: Pointer;
input_filter_init : Pointer;
@@ -387,7 +384,7 @@ interface
arg_separator : arg_separators;
gpc_order : zend_pchar;
variables_order : zend_pchar;
- rfc1867_protected_variables : THashTable;
+ rfc1867_protected_variables : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF};
connection_status : Smallint;
ignore_user_abort : Smallint;
header_is_being_sent : Byte;
diff --git a/Source/ZENDAPI.pas b/Source/ZENDAPI.pas
index e3d9c45..fbed93f 100644
--- a/Source/ZENDAPI.pas
+++ b/Source/ZENDAPI.pas
@@ -20,53 +20,49 @@
interface
uses
- Windows, SysUtils,
+{$ifdef PHP_UNICODE}
+WideStrUtils,
+{$endif}
+ {$IFDEF FPC} LCLType,LCLIntf,dynlibs,libc{$ELSE}Windows{$ENDIF}, SysUtils,
ZendTypes, Variants,
- PHPTypes;
+ PHPTypes
+ {$if defined(chameleon)}
+ ,zend_chameleon
+ {$ifend};
type
TArrayVariant = array of variant;
TWSDate = array of string;
PWSDate = ^TWSDate;
TASDate = array of AnsiString;
PASDate = ^TWSDate;
+{$if not defined(chameleon_load_firstmatch)}
const
-PHPWin =
-{$IFDEF PHP_DEBUG}
+PHPlp =
{$IFDEF PHP7}
- 'php7phpdbg.dll'
+ 'php7'
{$ELSE}
- {$IFDEF PHP5}
- 'php5ts_debug.dll'
+ {$IFDEF PHP5}
+ 'php5'
{$ELSE}
- 'php4ts_debug.dll'
+ 'php'
{$ENDIF}
- {$ENDIF}
+{$ENDIF}
+{$IFDEF ZTS} + 'ts' {$ENDIF}
+{$IFDEF PHP_DEBUG} + '_debug' {$ENDIF}
+{$IFDEF WINDOWS}
+ + '.dll'
{$ELSE}
- {$IFDEF PHP5}
- {$IFDEF PHP7}
- {$IFDEF LINUX}
- 'php7ts.so'
- {$ENDIF}
- {$IFDEF MSWINDOWS}
- 'php7ts.dll'
- {$ENDIF}
- {$ELSE}
- {$IFDEF LINUX}
- 'php5ts.so'
- {$ENDIF}
- {$IFDEF MSWINDOWS}
- 'php5ts.dll'
- {$ENDIF}
- {$ENDIF}
- {$ELSE}
- 'php4ts.dll'
- {$ENDIF}
+ + '.so'
{$ENDIF};
+{$ifend}
type
EPHP4DelphiException = class(Exception)
constructor Create(const Msg: zend_ustr);
end;
+ EPHP4DelphiHookException = class(Exception)
+ constructor Create(const Msg: zend_ustr);
+ end;
align_test = record
case Integer of
@@ -76,10 +72,18 @@ align_test = record
end;
const
PLATFORM_ALIGNMENT = (SizeOf(align_test));
-{$IFNDEF PHP_UNICE}
+{$IFNDEF PHP_UNICODE}
function AnsiFormat(const Format: AnsiString; const Args: array of const): AnsiString;
{$ENDIF}
-function LoadZEND(const DllFilename: zend_ustr = PHPWin) : boolean;
+{$ifdef VERSION12}
+function Lfunc(var Func: Pointer; addr: LPCWSTR): Bool;
+function HFunc(const Func: Pointer; addr: LPCWSTR): Bool;
+{$else}
+function Lfunc(var Func: Pointer; addr: PAnsiChar): BOOL;
+function HFunc(const Func: Pointer; addr: PAnsiChar): Bool;
+{$endif}
+function LoadZEND(const LibraryPath: zend_ustr = PHPlp) : boolean;
+function __fgsapi(sapi_globals_value:pointer; tsrmls_dc:pointer): Pointer;
procedure UnloadZEND;
function ZENDLoaded: boolean;
@@ -97,9 +101,11 @@ function ZENDLoaded: boolean;
_erealloc : function(ptr: pointer; size: size_t; allow_failure: integer; __zend_filename: zend_pchar; __zend_lineno: uint; __zend_orig_filename: zend_pchar; __zend_orig_line_no: uint): pointer; cdecl;
_estrdup : function(const s: zend_pchar; __zend_filename: zend_pchar; __zend_lineno: uint; __zend_orig_filename: zend_pchar; __zend_orig_line_no: uint): pointer; cdecl;
_estrndup : function(s: zend_pchar; Len: Cardinal; __zend_filename: zend_pchar; __zend_lineno: uint; __zend_orig_filename: zend_pchar; __zend_orig_line_no: uint): zend_pchar; cdecl;
+ {$ifdef PHP_UNICODE}
_estrndupu : function(s: PUTF8Char; Len: Cardinal; __zend_filename: PUTF8Char;
__zend_lineno: uint; __zend_orig_filename: PUTF8Char;
__zend_orig_line_no: uint): PUTF8Char; cdecl;
+ {$endif}
function emalloc(size: size_t): pointer;
procedure efree(ptr: pointer);
function ecalloc(nmemb: size_t; size: size_t): pointer;
@@ -138,63 +144,36 @@ function STR_EMPTY_ALLOC : zend_pchar;
zend_disable_function : function(function_name : zend_pchar; function_name_length : uint; TSRMLS_DC : pointer) : integer; cdecl;
zend_disable_class : function(class_name : zend_pchar; class_name_length : uint; TSRMLS_DC : pointer) : integer; cdecl;
-
-{$IFDEF PHP4}
- zend_hash_add_or_update : function(ht: PHashTable; arKey: zend_pchar;
- nKeyLength: uint; pData: Pointer; nDataSize: uint; pDest: Pointer;
- flag: Integer): Integer; cdecl;
-{$ELSE}
-var
- _zend_hash_add_or_update : function (ht : PHashTable; arKey : zend_pchar;
+{$IFNDEF PHP7}
+ _zend_hash_add_or_update : function (ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; arKey : zend_pchar;
nKeyLength : uint; pData : pointer; nDataSize : uint; pDes : pointer;
flag : integer; __zend_filename: zend_pchar; __zend_lineno: uint) : integer; cdecl;
-
- function zend_hash_add_or_update(ht : PHashTable; arKey : zend_pchar;
- nKeyLength : uint; pData : pointer; nDataSize : uint; pDes : pointer;
+{$ENDIF}
+ function zend_hash_add_or_update(ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; arKey : zend_pchar;
+ nKeyLength : uint; pData : {$IFDEF PHP7}pzval{$ELSE}pointer{$ENDIF}; nDataSize : uint; pDes : pointer;
flag : integer) : integer; cdecl;
-{$ENDIF}
-function zend_hash_add(ht : PHashTable; arKey : zend_pchar; nKeyLength : uint; pData : pointer; nDataSize : uint; pDest : pointer) : integer; cdecl;
+function zend_hash_add(ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; arKey : zend_pchar; nKeyLength : uint; pData : pointer; nDataSize : uint; pDest : pointer) : integer; cdecl;
var
- {$IFDEF PHP4}
- zend_hash_init : function(ht: PHashTable; nSize: uint;
- pHashFunction: pointer; pDestructor: pointer;
- persistent: Integer): Integer; cdecl;
-
- zend_hash_init_ex : function(ht: PHashTable; nSize: uint;
- pHashFunction: pointer; pDestructor: pointer;
- persistent: Integer; bApplyProtection: boolean): Integer; cdecl;
-
-
- zend_hash_quick_add_or_update : function(ht: PHashTable; arKey: zend_pchar;
- nKeyLength: uint; h: ulong; pData: Pointer; nDataSize: uint;
- pDest: Pointer; flag: Integer): Integer; cdecl;
-
- zend_hash_index_update_or_next_insert : function(ht: PHashTable; h: ulong;
- pData: Pointer; nDataSize: uint; pDest: Pointer; flag: Integer): Integer; cdecl;
-
- zend_hash_merge : procedure(target: PHashTable; source: PHashTable;
- pCopyConstructor: pointer; tmp: Pointer; size: uint; overwrite: Integer); cdecl;
-
- {$ELSE}
-
- _zend_hash_init : function (ht : PHashTable; nSize : uint;
+ _zend_hash_init : function (ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; nSize : uint;
pHashFunction : pointer; pDestructor : pointer; persistent: zend_bool;
__zend_filename: zend_pchar; __zend_lineno: uint) : integer; cdecl;
- _zend_hash_init_ex : function (ht : PHashTable; nSize : uint;
+ _zend_hash_init_ex : function (ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; nSize : uint;
pHashFunction : pointer; pDestructor : pointer; persistent : zend_bool;
bApplyProtection : zend_bool; __zend_filename: zend_pchar; __zend_lineno: uint): integer; cdecl;
- function zend_hash_init (ht : PHashTable; nSize : uint; pHashFunction : pointer;
+ function zend_hash_init (ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; nSize : uint; pHashFunction : pointer;
pDestructor : pointer; persistent: zend_bool) : integer; cdecl;
- function zend_hash_init_ex (ht : PHashTable; nSize : uint; pHashFunction : pointer;
+ function zend_hash_init_ex (ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; nSize : uint; pHashFunction : pointer;
pDestructor : pointer; persistent : zend_bool; bApplyProtection : zend_bool): integer; cdecl;
-
-{$ENDIF}
-
+ {$IFDEF PHP7}
+ function zend_hash_num_elements(ht: Pzend_array): integer;
+ function add_char_to_string (_result: Pzval; op1: Pzval; op2: Pzval): Integer;
+ function add_string_to_string(_result: Pzval; op1: Pzval; op2: Pzval): Integer;
+ {$ENDIF}
var
zend_hash_destroy : procedure(ht: PHashTable); cdecl;
zend_hash_clean : procedure(ht: PHashTable); cdecl;
@@ -212,8 +191,9 @@ function zend_hash_add(ht : PHashTable; arKey : zend_pchar; nKeyLength : uint; p
var
zend_hash_graceful_destroy : procedure(ht: PHashTable); cdecl;
+ {$IFNDEF PHP7}
zend_hash_graceful_reverse_destroy : zend_hash_graceful_reverse_destroy_t;
-
+ {$ENDIF}
zend_hash_apply : procedure(ht: PHashTable; apply_func: pointer; TSRMLS_DC: Pointer); cdecl;
zend_hash_apply_with_argument : procedure(ht: PHashTable;
@@ -226,100 +206,124 @@ function zend_hash_add(ht : PHashTable; arKey : zend_pchar; nKeyLength : uint; p
* the standard apply functions do.
}
- zend_hash_reverse_apply : procedure(ht: PHashTable;
+ zend_hash_reverse_apply : procedure(ht: {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF};
apply_func: pointer; TSRMLS_DC: Pointer); cdecl;
{ Deletes }
- zend_hash_del_key_or_index : function(ht: PHashTable; arKey: zend_pchar;
+ {$IFDEF PHP7}
+ zend_hash_del_key_or_index : function(ht: Pzend_array; key:Pzend_string):longint; cdecl;
+ {$ELSE}
+ zend_hash_del_key_or_index : function(ht: PHashTable; arKey: zend_pchar;
nKeyLength: uint; h: ulong; flag: Integer): Integer; cdecl;
-
- zend_get_hash_value : function(ht: PHashTable; arKey: zend_pchar;
+ {$ENDIF}
+ zend_get_hash_value : function(ht: {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; arKey: zend_pchar;
nKeyLength: uint): Longint; cdecl;
{ Data retreival }
- zend_hash_find : function(ht: PHashTable; arKey: zend_pchar; nKeyLength: uint;
+ zend_hash_find : function(ht: {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; arKey: zend_pchar; nKeyLength: uint;
pData: Pointer): Integer; cdecl;
- zend_hash_quick_find : function(ht: PHashTable; arKey: zend_pchar;
- nKeyLength: uint; h: ulong; pData: Pointer): Integer; cdecl;
+ zend_hash_quick_find :
+ function(ht: {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; arKey: zend_pchar;
+ nKeyLength: uint; h: ulong; out pData: ppzval): Integer; cdecl;
- zend_hash_index_find : function(ht: PHashTable; h: ulong; pData: Pointer): Integer; cdecl;
+ zend_hash_index_find : function(ht: {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; h: ulong; pData: Pointer): Integer; cdecl;
{ Misc }
- zend_hash_exists : function(ht: PHashTable; arKey: zend_pchar; nKeyLength: uint): Integer; cdecl;
-
- zend_hash_index_exists : function(ht: PHashTable; h: ulong): Integer; cdecl;
-
- zend_hash_next_free_element : function(ht: PHashTable): Longint; cdecl;
+ zend_hash_exists : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; arKey: zend_pchar; nKeyLength: uint): Integer; cdecl;
+ zend_hash_index_exists : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; h: ulong): Integer; cdecl;
+ {$IFNDEF PHP7}
+ zend_hash_next_free_element : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}): Longint; cdecl;
+ {$ENDIF}
{ traversing }
- zend_hash_move_forward_ex : function(ht: PHashTable; pos: HashPosition): Integer; cdecl;
+ zend_hash_move_forward_ex : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; pos: HashPosition): Integer; cdecl;
- zend_hash_move_backwards_ex : function(ht: PHashTable; pos: HashPosition): Integer; cdecl;
+ zend_hash_move_backwards_ex : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; pos: HashPosition): Integer; cdecl;
- zend_hash_get_current_key_ex : function(ht: PHashTable;
+ zend_hash_get_current_key_ex : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF};
var str_index: zend_pchar; var str_length: uint; var num_index: ulong;
duplicate: boolean; pos: HashPosition): Integer; cdecl;
- zend_hash_get_current_key_type_ex : function(ht: PHashTable; pos: HashPosition): Integer; cdecl;
+ zend_hash_get_current_key_type_ex : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; pos: HashPosition): Integer; cdecl;
- zend_hash_get_current_data_ex : function(ht: PHashTable; pData: Pointer; pos: HashPosition): Integer; cdecl;
+ zend_hash_get_current_data_ex : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; pData: Pointer; pos: HashPosition): Integer; cdecl;
- zend_hash_internal_pointer_reset_ex : procedure(ht: PHashTable; pos: HashPosition); cdecl;
+ zend_hash_internal_pointer_reset_ex : procedure(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; pos: HashPosition); cdecl;
- zend_hash_internal_pointer_end_ex : procedure(ht: PHashTable; pos: HashPosition); cdecl;
+ zend_hash_internal_pointer_end_ex : procedure(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; pos: HashPosition); cdecl;
{ Copying, merging and sorting }
- zend_hash_copy : procedure(target: PHashTable; source: PHashTable;
+ zend_hash_copy : procedure(target: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; source: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF};
pCopyConstructor: pointer; tmp: Pointer; size: uint); cdecl;
- zend_hash_sort : function(ht: PHashTable; sort_func: pointer;
+ zend_hash_sort :
+ {$IFDEF PHP7}
+ function(ht:PZend_array; sort_func:sort_func_t; compare_func:compare_func_t; renumber:zend_bool):longint; cdecl;
+ {$ELSE}
+ function(ht: PHashTable; sort_func: pointer;
compare_func: pointer; renumber: Integer; TSRMLS_DC: Pointer): Integer; cdecl;
+ {$ENDIF}
- zend_hash_compare : function(ht1: PHashTable; ht2: PHashTable;
+ zend_hash_compare : function(ht1: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; ht2: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF};
compar: pointer; ordered: boolean; TSRMLS_DC: Pointer): Integer; cdecl;
- zend_hash_minmax : function(ht: PHashTable; compar: pointer;
+ zend_hash_minmax : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; compar: pointer;
flag: Integer; pData: Pointer; TSRMLS_DC: Pointer): Integer; cdecl;
-
- zend_hash_num_elements : function(ht: PHashTable): Integer; cdecl;
-
- zend_hash_rehash : function(ht: PHashTable): Integer; cdecl;
+ {$IFNDEF PHP7}
+ zend_hash_num_elements : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}): Integer; cdecl;
+ {$ENDIF}
+ zend_hash_rehash : function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}): Integer; cdecl;
zend_hash_func : function(arKey: zend_pchar; nKeyLength: uint): Longint; cdecl;
-function zend_hash_get_current_data(ht: PHashTable; pData: Pointer): Integer; cdecl;
-procedure zend_hash_internal_pointer_reset(ht: PHashTable); cdecl;
-
+function zend_hash_get_current_data(ht: {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; pData: Pointer): Integer; cdecl;
+procedure zend_hash_internal_pointer_reset(ht: {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}); cdecl;
+// zend_constants.h
var
zend_get_constant : function(name: zend_pchar; name_len: uint; var result: zval;
- TSRMLS_DC: Pointer): Integer; cdecl;
+ TSRMLS_DC: Pointer): integer; cdecl;
+ {$if defined(PHP530)}
+ zend_register_null_constant : procedure(name: zend_pchar; name_len: uint;
+ flags: integer; module_number: integer; TSRMLS_DC: Pointer); cdecl;
- zend_register_long_constant : procedure(name: zend_pchar; name_len: uint;
- lval: Longint; flags: Integer; module_number: Integer; TSRMLS_DC: Pointer); cdecl;
+ zend_register_bool_constant : procedure(name: zend_pchar; name_len: uint;
+ bval: zend_bool; flags: integer; module_number: integer; TSRMLS_DC: Pointer); cdecl;
- zend_register_double_constant : procedure(name: zend_pchar; name_len: uint; dval: Double; flags: Integer; module_number: Integer;
- TSRMLS_DC: Pointer); cdecl;
+ zend_register_long_constant : procedure(name: zend_pchar; name_len: uint;
+ lval: Longint; flags: integer; module_number: integer; TSRMLS_DC: Pointer); cdecl;
+ {$ifend}
+ zend_register_double_constant : procedure(name: zend_pchar; name_len: uint;
+ dval: Double; flags: integer; module_number: integer; TSRMLS_DC: Pointer); cdecl;
- zend_register_string_constant : procedure(name: zend_pchar; name_len: uint; strval: zend_pchar; flags: Integer; module_number: Integer;
- TSRMLS_DC: Pointer); cdecl;
+ zend_register_string_constant : procedure(name: zend_pchar; name_len: uint;
+ strval: zend_pchar; flags: integer; module_number: integer; TSRMLS_DC: Pointer); cdecl;
zend_register_stringl_constant : procedure(name: zend_pchar; name_len: uint;
- strval: zend_pchar; strlen: uint; flags: Integer; module_number: Integer;
+ strval: zend_pchar; strlen: uint; flags: integer; module_number: integer;
TSRMLS_DC: Pointer); cdecl;
- zend_register_constant : function(var c: zend_constant; TSRMLS_DC: Pointer): Integer; cdecl;
-
- zend_register_auto_global : function(name: zend_pchar; name_len: uint; callback: Pointer; TSRMLS_DC: Pointer): Integer; cdecl;
+ zend_register_constant : function(var c: zend_constant; TSRMLS_DC: Pointer): integer; cdecl;
+ zend_register_auto_global :
+ {$IFDEF PHP700}
+ function(name:Pzend_string; jit:boolean; instance_init_callback:Pointer): integer; cdecl;
+ {$ELSE}
+ {$IFDEF PHP5}
+ function(name: zend_pchar; name_len: uint; jit:boolean; instance_init_callback: Pointer; TSRMLS_DC: Pointer): integer; cdecl;
+ zend_activate_auto_globals: procedure(TSRMLS_C: Pointer); cdecl;
+ {$ELSE}
+ function(name: zend_pchar; name_len: uint; callback: Pointer; TSRMLS_DC: Pointer): integer; cdecl;
+ {$ENDIF}
+ {$ENDIF}
procedure REGISTER_MAIN_LONG_CONSTANT(name: zend_pchar; lval: longint; flags: integer; TSRMLS_DC: Pointer);
procedure REGISTER_MAIN_DOUBLE_CONSTANT(name: zend_pchar; dval: double; flags: integer; TSRMLS_DC: Pointer);
procedure REGISTER_MAIN_STRING_CONSTANT(name: zend_pchar; str: zend_pchar; flags: integer; TSRMLS_DC: Pointer);
@@ -334,26 +338,21 @@ procedure REGISTER_MAIN_STRINGL_CONSTANT(name: zend_pchar; str: zend_pchar; len:
// deallocates all occurrences of a given id
ts_free_id : procedure(id: ts_rsrc_id); cdecl;
- tsrm_shutdown : procedure(); cdecl;
+ tsrm_shutdown : procedure; cdecl;
ts_resource_ex : function(id: integer; p: pointer): pointer; cdecl;
ts_free_thread : procedure; cdecl;
zend_error : procedure(ErrType: integer; ErrText: zend_pchar); cdecl;
zend_error_cb : procedure; cdecl;
- zend_eval_string : function(str: zend_pchar; val: pointer; strname: zend_pchar; tsrm: pointer): integer; cdecl;
+ zend_eval_string : function(str: zend_pchar; ret_val: pointer; strname: zend_pchar; tsrm: pointer): integer; cdecl;
+ zend_eval_string_ex : function(str: zend_pchar; retval_ptr:pzval; string_name: zend_pchar; handle_exceptions:longint):longint; cdecl;
zend_make_compiled_string_description : function(a: zend_pchar; tsrm: pointer): zend_pchar; cdecl;
-
- {$IFDEF PHP4}
- _zval_copy_ctor : function(val: pzval; __zend_filename: zend_pchar; __zend_lineno: uint): integer; cdecl;
- _zval_dtor : procedure(val: pzval; __zend_filename: zend_pchar; __zend_lineno: uint); cdecl;
- {$ELSE}
_zval_copy_ctor_func : procedure(val: pzval; __zend_filename: zend_pchar; __zend_lineno: uint); cdecl;
_zval_dtor_func : procedure(val: pzval; __zend_filename: zend_pchar; __zend_lineno: uint); cdecl;
_zval_ptr_dtor: procedure(val: ppzval; __zend_filename: zend_pchar); cdecl;
procedure _zval_copy_ctor (val: pzval; __zend_filename: zend_pchar; __zend_lineno: uint); cdecl;
procedure _zval_dtor(val: pzval; __zend_filename: zend_pchar; __zend_lineno: uint); cdecl;
- {$ENDIF}
var
zend_print_variable : function(val: pzval): integer; cdecl;
@@ -362,11 +361,6 @@ procedure REGISTER_MAIN_STRINGL_CONSTANT(name: zend_pchar; str: zend_pchar; len:
zend_get_compiled_filename : function(TSRMLS_DC: Pointer): zend_pchar; cdecl;
zend_get_compiled_lineno : function(TSRMLS_DC: Pointer): integer; cdecl;
-
-{$IFDEF PHP4}
-function zval_copy_ctor(val : pzval) : integer;
-{$ENDIF}
-
function ts_resource(id : integer) : pointer;
function tsrmls_fetch : pointer;
@@ -463,11 +457,11 @@ procedure convert_to_string(op: pzval);
convert_to_array : procedure(op: Pzval); cdecl;
convert_to_object : procedure(op: Pzval); cdecl;
-
+ {$IFNDEF PHP7}
add_char_to_string : function(_result: Pzval; op1: Pzval; op2: Pzval): Integer; cdecl;
add_string_to_string : function(_result: Pzval; op1: Pzval; op2: Pzval): Integer; cdecl;
-
+ {$ENDIF}
zend_string_to_double : function(number: zend_pchar; length: zend_uint): Double; cdecl;
zval_is_true : function(op: Pzval): Integer; cdecl;
@@ -533,19 +527,32 @@ procedure convert_to_string(op: pzval);
zend_html_puts : procedure(s: zend_pchar; len: uint; TSRMLS_DC: Pointer); cdecl;
- zend_indent : procedure; cdecl;
-
- ZendGetParameters : function: integer; cdecl;
- zend_get_params_ex : function(param_count : Integer; Args : {$IFNDEF PHP700} ppzval {$ELSE} pzval{$ENDIF}) :integer; cdecl varargs;
-function zend_get_parameters_ex(number: integer; var Params: pzval_array): integer;
-function zend_get_parameters_my(number: integer; var Params: pzval_array; TSRMLS_DC: Pointer): integer;
+ zend_parse_method_parameters:function(num_args:longint; TSRMLS_DC:Pointer; this_ptr:Pzval; type_spec:zend_pchar):longint; cdecl varargs;
-function zend_get_parameters(ht: integer; param_count: integer; Params: array of
-{$IFNDEF PHP700} ppzval {$ELSE} pzval{$ENDIF}): integer;
+ zend_parse_method_parameters_ex:function(flags:longint; num_args:longint; TSRMLS_DC:Pointer; this_ptr:Pzval; type_spec:zend_pchar):longint; cdecl varargs;
-var
+ {$IFDEF PHP7}
+ zend_parse_parameters_throw : function(num_args:longint; type_spec:zend_pchar):longint; cdecl varargs;
+ {$ELSE}
+ zend_indent : procedure; cdecl;
+ {$ENDIF}
+ Zend_Get_Parameters : function(ht:longint; param_count:longint):longint; cdecl varargs;
+ zend_get_params_ex :
+ {$IFDEF PHP7}
+ function(param_count:longint):longint; cdecl varargs;
+ {$ELSE}
+ function(param_count : Integer; Args : ppzval): integer; cdecl varargs;
+ {$ENDIF}
+ {$IFDEF PHP7}
+ ZvalGetArgs: function(Count: Integer; Args: ppzval): Integer;cdecl varargs;
+ _zend_get_parameters_array_ex:function(param_count:longint; argument_array:Pzval):longint; cdecl;
+ {$ELSE}
+ _zend_get_parameters_array: function(ht: integer; param_count:longint; argument_array: ppzval; TSRMLS_DC: pointer): integer; cdecl;
_zend_get_parameters_array_ex : function(param_count: integer; argument_array:
- {$IFNDEF PHP700} pppzval {$ELSE} pzval{$ENDIF}; TSRMLS_CC: pointer): integer; cdecl;
+ pppzval; TSRMLS_CC: pointer): integer; cdecl;
+ {$ENDIF}
+function zend_get_parameters_my(number: integer; var Params: pzval_array; TSRMLS_DC: Pointer): integer;
+
procedure dispose_pzval_array(Params: pzval_array);
@@ -572,22 +579,9 @@ procedure dispose_pzval_array(Params: pzval_array);
execute : procedure(op_array: pointer; TSRMLS_DC: Pointer); cdecl;
zend_wrong_param_count : procedure(TSRMLS_D: pointer); cdecl;
- _zend_hash_quick_add_or_update:function(ht: PHashTable; arKey: zend_pchar; nKeyLength: uint; h: uint; out pData: pzval; nDataSize: uint; pDest: PPointer; flag: Integer) : Integer; cdecl;
- {$IFDEF PHP4}
- add_property_long_ex : function(arg: pzval; key: zend_pchar; key_len: uint; l: longint): integer; cdecl;
- {$ELSE}
+ _zend_hash_quick_add_or_update:function(ht: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; arKey: zend_pchar; nKeyLength: uint; h: uint; out pData: pzval; nDataSize: uint; pDest: PPointer; flag: Integer) : Integer; cdecl;
add_property_long_ex : function(arg: pzval; key: zend_pchar; key_len: uint; l: longint; TSRMLS_DC : pointer): integer; cdecl;
- {$ENDIF}
- {$IFDEF PHP4}
- add_property_null_ex : function(arg: pzval; key: zend_pchar; key_len: uint): integer; cdecl;
- add_property_bool_ex : function(arg: pzval; key: zend_pchar; key_len: uint; b: integer): integer; cdecl;
- add_property_resource_ex : function(arg: pzval; key: zend_pchar; key_len: uint; r: integer): integer; cdecl;
- add_property_double_ex : function(arg: pzval; key: zend_pchar; key_len: uint; d: double): integer; cdecl;
- add_property_string_ex : function(arg: pzval; key: zend_pchar; key_len: uint; str: zend_pchar; duplicate: integer): integer; cdecl;
- add_property_stringl_ex : function(arg: pzval; key: zend_pchar; key_len: uint; str: zend_pchar; len: uint; duplicate: integer): integer; cdecl;
- add_property_zval_ex : function(arg: pzval; key: zend_pchar; key_len: uint; value: pzval): integer; cdecl;
- {$ELSE}
add_property_null_ex : function(arg: pzval; key: zend_pchar; key_len: uint; TSRMLS_DC: Pointer): integer; cdecl;
add_property_bool_ex : function(arg: pzval; key: zend_pchar; key_len: uint; b: integer; TSRMLS_DC: Pointer): integer; cdecl;
add_property_resource_ex : function(arg: pzval; key: zend_pchar; key_len: uint; r: integer; TSRMLS_DC: Pointer): integer; cdecl;
@@ -595,10 +589,11 @@ procedure dispose_pzval_array(Params: pzval_array);
add_property_string_ex : function(arg: pzval; key: zend_pchar; key_len: uint; str: zend_pchar; duplicate: integer; TSRMLS_DC: Pointer): integer; cdecl;
add_property_stringl_ex : function(arg: pzval; key: zend_pchar; key_len: uint; str: zend_pchar; len: uint; duplicate: integer; TSRMLS_DC: Pointer): integer; cdecl;
add_property_zval_ex : function(arg: pzval; key: zend_pchar; key_len: uint; value: pzval; TSRMLS_DC: Pointer): integer; cdecl;
- {$ENDIF}
-
- call_user_function : function(function_table: PHashTable; object_pp: pzval;
+ {$IFDEF COMPILER_php7pv}
+ call_user_function : procedure(func:pzval; argv:pzval; argc:integer);cdecl;
+ {$ELSE}
+ call_user_function : function(function_table: PHashTable; object_pp: pzval;
function_name: pzval; return_ptr: pzval; param_count: zend_uint; params: pzval_array_ex;
TSRMLS_DC: Pointer): integer; cdecl;
@@ -607,18 +602,7 @@ procedure dispose_pzval_array(Params: pzval_array);
params: pzval_array;
no_separation: zend_uint; symbol_table: PHashTable;
TSRMLS_DC: Pointer): integer; cdecl;
-
-{
-call_user_function_ex(HashTable *function_table,
- zval **object_pp,
- zval *function_name,
- zval **retval_ptr_ptr,
- zend_uint param_count,
- zval **params[],
- int no_separation,
- HashTable *symbol_table
- TSRMLS_DC);
-}
+ {$ENDIF}
add_assoc_long_ex : function(arg: pzval; key: zend_pchar; key_len: uint; n: longint): integer; cdecl;
@@ -658,17 +642,9 @@ procedure dispose_pzval_array(Params: pzval_array);
_array_init : function(arg: pzval; __zend_filename: zend_pchar; __zend_lineno: uint): integer; cdecl;
- {$IFDEF PHP4}
- _object_init : function(arg: pzval; __zend_filename: zend_pchar; __zend_lineno: uint; TSRMLS_DC: pointer): integer; cdecl;
- {$ELSE}
_object_init : function(arg: pzval;TSRMLS_DC: pointer): integer; cdecl;
- {$ENDIF}
- {$IFDEF PHP4}
- _object_init_ex : function (arg: pzval; ce: pzend_class_entry; __zend_filename: zend_pchar; __zend_lineno: uint; TSRMLS_DC: pointer) : integer; cdecl;
- {$ELSE}
_object_init_ex : function (arg: pzval; ce: pzend_class_entry; __zend_lineno : integer; TSRMLS_DC : pointer) : integer; cdecl;
- {$ENDIF}
_object_and_properties_init : function(arg: pzval; ce: pointer; properties: phashtable; __zend_filename: zend_pchar; __zend_lineno: uint; TSRMLS_DC: pointer): integer; cdecl;
@@ -682,27 +658,31 @@ procedure dispose_pzval_array(Params: pzval_array);
procedure ZEND_PUTS(str: zend_pchar);
+type
+ TObjectAConvertMethod = procedure(v:variant;z:pzval);
+ TObjectBConvertMethod = function(a: pzval):Variant;
var
zend_register_internal_class : function(class_entry: pzend_class_entry; TSRMLS_DC: pointer): Pzend_class_entry; cdecl;
zend_register_internal_class_ex : function(class_entry: pzend_class_entry; parent_ce: pzend_class_entry; parent_name: zend_pchar; TSRMLS_DC: pointer): Pzend_class_entry; cdecl;
- function ZvalInt(z:zval):Integer;
- function ZvalDouble(z:zval):Double;
- function ZvalBool(z:zval):Boolean;
-
- function ZvalStrS(z:zval) : string;
- function ZvalStr(z:zval) : zend_ustr;
- function ZvalStrW(z:zval) : WideString;
-
- procedure ZvalVAL(z:pzval; v:Boolean) overload;
- procedure ZvalVAL(z:pzval; v:Integer; const _type:Integer = IS_LONG) overload;
- procedure ZvalVAL(z:pzval) overload;
- procedure ZvalVAL(z:pzval; v:Double) overload;
+ zend_startup_module : function(module_entry: Pzend_module_entry):integer; cdecl;
+ zend_startup_module_ex : function(module_entry: Pzend_module_entry; TSRMLS_DC: pointer):integer; cdecl;
+ zend_register_module_ex : function(module_entry: Pzend_module_entry; TSRMLS_DC: pointer): Pzend_module_entry;cdecl;
+ zend_register_internal_module : function(module_entry: Pzend_module_entry; TSRMLS_DC: pointer): Pzend_module_entry;cdecl;
+ zend_startup_modules : function(TSRMLS_DC:pointer):integer;
+ zend_collect_module_handlers : function(TSRMLS_DC:pointer):integer;
+
+ procedure ZvalVAL(z:pzval; v:Boolean); overload;
+ procedure ZvalVAL(z:pzval; v:Integer; const _type:Integer = IS_LONG); overload;
+ procedure ZvalVAL(z:pzval); overload;
+ procedure ZvalVAL(z:pzval; v:Double); overload;
+ procedure ZvalVAL(z:pzval; v:SmallInt); overload;
+ procedure ZvalVAL(z:pzval; v:Extended); overload;
procedure ZvalVAL(z: pzval; s: zend_ustr; len: Integer = 0); overload;
- procedure ZvalString(z:pzval) overload;
- procedure ZvalString(z:pzval; s:zend_pchar; len:Integer = 0) overload;
- procedure ZvalString(z:pzval; s:PWideChar; len:Integer = 0) overload;
- procedure ZvalString(z:pzval; s:string; len:Integer = 0) overload;
+ procedure ZvalString(z:pzval); overload;
+ procedure ZvalString(z:pzval; s:zend_pchar; len:Integer = 0); overload;
+ procedure ZvalString(z:pzval; s:PWideChar; len:Integer = 0); overload;
+ procedure ZvalString(z:pzval; s:string; len:Integer = 0); overload;
function ZvalArrayAdd(z: pzval; Args: array of const): Integer; overload;
function ZvalArrayAdd(z: pzval; idx: Integer; Args: array of const)
@@ -727,20 +707,24 @@ function ZValArrayKeyFind(v: pzval; idx: Integer; out pData: ppzval)
function GetArgPZval(Args: TVarRec; const _type: Integer = IS_LONG;
Make: Boolean = false): pzval;
procedure ZVAL_RESOURCE(value: pzval; l: longint);
-procedure ZVAL_BOOL(z: pzval; b: boolean);
-procedure ZVAL_NULL(z: pzval);
-procedure ZVAL_LONG(z: pzval; l: longint);
-procedure ZVAL_DOUBLE(z: pzval; d: double);
procedure ZVAL_EMPTY_STRING(z: pzval);
-procedure ZVAL_TRUE(z: pzval);
-procedure ZVAL_FALSE(z: pzval);
+
function add_next_index_variant(arg: pzval; value: variant): integer;
+function add_index_variant(arg: pzval; index:integer; value: variant): integer;
+function add_assoc_variant(arg: pzval; key: zend_pchar; key_len: uint; value: variant): integer;
+
procedure ZVAL_ARRAY(z: pzval; arr: TWSDate); overload;
procedure ZVAL_ARRAY(z: pzval; arr: TASDate); overload;
procedure ZVAL_ARRAY(z: pzval; arr: array of string); overload;
+{$IFDEF WSTR}
procedure ZVAL_ARRAY(z: pzval; arr: array of zend_ustr); overload;
+{$ENDIF}
procedure ZVAL_ARRAY(z: pzval; arr: array of variant); overload;
+{$if CompilerVersion > 21}
procedure ZVAL_ARRAY(z: pzval; arr: System.TArray); overload;
+{$else}
+procedure ZVAL_ARRAY(z: pzval; arr: array of integer); overload;
+{$ifend}
procedure ZVAL_ARRAY(z: pzval; arr: Variant); overload;
procedure ZVAL_ARRAYAC(z: pzval; keynames: Array of AnsiChar; keyvals: Array of AnsiChar);
procedure ZVAL_ARRAYWC(z: pzval; keynames: Array of PWideChar; keyvals: Array of PWideChar);
@@ -748,24 +732,38 @@ procedure ZVAL_ARRAYAS(z: pzval; keynames: Array of AnsiString; keyvals: Array o
procedure ZVAL_ARRAYAS(z: pzval; keynames: TASDate; keyvals: TASDate); overload;
procedure ZVAL_ARRAYWS(z: pzval; keynames: TWSDate; keyvals: TWSDate); overload;
procedure ZVAL_ARRAYWS(z: pzval; keynames: array of string; keyvals: array of string); overload;
-procedure HashToArray(HT: PHashTable; var AR: TArrayVariant); overload;
+procedure HashToArray(HT: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; var AR: TArrayVariant); overload;
procedure ArrayToHash(AR: Array of Variant; var HT: pzval); overload;
procedure ArrayToHash(Keys,AR: Array of Variant; var HT: pzval); overload;
-function ToStrA(V: Variant): zend_ustr;
-function ToStr(V: Variant): String;
+function ToStrA(V: Variant): AnsiString;
+function ToStrW(V: Variant): WideString;
+function ToStr(V: Variant): zend_ustr;
function toWChar(s: zend_pchar): PWideChar;
-function ZendToVariant(const Value: {$IFNDEF PHP700} pppzval {$ELSE} pzval{$ENDIF}): Variant; overload;
-function ZendToVariant(const Value: {$IFNDEF PHP700} ppzval {$ELSE} pzval{$ENDIF}): Variant; overload;
-
-procedure ZVAL_STRING(z: pzval; s: zend_pchar; duplicate: boolean);
-procedure ZVAL_STRINGU(z: pzval; s: PUtf8Char; duplicate: boolean);
-procedure ZVAL_STRINGW(z: pzval; s: PWideChar; duplicate: boolean);
-
+function ZendToVariant(const Value: pzval;cobj: TObjectBConvertMethod=nil): Variant;
+{$IFNDEF PHP7}
+overload;
+function ZendToVariant(const Value: ppzval;cobj: TObjectBConvertMethod=nil): Variant; overload;
+function ZendToVariant(const Value: pppzval;cobj: TObjectBConvertMethod=nil): Variant; overload;
+{$ENDIF}
+procedure VariantToZend(const Value: Variant; z: pzval;
+cobj: TObjectAConvertMethod=nil);
+{$IFDEF WSTR}
+procedure ZVAL_RawStr(z: pzval; s:RawByteString; duplicate: boolean);
+{$ENDIF}
+procedure ZVAL_STRING(z: pzval; s: WideString; duplicate: boolean);
+procedure ZVAL_STRINGU(z: pzval; s: UTF8String; duplicate: boolean);
+procedure ZVAL_STRINGW(z: pzval; StW: WideString; duplicate: boolean);
+procedure ZVAL_STRINGA(z: pzval; s: AnsiString; duplicate: boolean);
procedure ZVAL_STRINGL(z: pzval; s: zend_pchar; l: integer; duplicate: boolean);
procedure ZVAL_STRINGLW(z: pzval; s: PWideChar; l: integer; duplicate: boolean);
-procedure INIT_CLASS_ENTRY(var class_container: Tzend_class_entry; class_name: zend_pchar; functions: pointer);
-
+procedure INIT_CLASS_ENTRY(var class_container: Tzend_class_entry; class_name: zend_pchar; functions:
+{$IFDEF PHP7}HashTable{$ELSE}pointer{$ENDIF});
+procedure zend_copy_constant(c: zend_constant);
+{$IF defined(PHP520) or defined(PHP540) or defined(PHP550) or defined(PHP560)}
+procedure zend_copy_constants(target: PHashTable; source: PHashTable); cdecl;
+procedure zend_class_add_ref(aclass: Ppzend_class_entry); cdecl;
+{$IFEND}
var
get_zend_version : function(): zend_pchar; cdecl;
@@ -775,33 +773,26 @@ procedure INIT_CLASS_ENTRY(var class_container: Tzend_class_entry; class_name: z
zend_output_debug_string : procedure(trigger_break: boolean; Msg: zend_pchar); cdecl;
{$IFDEF PHP5}
+ {$IF not defined(PHP520) and not defined(PHP540) and not defined(PHP550) and not defined(PHP560)}
zend_copy_constants: procedure(target: PHashTable; source: PHashTable); cdecl;
- zend_objects_new : function (_object : pointer; class_type : pointer; TSRMLS_DC : pointer) : _zend_object_value; cdecl;
- zend_objects_clone_obj: function(_object: pzval; TSRMLS_DC : pointer): _zend_object_value; cdecl;
+ {$IFEND}
+ zend_objects_new : function (_object : pointer; class_type : pointer; TSRMLS_DC : pointer) : {$IFDEF PHP7}zend_object{$ELSE}_zend_object_value{$ENDIF}; cdecl;
+ zend_objects_clone_obj: function(_object: pzval; TSRMLS_DC : pointer): {$IFDEF PHP7}zend_object{$ELSE}_zend_object_value{$ENDIF}; cdecl;
zend_objects_store_add_ref: procedure (_object : pzval; TSRMLS_DC : pointer); cdecl;
zend_objects_store_del_ref: procedure (_object : pzval; TSRMLS_DC : pointer); cdecl;
- function_add_ref: procedure (func: PZendFunction); cdecl;
-
+ function_add_ref: procedure (func: {$IFDEF PHP7}Pzend_function{$ELSE}PZendFunction{$ENDIF}); cdecl;
+ {$IF not defined(PHP520) and not defined(PHP540) and not defined(PHP550) and not defined(PHP560)}
zend_class_add_ref: procedure(aclass: Ppzend_class_entry); cdecl;
-
+ {$IFEND}
{$ENDIF}
-
+{$IFNDEF COMPILER_VC9}
const
MSCRT = 'msvcrt.dll';
//Microsoft C++ functions
-
-{$IFDEF PHP4}
-function pipe(phandles : pointer; psize : uint; textmode : integer) : integer; cdecl; external MSCRT name '_pipe';
-procedure close(AHandle : THandle); cdecl; external MSCRT name '_close';
-function _write(AHandle : integer; ABuffer : pointer; count : uint) : integer; cdecl; external MSCRT name '_write';
-function setjmp(buf : jump_buf) : integer; cdecl; external MSCRT name '_setjmp3';
-{$ENDIF}
-
-{$IFNDEF COMPILER_VC9}
function strdup(strSource : zend_pchar) : zend_pchar; cdecl; external MSCRT name '_strdup';
{$ELSE}
function DupStr(strSource : zend_pchar) : zend_pchar; cdecl;
@@ -814,9 +805,6 @@ procedure ALLOC_ZVAL(out Result: pzval); overload;
procedure INIT_PZVAL(p: pzval);
function MAKE_STD_ZVAL: pzval; overload;
procedure MAKE_STD_ZVAL(out Result: pzval); overload;
-{$IFNDEF QUIET_LOAD}
-procedure CheckZendErrors;
-{$ENDIF}
var
PHPLib : THandle = 0;
@@ -825,34 +813,48 @@ procedure CheckZendErrors;
zend_ini_deactivate : function(TSRMLS_D : pointer) : integer; cdecl;
function GetGlobalResource(resource_name: AnsiString) : pointer;
-
+function GetGlobalResourceDC(resource_name: AnsiString;TSRMLS_DC:pointer) : pointer;
function GetCompilerGlobals : Pzend_compiler_globals;
function GetExecutorGlobals : pzend_executor_globals;
function GetAllocGlobals : pointer;
-function zend_register_functions(functions : pzend_function_entry; function_table : PHashTable; _type: integer; TSRMLS_DC : pointer) : integer;
-function zend_unregister_functions(functions : pzend_function_entry; count : integer; function_table : PHashTable; TSRMLS_DC : pointer) : integer;
+function zend_register_functions(functions : {$IFDEF PHP7}P_zend_function_entry{$ELSE}pzend_function_entry{$ENDIF}; function_table : {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; _type: integer; TSRMLS_DC : pointer) : integer;
+function zend_unregister_functions(functions : {$IFDEF PHP7}P_zend_function_entry{$ELSE}pzend_function_entry{$ENDIF}; count : integer; function_table : {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; TSRMLS_DC : pointer) : integer;
{$IFDEF PHP5}
var
- zend_get_std_object_handlers : function() : pzend_object_handlers;
+ zend_get_std_object_handlers : function() : {$IFDEF PHP7}P_zend_object_handlers{$ELSE}pzend_object_handlers{$ENDIF};
zend_objects_get_address : function (_object : pzval; TSRMLS_DC : pointer) : pzend_object; cdecl;
zend_is_true : function(z : pzval) : integer; cdecl;
function object_init(arg: pzval; ce: pzend_class_entry; TSRMLS_DC : pointer) : integer; cdecl; assembler;
-
function Z_LVAL(z : Pzval) : longint;
function Z_BVAL(z : Pzval) : boolean;
function Z_DVAL(z : Pzval) : double;
-function Z_STRVAL(z : Pzval) : zend_ustr;
+{$ifdef WSTR}
+function Z_RAWSTR(z: PZval): RawByteString;
+{$else}
+function Z_RAWSTR(z: PZval): TBytes;
+{$endif}
+
+function Z_STRVAL(z : Pzval) : WideString;
+function Z_ASTRVAL(z : Pzval) : AnsiString;
function Z_STRUVAL(z : PZval): UTF8String;
-function Z_STRWVAL(z : pzval) : String;
+function Z_SSTRVAL(z : pzval) : String;
+function Z_CHAR(z: PZval) : zend_uchar;
+function Z_WCHAR(z: PZval) : WideChar;
+function Z_ACHAR(z: PZVAL): AnsiChar;
+{$ifdef WSTR}
+function Z_UCHAR(z: PZVAL): UTF8Char;
+{$else}
+function Z_UCHAR(z: PZVAL): AnsiChar;
+{$endif}
function Z_STRLEN(z : Pzval) : longint;
function Z_ARRVAL(z : Pzval ) : PHashTable;
-function Z_OBJ_HANDLE(z :Pzval) : zend_object_handle;
-function Z_OBJ_HT(z : Pzval) : pzend_object_handlers;
-function Z_OBJPROP(z : Pzval) : PHashtable;
+function Z_OBJ_HANDLE(z :Pzval) : {$IFDEF PHP7} P_zend_object_handlers {$ELSE} zend_object_handle{$ENDIF};
+function Z_OBJ_HT(z : Pzval) : {$IFDEF PHP7}P_zend_object_handlers{$ELSE}pzend_object_handlers{$ENDIF};
+function Z_OBJPROP(z : Pzval;TSRMLS_DC:pointer=nil) : PHashTable;
function Z_VARREC(z: pzval): TVarRec;
procedure zend_addref_p(z: pzval); cdecl;
@@ -865,11 +867,32 @@ function Z_VARREC(z: pzval): TVarRec;
implementation
-function zend_hash_add(ht : PHashTable; arKey : zend_pchar; nKeyLength : uint; pData : pointer; nDataSize : uint; pDest : pointer) : integer; cdecl;
+function zend_hash_add(ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; arKey : zend_pchar; nKeyLength : uint; pData : pointer; nDataSize : uint; pDest : pointer) : integer; cdecl;
begin
result := zend_hash_add_or_update(ht, arKey, nKeyLength, pData, nDataSize, pDest, HASH_ADD);
end;
+{$IFDEF PHP7}
+function zend_hash_num_elements(ht: Pzend_array): integer;
+ begin
+ Result := integer(ht.nNumOfElements);
+ end;
+function add_char_to_string (_result: Pzval; op1: Pzval; op2: Pzval): Integer;
+Begin
+ Result := -1;
+ if op1.u1.v._type = IS_STRING then
+ begin
+ _result.value.str.len := op1.value.str.len + op2.value.str.len;
+ _result.value.str.val := op1.value.str.val + op2.value.str.val;
+ Result := SUCCESS;
+ end;
+End;
+function add_string_to_string(_result: Pzval; op1: Pzval; op2: Pzval): Integer;
+begin
+ Result := add_char_to_string(_result, op1, op2);
+end;
+{$ENDIF}
+
function STR_EMPTY_ALLOC : zend_pchar;
begin
Result := estrndup('', 0);
@@ -882,6 +905,7 @@ function estrndup(s: zend_pchar; len: Cardinal): zend_pchar;
else
Result := nil;
end;
+{$ifdef PHP_UNICODE}
function estrndupu(s: PUtf8Char; len: Cardinal): PUTf8Char;
begin
if assigned(s) then
@@ -889,6 +913,7 @@ function estrndupu(s: PUtf8Char; len: Cardinal): PUTf8Char;
else
Result := nil;
end;
+{$endif}
function emalloc(size: size_t): pointer;
begin
Result := _emalloc(size, nil, 0, nil, 0);
@@ -942,37 +967,32 @@ procedure REGISTER_MAIN_STRINGL_CONSTANT(name: zend_pchar; str: zend_pchar; len:
procedure ZVAL_RESOURCE(value: pzval; l: longint);
begin
- value^._type := IS_RESOURCE;
+ {$IFDEF PHP7}
+ value^.u1.v._type
+ {$ELSE}
+ value^._type
+ {$ENDIF} := IS_RESOURCE;
value^.value.lval := l;
end;
-procedure ZVAL_BOOL(z: pzval; b: boolean);
-begin
- z^._type := IS_BOOL;
- z^.value.lval := integer(b);
-end;
-
procedure ZVAL_NULL(z: pzval);
begin
- z^._type := IS_NULL;
-end;
-
-procedure ZVAL_LONG(z: pzval; l: longint);
-begin
- z^._type := IS_LONG;
- z^.value.lval := l;
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := IS_NULL;
end;
-procedure ZVAL_DOUBLE(z: pzval; d: double);
-begin
- z^._type := IS_DOUBLE;
- z^.value.dval := d;
-end;
procedure ZvalString(z:pzval);
begin
z^.value.str.len := 0;
z^.value.str.val := '';
- z^._type := IS_STRING;
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := IS_STRING;
end;
procedure ZvalString(z:pzval; s:zend_pchar; len:Integer = 0);
@@ -989,7 +1009,11 @@ procedure ZvalString(z:pzval; s:zend_pchar; len:Integer = 0);
z^.value.str.len := lens;
z^.value.str.val := estrndup(s, lens);
- z^._type := IS_STRING;
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := IS_STRING;
end;
end;
@@ -1012,59 +1036,67 @@ procedure ZvalString(z:pzval; s:string; len:Integer = 0);
else
ZvalString(z, _s, len);
end;
-function ZvalInt;
-begin
- Result := z.value.lval;
-end;
-
-function ZvalDouble;
-begin
- Result := z.value.dval;
-end;
-function ZvalBool;
-begin
- Result := boolean(z.value.lval);
-end;
-
-function ZvalStrS;
-begin
- Result := z.value.str.val;
-end;
-
-function ZvalStr;
-begin
- Result := z.value.str.val;
-end;
-
-function ZvalStrW;
-begin
- Result := WideString(z.value.str.val);
-end;
-
-procedure ZvalVAL(z:pzval; v:Boolean);
+procedure ZvalVAL(z:pzval; v:Boolean); overload;
Begin
- z._type := IS_BOOL;
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := IS_BOOL;
z.value.lval := integer(v);
End;
-procedure ZvalVAL(z:pzval; v:Integer; const _type:Integer = IS_LONG);
+procedure ZvalVAL(z:pzval; v:Integer; const _type:Integer = IS_LONG); overload;
Begin
- z._type := _type;
- z.value.lval := v;
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := _type;
+ z^.value.lval := v;
+End;
+
+procedure ZvalVAL(z:pzval); overload;
+Begin
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := IS_NULL;
End;
-procedure ZvalVAL(z:pzval);
+procedure ZvalVAL(z:pzval; v:Double); overload;
Begin
- z._type := IS_NULL;
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := IS_DOUBLE;
+ z.value.dval := v;
End;
-procedure ZvalVAL(z:pzval; v:Double);
+procedure ZvalVAL(z:pzval; v:SmallInt); overload;
+begin
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := IS_LONG;
+ z^.value.lval := v;
+end;
+
+procedure ZvalVAL(z:pzval; v:Extended); overload;
Begin
- z._type := IS_LONG;
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := IS_LONG;
z.value.dval := v;
End;
-procedure ZvalVAL(z: pzval; s: zend_ustr; len: Integer = 0);
+
+procedure ZvalVAL(z: pzval; s: zend_ustr; len: Integer = 0); overload;
var
lens: Integer;
AChar: zend_pchar;
@@ -1082,7 +1114,11 @@ procedure ZvalVAL(z: pzval; s: zend_ustr; len: Integer = 0);
z^.value.str.len := lens;
z^.value.str.val := _estrndup(AChar, lens, nil, 0, nil, 0);
- z^._type := IS_STRING;
+ {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} := IS_STRING;
end;
end;
@@ -1093,7 +1129,11 @@ function AddElementZvalArray(z: pzval; Args: array of const; flag: Integer;
arKey: zend_pchar;
begin
Result := FAILURE;
- if z._type <> IS_ARRAY then
+ if {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} <> IS_ARRAY then
exit;
if len <> 0 then
@@ -1104,17 +1144,23 @@ function AddElementZvalArray(z: pzval; Args: array of const; flag: Integer;
end;
tmp := GetArgPZval(Args[0], 1, true);
- Result := _zend_hash_quick_add_or_update(z.value.ht, arKey, len, idx, tmp,
+
+ Result := _zend_hash_quick_add_or_update(
+ {$IFDEF PHP7}z.value.arr{$ELSE}z.value.ht{$ENDIF}, arKey, len, idx, tmp,
sizeof(pzval), nil, flag);
end;
// Add Next
function ZvalArrayAdd(z: pzval; Args: array of const): Integer; overload;
begin
Result := FAILURE;
- if z._type <> IS_ARRAY then
+ if {$IFDEF PHP7}
+ z^.u1.v._type
+ {$ELSE}
+ z^._type
+ {$ENDIF} <> IS_ARRAY then
exit;
Result := AddElementZvalArray(z, Args, HASH_NEXT_INSERT,
- z.value.ht.nNextFreeElement);
+ {$IFDEF PHP7} z.value.arr.nNextFreeElement {$ELSE} z.value.ht.nNextFreeElement {$ENDIF});
end;
// Add Index
@@ -1133,37 +1179,45 @@ function ZvalArrayAdd(z: pzval; key: zend_ustr; Args: array of const)
function IsArrayRetVal(v: pzval): Boolean;
begin
- Result := v._type = IS_ARRAY;
+ Result := {$IFDEF PHP7}
+ v^.u1.v._type
+ {$ELSE}
+ v^._type
+ {$ENDIF} = IS_ARRAY;
end;
function ZValArrayKeyExists(v: pzval; key: zend_ustr): Boolean; overload;
begin
Result := false;
- if v._type <> IS_ARRAY then
+ if {$IFDEF PHP7}
+ v^.u1.v._type
+ {$ELSE}
+ v^._type
+ {$ENDIF} <> IS_ARRAY then
exit;
- if v.value.ht.nNumOfElements = 0 then
+ if {$IFDEF PHP7} v.value.arr.nNumOfElements {$ELSE} v.value.ht.nNumOfElements {$ENDIF} = 0 then
exit;
- Result := zend_hash_exists(v.value.ht, zend_pchar(key), Length(key) + 1) = 1;
+ Result := zend_hash_exists({$IFDEF PHP7}v.value.arr{$ELSE}v.value.ht{$ENDIF}, zend_pchar(key), Length(key) + 1) = 1;
end;
function ZValArrayKeyExists(v: pzval; idx: Integer): Boolean; overload;
begin
Result := false;
- if (v._type <> IS_ARRAY) then
+ if ({$IFDEF PHP7} v.u1.v._type {$ELSE} v._type {$ENDIF} <> IS_ARRAY) then
exit;
- if v.value.ht.nNumOfElements = 0 then
+ if {$IFDEF PHP7} v.value.arr.nNumOfElements {$ELSE} v.value.ht.nNumOfElements {$ENDIF} = 0 then
exit;
- Result := zend_hash_index_exists(v.value.ht, idx) = 1;
+ Result := zend_hash_index_exists({$IFDEF PHP7}v.value.arr{$ELSE}v.value.ht{$ENDIF}, idx) = 1;
end;
function ZValArrayKeyExists(v: pzval; key: zend_ustr; out pData: pzval)
: Boolean; overload;
var
- tmp: {$IFNDEF PHP700} ppzval {$ELSE} pzval{$ENDIF};
+ tmp: ppzval;
begin
Result := ZValArrayKeyExists(v, key);
if Result then
@@ -1177,7 +1231,7 @@ function ZValArrayKeyExists(v: pzval; key: zend_ustr; out pData: pzval)
function ZValArrayKeyExists(v: pzval; idx: Integer; out pData: pzval)
: Boolean; overload;
var
- tmp: {$IFNDEF PHP700} ppzval {$ELSE} pzval{$ENDIF};
+ tmp: ppzval;
begin
Result := ZValArrayKeyExists(v, idx);
if Result then
@@ -1189,22 +1243,46 @@ function ZValArrayKeyExists(v: pzval; idx: Integer; out pData: pzval)
end;
function ZValArrayKeyDel(v: pzval; key: zend_ustr): Boolean; overload;
+{$IFDEF PHP7}
+var
+ pzs: zend_pchar;
+{$ENDIF}
begin
Result := false;
if ZValArrayKeyExists(v, key) then
+ {$IFDEF PHP7}
+ begin
+ pzs^.len := strlen(zend_pchar(key));
+ pzs^.val := estrdup(zend_pchar(key));
+ Result := zend_hash_del_key_or_index(v.value.arr, pzs) = SUCCESS
+ end;
+ {$ELSE}
Result := zend_hash_del_key_or_index(v.value.ht, zend_pchar(key),
Length(key) + 1, 0, HASH_DEL_KEY) = SUCCESS;
+ {$ENDIF}
end;
function ZValArrayKeyDel(v: pzval; idx: Integer): Boolean; overload;
+{$IFDEF PHP7}
+var
+ pzs: zend_pchar;
+{$ENDIF}
begin
Result := false;
if ZValArrayKeyExists(v, idx) then
- Result := zend_hash_del_key_or_index(v.value.ht, nil, 0, idx,
+ {$IFDEF PHP7}
+ begin
+ pzs^.len := strlen(zend_pchar(inttostr(idx)));
+ pzs^.val := estrdup(zend_pchar(inttostr(idx)));
+ Result := zend_hash_del_key_or_index(v.value.arr, pzs) = SUCCESS
+ end;
+ {$ELSE}
+ Result := zend_hash_del_key_or_index({$IFDEF PHP7}v.value.arr{$ELSE}v.value.ht{$ENDIF}, nil, 0, idx,
HASH_DEL_INDEX) = SUCCESS;
+ {$ENDIF}
end;
-function ZValArrayKeyFind(v: pzval; key: zend_ustr; out pData: {$IFNDEF PHP700} ppzval {$ELSE} pzval{$ENDIF})
+function ZValArrayKeyFind(v: pzval; key: zend_ustr; out pData: ppzval)
: Boolean; overload;
var
keyStr: zend_pchar;
@@ -1213,14 +1291,14 @@ function ZValArrayKeyFind(v: pzval; key: zend_ustr; out pData: {$IFNDEF PHP700}
keyStr := zend_pchar(key);
KeyLength := Length(key) + 1;
- Result := zend_hash_quick_find(v.value.ht, keyStr, KeyLength,
+ Result := zend_hash_quick_find({$IFDEF PHP7}v.value.arr{$ELSE}v.value.ht{$ENDIF}, keyStr, KeyLength,
zend_hash_func(keyStr, KeyLength), pData) = SUCCESS;
end;
-function ZValArrayKeyFind(v: pzval; idx: Integer; out pData: {$IFNDEF PHP700} ppzval {$ELSE} pzval{$ENDIF})
+function ZValArrayKeyFind(v: pzval; idx: Integer; out pData: ppzval)
: Boolean; overload;
begin
- Result := zend_hash_quick_find(v.value.ht, nil, 0, idx, pData) = SUCCESS;
+ Result := zend_hash_quick_find({$IFDEF PHP7}v.value.arr{$ELSE}v.value.ht{$ENDIF}, nil, 0, idx, pData) = SUCCESS;
end;
procedure MAKE_STD_ZVAL(out Result: pzval);
begin
@@ -1232,13 +1310,18 @@ procedure MAKE_STD_ZVAL(out Result: pzval);
-function GetArgPZval;
+function GetArgPZval(Args: TVarRec; const _type: Integer = IS_LONG;
+ Make: Boolean = false): pzval;
begin
+ {$if CompilerVersion > 21}
if Args._Reserved1 = 0 then // nil
+ {$else}
+ if Integer(Args.VPointer) = 0 then
+ {$ifend}
begin
if Make then
MAKE_STD_ZVAL(Result);
- Result._type := IS_NULL;
+ {$IFDEF PHP7} Result.u1.v._type {$ELSE} Result._type {$ENDIF} := IS_NULL;
end
else if Args.VType = vtPointer then
Result := Args.VPointer
@@ -1255,18 +1338,31 @@ function GetArgPZval;
ZvalVAL(Result, Args.VBoolean);
vtExtended:
ZvalVAL(Result, Args.VExtended^);
+ {$if CompilerVersion > 21}
vtClass, vtObject:
ZvalVAL(Result, Args._Reserved1);
+ {$else}
+ vtClass:
+ ZvalVAL(Result, Integer(Args.VClass));
+ vtObject:
+ ZvalVAL(Result, Integer(Args.VObject));
+ {$ifend}
vtString:
ZvalVAL(Result, zend_ustr(Args.VString^));
vtAnsiString:
ZvalVAL(Result, zend_pchar(zend_ustr(Args.VAnsiString)));
+ {$ifdef WSTR}
vtUnicodeString:
+ {$if CompilerVersion > 21}
ZvalVAL(Result, UnicodeString(Args._Reserved1));
+ {$else}
+ ZvalVal(Result, UnicodeString(Args.VUnicodeString));
+ {$ifend}
+ {$endif}
vtWideChar:
- ZvalVAL(Result, zend_ustr(Args.VWideChar));
+ ZvalVAL(Result, zend_pchar(Args.VWideChar));
vtChar:
- ZvalVAL(Result, zend_pchar(zend_uchar(Args.VChar)));
+ ZvalVAL(Result, zend_pchar(Args.VChar));
vtPWideChar:
ZvalVAL(Result, Args.VPWideChar);
vtPChar:
@@ -1277,67 +1373,55 @@ function GetArgPZval;
end;
end;
-
-procedure ZVAL_STRINGU(z: pzval; s: PUtf8Char; duplicate: boolean);
+{$ifdef WSTR}
+procedure ZVAL_STRINGU(z: pzval; s: UTF8String; duplicate: boolean);
var
- __s : PUTF8Char;
+ sc: PUTF8Char;
begin
- if not assigned(s) then
- __s := ''
- else
- __s := s;
-
- z^.value.str.len := length(__s);
+ sc := PUtf8Char(s);
+ z^.value.str.len := Length(s);
if duplicate then
-
- z^.value.str.val := estrndup(__s, z^.value.str.len)
+ z^.value.str.val := estrndup(sc, z^.value.str.len)
else
- z^.value.str.val := __s;
+ z^.value.str.val := sc;
+
z^._type := IS_STRING;
end;
-procedure ZVAL_STRING(z: pzval; s: zend_pchar; duplicate: boolean);
-var
- __s : zend_pchar;
+procedure ZVAL_RawStr(z: pzval; s: RawByteString; duplicate: boolean);
+var _s: RawByteString;
begin
- if not assigned(s) then
- __s := ''
- else
- __s := s;
-
- z^.value.str.len := strlen(__s);
- if duplicate then
+ _s := s;
+ SetCodePage(_s, CP_UTF8, not IsUTF8String(_s));
+ ZVAL_STRINGU(z, UTF8String(_s), duplicate);
+end;
+{$endif}
- z^.value.str.val := estrndup(__s, z^.value.str.len)
- else
- z^.value.str.val := __s;
- z^._type := IS_STRING;
+procedure ZVAL_STRING(z: pzval; s: WideString; duplicate: boolean);
+begin
+ ZVAL_STRINGU(z, UTF8String(s), duplicate);
end;
-procedure ZVAL_STRINGW(z: pzval; s: PWideChar; duplicate: boolean);
+procedure ZVAL_STRINGW(z: pzval; StW: WideString; duplicate: boolean);
var
- __s : zend_pchar;
- StA : zend_ustr;
- StW : WideString;
+ St: UTF8String;
+ sc: PUTF8Char;
begin
- if not assigned(s) then
- __s := ''
- else
- begin
- StW := WideString(s);
- StA := zend_ustr(StW);
- __s := zend_pchar(StA);
- end;
-
- z^.value.str.len := strlen(__s);
+ St := UTF8String(StW);
+ sc := PUtf8Char(St);
+
+ z^.value.str.len := Length(St);
if duplicate then
-
- z^.value.str.val := estrndup(__s, z^.value.str.len)
+ z^.value.str.val := estrndup(sc, z^.value.str.len)
else
- z^.value.str.val := __s;
+ z^.value.str.val := sc;
+
z^._type := IS_STRING;
end;
-
+procedure ZVAL_STRINGA(z: pzval; s: AnsiString; duplicate: boolean);
+begin
+ ZVAL_STRINGU(z, UTF8String(s), duplicate);
+end;
procedure ZVAL_STRINGL(z: pzval; s: zend_pchar; l: integer; duplicate: boolean);
var
__s : zend_pchar;
@@ -1353,7 +1437,7 @@ procedure ZVAL_STRINGL(z: pzval; s: zend_pchar; l: integer; duplicate: boolean);
z^.value.str.val := estrndup(__s, __l)
else
z^.value.str.val := __s;
- z^._type := IS_STRING;
+ {$IFDEF PHP7} z^.u1.v._type {$ELSE} z^._type {$ENDIF} := IS_STRING;
end;
procedure ZVAL_STRINGLW(z: pzval; s: PWideChar; l: integer; duplicate: boolean);
@@ -1378,44 +1462,34 @@ procedure ZVAL_STRINGLW(z: pzval; s: PWideChar; l: integer; duplicate: boolean);
z^.value.str.val := estrndup(__s, __l)
else
z^.value.str.val := __s;
- z^._type := IS_STRING;
+ {$IFDEF PHP7} z^.u1.v._type {$ELSE} z^._type {$ENDIF} := IS_STRING;
end;
procedure ZVAL_EMPTY_STRING(z: pzval);
begin
z^.value.str.len := 0;
- // {$IFDEF PHP510}
z^.value.str.val := STR_EMPTY_ALLOC;
- (*{$ELSE}
- z^.value.str.val := '';
- {$ENDIF}*)
- z^._type := IS_STRING;
+ {$IFDEF PHP7} z^.u1.v._type {$ELSE} z^._type {$ENDIF} := IS_STRING;
end;
-procedure ZVAL_TRUE(z: pzval);
+function ToStrA(V: Variant): AnsiString;
begin
- z^._type := IS_BOOL;
- z^.value.lval := 1;
+ Result := V;
end;
-procedure ZVAL_FALSE(z: pzval);
-begin
- z^._type := IS_BOOL;
- z^.value.lval := 0;
-end;
-function ToStrA(V: Variant): zend_ustr;
+function ToStr(V: Variant): zend_ustr;
begin
Result := V;
end;
-function ToStr(V: Variant): String;
+function ToStrW(V: Variant): WideString;
begin
Result := V;
end;
function ToPChar(V: Variant): zend_pchar;
begin
- Result := zend_pchar(ToStr(V));
+ Result := zend_pchar(zend_ustr(V));
end;
function toWChar(s: zend_pchar): PWideChar;
@@ -1427,36 +1501,203 @@ function toWChar(s: zend_pchar): PWideChar;
ss := ss2;
Result := PWideChar(ss);
end;
+function HashToVarArray(const Value:{$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}): Variant;
+ Var
+ Len,I: Integer;
+ {$IFDEF PHP7}tmp : pzval;{$ELSE}tmp : pppzval;{$ENDIF}
+begin
+ len := zend_hash_num_elements(Value);
+ Result := VarArrayCreate([0, len - 1], varVariant);
+ for i:=0 to len-1 do
+ begin
+ new(tmp);
-function ZendToVariant(const Value: {$IFNDEF PHP700} pppzval {$ELSE} pzval{$ENDIF}): Variant; overload;
+ zend_hash_index_find(Value,i,tmp);
+
+ VarArrayPut(Result, ZendToVariant(tmp), [i]);
+ freemem(tmp);
+ end;
+end;
+procedure VarArrayToHash(var HT: pzval;Value: Variant);
Var
- S: String;
+ I,Len: Integer;
+begin
+ _array_init(ht,nil,1);
+ len := TVarData(Value).VArray^.Bounds[0].ElementCount;
+ for i:= 0 to len - 1 do
+ begin
+ add_index_variant(HT, i, VarArrayGet(Value, [i]));
+ end;
+end;
+function ZendToVariant(const Value: pzval;
+cobj: TObjectBConvertMethod=nil): Variant; overload;
begin
- case Value^^^._type of
- 1: Result := Value^^^.value.lval;
- 2: Result := Value^^^.value.dval;
- 6: begin S := Value^^^.value.str.val; Result := S; end;
- 4,5: Result := Null;
+ case {$IFDEF PHP7} Value^.u1.v._type {$ELSE}Value^._type{$ENDIF} of
+ 0: Result := Null; //Null
+ 1: Result := Value^.value.lval; //LongInt -> Integer
+ 2: Result := Value^.value.dval; //Double
+ 3: Result := boolean(Value^.value.lval); //Boolean
+ {$IFDEF PHP7}
+ 4: Result := HashToVarArray(Value^.value.arr);//Array
+ {$ELSE}
+ 4: Result := HashToVarArray(Value^.value.ht);//Array
+ {$ENDIF}
+ 5: //Object
+ if Assigned(cobj) then
+ Result := cobj(Value)
+ else
+ Result := Null;
+ 6: Result := Z_STRVAL(Value); //String
+ 7: Result := Value^.value.lval; //Resource
+ //Constant
+ 8: Result := Z_STRVAL(Value);
+ {$IFDEF PHP7}
+ 9: Result := HashToVarArray(Value^.value.arr) //Constant Array
+ {$ELSE}
+ 9: Result := HashToVarArray(Value^.value.ht) //Constant Array
+ {$ENDIF}
+ else Result := Null; //Unknown/undefined
end;
end;
-function ZendToVariant(const Value: {$IFNDEF PHP700} ppzval {$ELSE} pzval{$ENDIF}): Variant; overload;
- Var
- S: String;
-begin
-Result := Null;
- case Value^^._type of
- 1: Result := Value^^.value.lval;
- 2: Result := Value^^.value.dval;
- 6: begin S := Value^^.value.str.val; Result := S; end;
- 4,5: Result := Null;
- end;
+procedure VariantToZend(const Value:Variant;z:pzval;
+cobj: TObjectAConvertMethod=nil);
+var
+ W : WideString;
+begin
+ if VarIsEmpty(value) or VarIsNull(Value) then
+ begin
+ ZVALVAL(z);
+ Exit;
+ end;
+ case TVarData(Value).VType of
+ varString :
+ begin
+ if Assigned ( TVarData(Value).VString ) then
+ begin
+ ZVAL_STRINGA(z, AnsiString(PAnsiChar(TVarData(Value).VString)), true);
+ end
+ else
+ begin
+ ZVAL_STRING(z, '', true);
+ end;
+ end;
+ {$ifdef VERSION12}
+ varUString :
+ ZVAL_RawStr(z, RawByteString(TVarData(Value).VUString), true);
+ {$endif}
+ varOleStr :
+ begin
+ if Assigned ( TVarData(Value).VOleStr ) then
+ begin
+ W := WideString(Pointer(TVarData(Value).VOleStr));
+ ZVAL_STRINGW(z, PWideChar(W), true);
+ end
+ else
+ begin
+ ZVAL_STRING(z, '', true);
+ end;
+ end;
+
+ varWord : ZVALVAL(z, TVarData(Value).VWord);
+ //HERE;
+ // varVariant :
+ // varUnknown :
+ //<=== ������� ������ ����� VarIs{TYPE}()
+
+ //varDispatch : integer(TVarData(Value).VDispatch
+ //<==��������� �� ���������� �������... �� ����� �� �����
+ //������� �� ����� � ����� Dispatch (�����, ������)... ����� �
+ //�� ����� � ������ ����.��
+ varDispatch :
+ begin
+ if Assigned(cobj) then
+ cobj(Value, z)
+ else
+ ZVALVAL(z);
+ end;
+ //varAny : integer(TVarData(Value).VAny
+ //<==��������� �� �����*(�����)
+ //
+ varAny :
+ begin
+ if Assigned(cobj) then
+ cobj(Value, z)
+ else
+ ZVALVAL(z);
+ end;
+ //varRecord : integer(TVarData(Value).VRecord)
+ //<==������... � �� ��� ��� �� ���������� ��� � ���� ����� RTTI ��������
+ {$if CompilerVersion > 21}
+ varRecord :
+ begin
+ if Assigned(cobj) then
+ cobj(Value, z)
+ else
+ ZVALVAL(z);
+ end;
+
+ //varObject : integer(TVarData(Value).VObject)
+ //<==������...
+ varObject :
+ begin
+ if Assigned(cobj) then
+ cobj(Value, z)
+ else
+ ZVALVAL(z, integer(TObject(TVarData(Value).VPointer^)));
+ end;
+ {$ifend}
+
+ varStrArg :
+ begin
+ if Assigned ( TVarData(Value).VString ) then
+ begin
+ ZVAL_STRINGA(z, AnsiString(PAnsiChar(TVarData(Value).VString)), true);
+ end
+ else
+ begin
+ ZVAL_STRING(z, '', true);
+ end;
+ end;
+ {$if CompilerVersion > 21}
+ varUStrArg : ZVAL_RawStr(z, RawByteString(TVarData(Value).VUString), true);
+ {$ifend}
+ varInt64 : ZVALVAL(z, TVarData(Value).VInt64);
+ {$ifdef VERSION14}
+ varUInt64 : ZVALVAL(z, TVarData(Value).VUInt64);
+ {$endif}
+ varShortInt : ZVALVAL(z, Integer(TVarData(Value).VShortInt));
+ varSmallInt : ZVALVAL(z, Integer(TVarData(Value).VSmallint));
+ varInteger : ZVALVAL(z, TVarData(Value).VInteger);
+ varBoolean : ZVALVAL(z, TVarData(Value).VBoolean);
+ varSingle : ZVALVAL(z, TVarData(Value).VSingle);
+ varDouble : ZVALVAL(z, TVarData(Value).VDouble);
+ varCurrency : ZVALVAL(z, TVarData(Value).VCurrency);
+ //!>
+ varError : ZVALVAL(z, Integer(TVarData(Value).VError));
+
+ varByte : ZVALVAL(z, Integer(TVarData(Value).VByte));
+ varDate : ZVALVAL(z, TVarData(Value).VDate);
+ varArray : VarArrayToHash(z, Value);
+ else
+ ZVALVAL(Z);
+ end;
end;
-procedure HashToArray(HT: PHashTable; var AR: TArrayVariant); overload;
+function ZendToVariant(const Value: ppzval;cobj: TObjectBConvertMethod=nil): Variant; overload;
+begin
+Result := ZendToVariant(Value^);
+end;
+
+function ZendToVariant(const Value: pppzval;cobj: TObjectBConvertMethod=nil): Variant; overload;
+begin
+Result := ZendToVariant(Value^^);
+end;
+
+procedure HashToArray(HT: {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; var AR: TArrayVariant); overload;
Var
Len,I: Integer;
- tmp : {$IFNDEF PHP700} pppzval {$ELSE} pzval{$ENDIF};
+ tmp : pppzval;
begin
len := zend_hash_num_elements(HT);
SetLength(AR,len);
@@ -1480,45 +1721,24 @@ procedure ArrayToHash(AR: Array of Variant; var HT: pzval); overload;
len := Length(AR);
for i:=0 to len-1 do
begin
- case VarType(AR[i]) of
- varInteger, varSmallint, varLongWord, 17: add_index_long(ht,i,AR[i]);
- varDouble,varSingle: add_index_double(ht,i,AR[i]);
- varBoolean: add_index_bool(ht,i,AR[I]);
- varEmpty: add_index_null(ht,i);
- varString: add_index_string(ht,i,zend_pchar(ToStr(AR[I])),1);
- 258: add_index_string(ht,i,zend_pchar(zend_ustr(ToStr(AR[I]))),1);
- end;
+ add_index_variant(ht,i,AR[i]);
end;
end;
procedure ArrayToHash(Keys,AR: Array of Variant; var HT: pzval); overload;
Var
I,Len: Integer;
- v: Variant;
- key: zend_pchar;
- s: zend_pchar;
begin
_array_init(ht,nil,1);
len := Length(AR);
for i:=0 to len-1 do
begin
- v := AR[I];
- key := zend_pchar(ToStrA(keys[i]));
- s := zend_pchar(ToStrA(v));
- case VarType(AR[i]) of
- varInteger, varSmallint, varLongWord, 17: add_assoc_long_ex(ht,ToPChar(Keys[i]),strlen(ToPChar(Keys[i]))+1,AR[i]);
- varDouble,varSingle: add_assoc_double_ex(ht,ToPChar(Keys[i]),strlen(ToPChar(Keys[i]))+1,AR[i]);
- varBoolean: add_assoc_bool_ex(ht,ToPChar(Keys[i]),strlen(ToPChar(Keys[i]))+1,AR[I]);
- varEmpty: add_assoc_null_ex(ht,ToPChar(Keys[i]),strlen(ToPChar(Keys[i]))+1);
- varString,258: add_assoc_string_ex(ht,key,strlen(key)+1,s,1);
- end;
+ add_assoc_variant(ht, ToPChar(Keys[i]),strlen(ToPChar(Keys[i]))+1,AR[i]);
end;
end;
function add_next_index_variant(arg: pzval; value: variant): integer;
var iz: pzval;
- W: WideString;
- S: String;
begin
iz := MAKE_STD_ZVAL;
if VarIsEmpty(value) then
@@ -1527,68 +1747,55 @@ function add_next_index_variant(arg: pzval; value: variant): integer;
Result := add_next_index_zval(arg, iz);
Exit;
end;
- // MessageBoxA(0, zend_pchar(AnsiString( TVarData(Value).VType.ToString)), '', 0 ) ;
- case TVarData(Value).VType of
- varString : //Peter Enz
- begin
- if Assigned ( TVarData(Value).VString ) then
- begin
- ZVAL_STRING(iz, TVarData(Value).VString , true);
- end
- else
- begin
- ZVAL_STRING(iz, '', true);
- end;
- end;
-
- varUString : //Peter Enz
- begin
- S := string(TVarData(Value).VUString);
+ VariantToZend(Value,iz);
+ Result := add_next_index_zval(arg, iz);
+end;
- ZVAL_STRING(iz, zend_pchar(zend_ustr(S)), true);
- end;
+function add_index_variant(arg: pzval; index:integer; value: variant): integer;
+var iz: pzval;
+begin
+ iz := MAKE_STD_ZVAL;
+ if VarIsEmpty(value) then
+ begin
+ ZVAL_NULL(iz);
+ Result := add_index_zval(arg, index, iz);
+ Exit;
+ end;
+ VariantToZend(Value,iz);
+ Result := add_index_zval(arg, index, iz);
+end;
- varOleStr : //Peter Enz
- begin
- if Assigned ( TVarData(Value).VOleStr ) then
- begin
- W := WideString(Pointer(TVarData(Value).VOleStr));
- ZVAL_STRINGW(iz, PWideChar(W), true);
- end
- else
- begin
- ZVAL_STRING(iz, '', true);
- end;
- end;
- varSmallInt : ZVAL_LONG(iz, TVarData(Value).VSmallint);
- varInteger : ZVAL_LONG(iz, TVarData(Value).VInteger);
- varBoolean : ZVAL_BOOL(iz, TVarData(Value).VBoolean);
- varSingle : ZVAL_DOUBLE(iz, TVarData(Value).VSingle);
- varDouble : ZVAL_DOUBLE(iz, TVarData(Value).VDouble);
- varError : ZVAL_LONG(iz, TVarData(Value).VError);
- varByte : ZVAL_LONG(iz, TVarData(Value).VByte);
- varDate : ZVAL_DOUBLE(iz, TVarData(Value).VDate);
- else
- ZVAL_NULL(iz);
+function add_assoc_variant(arg: pzval; key: zend_pchar; key_len: uint; value: variant): integer;
+var iz: pzval;
+begin
+ iz := MAKE_STD_ZVAL;
+ if VarIsEmpty(value) then
+ begin
+ ZVAL_NULL(iz);
+ Result := add_assoc_zval_ex(arg, key, key_len, iz);
+ Exit;
end;
-
- Result := add_next_index_zval(arg, iz);
+ VariantToZend(Value,iz);
+ Result := add_assoc_zval_ex(arg, key, key_len, iz);
end;
-
procedure ZVAL_ARRAY(z: pzval; arr: TWSDate); overload;
var
i : integer;
begin
if _array_init(z, nil, 0) = FAILURE then //������ ������ ������� ������
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
Exit;
end;
if Length(arr) = 0 then
begin
- z^.refcount := 1;
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
Exit;
end;
@@ -1605,19 +1812,23 @@ procedure ZVAL_ARRAY(z: pzval; arr: TASDate); overload;
begin
if _array_init(z, nil, 0) = FAILURE then //������ ������ ������� ������
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
Exit;
end;
if Length(arr) = 0 then
begin
- z^.refcount := 1;
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
Exit;
end;
for i := 0 to Length(arr)-1 do
begin
- add_next_index_string(z, zend_pchar(arr[i]), 1);
+ add_next_index_string(z, zend_pchar(zend_ustr(arr[i])), 1);
end;
Exit;
end;
@@ -1628,13 +1839,17 @@ procedure ZVAL_ARRAY(z: pzval; arr: array of string); overload;
begin
if _array_init(z, nil, 0) = FAILURE then //������ ������ ������� ������
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
Exit;
end;
if Length(arr) = 0 then
begin
- z^.refcount := 1;
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
Exit;
end;
@@ -1644,20 +1859,24 @@ procedure ZVAL_ARRAY(z: pzval; arr: array of string); overload;
end;
Exit;
end;
-
+{$ifdef WSTR}
procedure ZVAL_ARRAY(z: pzval; arr: array of zend_ustr); overload;
var
i: integer;
begin
if _array_init(z, nil, 0) = FAILURE then //������ ������ ������� ������
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
Exit;
end;
if Length(arr) = 0 then
begin
- z^.refcount := 1;
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
Exit;
end;
@@ -1667,6 +1886,7 @@ procedure ZVAL_ARRAY(z: pzval; arr: array of zend_ustr); overload;
end;
Exit;
end;
+{$endif}
procedure ZVAL_ARRAY(z: pzval; arr: array of variant); overload;
var
@@ -1674,13 +1894,17 @@ procedure ZVAL_ARRAY(z: pzval; arr: array of variant); overload;
begin
if _array_init(z, nil, 0) = FAILURE then //������ ������ ������� ������
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
Exit;
end;
if Length(arr) = 0 then
begin
- z^.refcount := 1;
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
Exit;
end;
@@ -1690,19 +1914,28 @@ procedure ZVAL_ARRAY(z: pzval; arr: array of variant); overload;
end;
Exit;
end;
+
+{$if CompilerVersion > 21}
procedure ZVAL_ARRAY(z: pzval; arr: System.TArray); overload;
+{$else}
+procedure ZVAL_ARRAY(z: pzval; arr: array of integer); overload;
+{$ifend}
var
i: integer;
begin
if _array_init(z, nil, 0) = FAILURE then //������ ������ ������� ������
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
Exit;
end;
if Length(arr) = 0 then
begin
- z^.refcount := 1;
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
Exit;
end;
@@ -1716,67 +1949,22 @@ procedure ZVAL_ARRAY(z: pzval; arr: System.TArray); overload;
procedure ZVAL_ARRAY(z: pzval; arr: Variant); overload;
var
i: integer;
- V: TVarData;
+ {V: TVarData;}
begin
if _array_init(z, nil, 0) = FAILURE then //������ ������ ������� ������
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
Exit;
end;
if arr.PVarArray.DimCount = 0 then
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
Exit;
end;
for i := 0 to arr.DimCount-1 do
begin
- {V := TVarData( arr[i] );
- case V.VType of
- varEmpty, varNull:
- add_next_index_null(z);
- varSmallInt:
- add_next_index_string(z, zend_pchar(zend_ustr(IntToStr(V.VSmallInt))), 1);
- varInteger:
- add_next_index_string(z, zend_pchar(zend_ustr(IntToStr(V.VInteger))), 1);
- varSingle:
- add_next_index_string(z, zend_pchar(zend_ustr(V.VSingle.ToString())), 1);
- varDouble:
- add_next_index_double(z, V.VDouble);
- varCurrency:
- add_next_index_string(z, zend_pchar(zend_ustr(CurrToStr(V.VCurrency))), 1);
- varDate:
- add_next_index_string(z, zend_pchar(zend_ustr(DateTimeToStr(V.VDate))), 1);
- varOleStr:
- add_next_index_string(z, zend_pchar(zend_ustr(V.VOleStr)), 1);
- varBoolean:
- add_next_index_bool(z, V.VBoolean.ToInteger());
- varByte:
- add_next_index_string(z, zend_pchar(zend_ustr(IntToStr(V.VByte))), 1);
- varWord:
- add_next_index_string(z, zend_pchar(zend_ustr(IntToStr(V.VWord))), 1);
- varShortInt:
- add_next_index_string(z, zend_pchar(zend_ustr(IntToStr(V.VShortInt))), 1);
- varLongWord:
- add_next_index_long(z, V.VLongWord);
- varInt64:
- add_next_index_string(z, zend_pchar(zend_ustr(IntToStr(V.VInt64))), 1);
- varString:
- add_next_index_string(z, zend_pchar(zend_ustr(V.VString)), 1);
- {$IFDEF SUPPORTS_UNICODE_STRING}{
- varUString:
- add_next_index_string(z, zend_pchar(zend_ustr(V.VUString)), 1);
- {$ENDIF SUPPORTS_UNICODE_STRING}
- {varArray,
- varDispatch,
- varError,
- varUnknown,
- varAny,
- varByRef:}{
- varObject:
- add_next_index_long(z, Integer(
- end; }
add_next_index_variant(z, arr[i]);
end;
Exit;
@@ -1788,24 +1976,28 @@ procedure ZVAL_ARRAYAC(z: pzval; keynames: Array of ansichar; keyvals: Array of
begin
if _array_init(z, nil, 0) = FAILURE then
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
Exit;
end;
if (Length(keynames) = 0)and(Length(keynames) = Length(keyvals)) then
begin
- z^.refcount := 1;
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
Exit;
end;
if Length(keynames) = Length(keyvals) then
begin
for i := 0 to Length(keynames)-1 do
- add_assoc_string_ex(z, zend_pchar(zend_uchar(keynames[i])), StrLen(PAnsiChar(keynames[i])) + 1, zend_pchar(zend_uchar(keyvals[i])), 1);
+ add_assoc_string_ex(z, zend_pchar(zend_ustr(keynames[i])), Length(zend_ustr(keynames[i])) + 1, zend_pchar(zend_ustr(keyvals[i])), 1);
end
else
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
end;
end;
procedure ZVAL_ARRAYWC(z: pzval; keynames: Array of PWideChar; keyvals: Array of PWideChar);
@@ -1814,13 +2006,17 @@ procedure ZVAL_ARRAYWC(z: pzval; keynames: Array of PWideChar; keyvals: Array of
begin
if _array_init(z, nil, 0) = FAILURE then
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
Exit;
end;
if (Length(keynames) = 0)and(Length(keynames) = Length(keyvals)) then
begin
- z^.refcount := 1;
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
Exit;
end;
@@ -1828,13 +2024,13 @@ procedure ZVAL_ARRAYWC(z: pzval; keynames: Array of PWideChar; keyvals: Array of
begin
for i := 0 to Length(keynames)-1 do
begin
- add_assoc_string_ex(z, zend_pchar(keynames[i]), StrLen(zend_pchar(keynames[i])) + 1, zend_pchar(keyvals[i]), 1);
+ add_assoc_string_ex(z, zend_pchar(zend_ustr(keynames[i])), Length(zend_ustr(keynames[i])) + 1, zend_pchar(zend_ustr(keyvals[i])), 1);
end;
Exit;
end
else
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
Exit;
end;
@@ -1845,13 +2041,17 @@ procedure ZVAL_ARRAYWS(z: pzval; keynames: TWSDate; keyvals: TWSDate); overloa
begin
if _array_init(z, nil, 0) = FAILURE then //������ ������ ������� ������
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
Exit;
end;
//z^.refcount := Length(keynames); //������� ���������� ������������ ��������
if (Length(keynames) = 0) then
begin
- z^.refcount := 1;
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
Exit;
end;
@@ -1861,7 +2061,7 @@ procedure ZVAL_ARRAYWS(z: pzval; keynames: TWSDate; keyvals: TWSDate); overloa
begin
//������ ������ � ������� ������� ������
//������ ���������� ������ � ������ ������� ������
- add_assoc_string_ex(z, zend_pchar(zend_ustr(keynames[i])), StrLen(zend_pchar(zend_ustr(keynames[i]))) + 1,
+ add_assoc_string_ex(z, zend_pchar(zend_ustr(keynames[i])), Length(zend_ustr(keynames[i])) + 1,
zend_pchar(zend_ustr(keyvals[i])), 1);
//���������� ����
@@ -1870,7 +2070,7 @@ procedure ZVAL_ARRAYWS(z: pzval; keynames: TWSDate; keyvals: TWSDate); overloa
end
else
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
Exit;
end;
@@ -1881,13 +2081,17 @@ procedure ZVAL_ARRAYWS(z: pzval; keynames: array of string; keyvals: array of
begin
if _array_init(z, nil, 0) = FAILURE then
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
Exit;
end;
if (Length(keynames) = 0)and(Length(keynames) = Length(keyvals)) then
begin
- z^.refcount := 1;
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
Exit;
end;
@@ -1895,14 +2099,14 @@ procedure ZVAL_ARRAYWS(z: pzval; keynames: array of string; keyvals: array of
begin
for i := 0 to Length(keynames)-1 do
begin
- add_assoc_string_ex(z, zend_pchar(zend_ustr(keynames[i])), StrLen(zend_pchar(zend_ustr(keynames[i]))) + 1,
+ add_assoc_string_ex(z, zend_pchar(zend_ustr(keynames[i])), Length(zend_ustr(keynames[i])) + 1,
zend_pchar(zend_ustr(keyvals[i])), 1);
end;
Exit;
end
else
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
Exit;
end;
@@ -1913,13 +2117,17 @@ procedure ZVAL_ARRAYAS(z: pzval; keynames: TASDate; keyvals: TASDate); overload;
begin
if _array_init(z, nil, 0) = FAILURE then
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
Exit;
end;
if (Length(keynames) = 0)and(Length(keynames) = Length(keyvals)) then
begin
- z^.refcount := 1;
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
Exit;
end;
@@ -1927,13 +2135,13 @@ procedure ZVAL_ARRAYAS(z: pzval; keynames: TASDate; keyvals: TASDate); overload;
begin
for i := 0 to Length(keynames)-1 do
begin
- add_assoc_string_ex(z, zend_pchar(keynames[i]), StrLen(zend_pchar(keynames[i])) + 1, zend_pchar(keyvals[i]), 1);
+ add_assoc_string_ex(z, zend_pchar(zend_ustr(keynames[i])), Length(zend_ustr(keynames[i])) + 1, zend_pchar(zend_ustr(keyvals[i])), 1);
end;
Exit;
end
else
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
Exit;
end;
@@ -1944,13 +2152,17 @@ procedure ZVAL_ARRAYAS(z: pzval; keynames: Array of AnsiString; keyvals: Array o
begin
if _array_init(z, nil, 0) = FAILURE then
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
Exit;
end;
if (Length(keynames) = 0)and(Length(keynames) = Length(keyvals)) then
begin
- z^.refcount := 1;
+ {$IFDEF PHP7}
+ z^.value.counted.gc.refcount
+ {$ELSE}
+ z^.refcount
+ {$ENDIF} := 1;
Exit;
end;
@@ -1958,13 +2170,13 @@ procedure ZVAL_ARRAYAS(z: pzval; keynames: Array of AnsiString; keyvals: Array o
begin
for i := 0 to Length(keynames)-1 do
begin
- add_assoc_string_ex(z, zend_pchar(zend_ustr(keynames[i])), StrLen(PAnsiChar(keynames[i])) + 1, zend_pchar(zend_ustr(keyvals[i])), 1);
+ add_assoc_string_ex(z, zend_pchar(zend_ustr(keynames[i])), Length(zend_ustr(keynames[i])) + 1, zend_pchar(zend_ustr(keyvals[i])), 1);
end;
Exit;
end
else
begin
- ZVAL_FALSE(z);
+ ZVALVAL(z,False);
Exit;
end;
@@ -1977,24 +2189,85 @@ function ZENDLoaded: boolean;
procedure UnloadZEND;
var
H : THandle;
+ t: Integer;
begin
- H := InterlockedExchange(Integer(PHPLib), 0);
+ t := Integer(PHPLib);
+ H := InterlockedExchange(t, 0);
if H > 0 then
begin
FreeLibrary(H);
end;
end;
+{$ifdef VERSION12}
+function Lfunc(var Func: Pointer; addr: LPCWSTR): BOOL;
+{$else}
+function Lfunc(var Func: Pointer; addr: PAnsiChar): BOOL;
+{$endif}
+begin
+ Result := True;
+ Func := GetProcAddress(PHPLib, addr);
+ if Func = nil then
+ begin
+ {$IFNDEF QUIET_LOAD}
+ raise EPHP4DelphiException.Create(addr);
+ {$ENDIF}
+ Result := False;
+ end;
+end;
+{$ifdef VERSION12}
+function HFunc(const Func: Pointer; addr: LPCWSTR): BOOL;
+{$else}
+function HFunc(const Func: Pointer; addr: PAnsiChar): Bool;
+{$endif}
+var fr: FARPROC;
+begin
+ Result := True;
+
+ fr := GetProcAddress(PHPLib, addr);
+ if (Func = nil) or (fr = nil) then
+ begin
+ {$IFNDEF QUIET_LOAD}
+ raise EPHP4DelphiHookException.Create(addr);
+ {$ENDIF}
+ Result := False;
+ end else
+ begin
+ if ppointer(fr)^ <> Func then
+ ppointer(fr)^ := Func;
+ end;
+end;
+procedure zend_copy_constant(c: zend_constant);
+begin
+ c.name := zend_strndup(c.name, c.name_len - 1);
+ if (c.flags and CONST_PERSISTENT) = 0 then
+ _zval_copy_ctor_func(@c.value, '', 0);
+end;
+{$if defined(PHP520) or defined(PHP540) or defined(PHP550) or defined(PHP560)}
+
+procedure zend_copy_constants(target: PHashTable;source: PHashTable);
+var tmp: zend_constant;
+begin
+ zend_hash_copy(target, source, @zend_copy_constant, @tmp, sizeof(zend_constant));
+end;
-function LoadZEND(const DllFilename: zend_ustr = PHPWin) : boolean;
+procedure zend_class_add_ref(aclass: Ppzend_class_entry); cdecl;
+begin
+ Inc(aclass^.refcount,1);
+end;
+{$IFEND}
+function LoadZEND(const LibraryPath: zend_ustr = PHPlp) : boolean;
var
WriteFuncPtr : pointer;
begin
{$IFDEF QUIET_LOAD}
Result := false;
{$ENDIF}
- PHPLib := {$IFDEF PHP_UNICE}LoadLibrary( PWideChar(WideString(DllFilename)) ){$ELSE}LoadLibraryA(zend_pchar(DllFileName)){$ENDIF};
-
+ {$if CompilerVersion >= 20}
+ PHPLib := LoadLibrary( PWideChar(WideString(LibraryPath)) );
+ {$else}
+ PHPLib := LoadLibrary( String( LibraryPath ) );
+ {$ifend}
{$IFNDEF QUIET_LOAD}
if PHPLib = 0 then
begin
@@ -2006,53 +2279,57 @@ function LoadZEND(const DllFilename: zend_ustr = PHPWin) : boolean;
{$ENDIF}
{$IFDEF PHP5}
- zend_copy_constants := GetProcAddress(PHPLib, 'zend_copy_constants');
- zend_objects_new := GetProcAddress(PHPLib, 'zend_objects_new');
- zend_objects_clone_obj := GetProcAddress(PHPLib, 'zend_objects_clone_obj');
- function_add_ref := GetProcAddress(PHPLib, 'function_add_ref');
- zend_class_add_ref := GetProcAddress(PHPLib, 'zend_class_add_ref');
-
- zend_objects_store_add_ref := GetProcAddress(PHPLib, 'zend_objects_store_add_ref');
- zend_objects_store_del_ref := GetProcAddress(PHPLib, 'zend_objects_store_del_ref');
-
- zend_get_std_object_handlers := GetProcAddress(PHPLib, 'zend_get_std_object_handlers');
- zend_objects_get_address := GetProcAddress(PHPLib, 'zend_objects_get_address');
- zend_is_true := GetProcAddress(PHPLib, 'zend_is_true');
+ {$IF not defined(PHP520) and not defined(PHP540) and not defined(PHP550) and not defined(PHP560)}
+ LFunc(@zend_copy_constants, 'zend_copy_constants');
+ {$IFEND}
+ LFunc(@zend_objects_new, 'zend_objects_new');
+ LFunc(@zend_objects_clone_obj, 'zend_objects_clone_obj');
+ LFunc(@function_add_ref, 'function_add_ref');
+ {$IF not defined(PHP520) and not defined(PHP540) and not defined(PHP550) and not defined(PHP560)}
+ LFunc(@zend_class_add_ref, 'zend_class_add_ref');
+ {$IFEND}
+
+ LFunc(@zend_objects_store_add_ref, 'zend_objects_store_add_ref');
+ LFunc(@zend_objects_store_del_ref, 'zend_objects_store_del_ref');
+
+ LFunc(@zend_get_std_object_handlers, 'zend_get_std_object_handlers');
+ LFunc(@zend_objects_get_address, 'zend_objects_get_address');
+ LFunc(@zend_is_true, 'zend_is_true');
{$ENDIF}
- _zend_bailout := GetProcAddress(PHPLib, '_zend_bailout');
+ LFunc(@_zend_bailout, '_zend_bailout');
- zend_disable_function := GetProcAddress(PHPLib, 'zend_disable_function');
- zend_disable_class := GetProcAddress(PHPLib, 'zend_disable_class');
- zend_register_list_destructors_ex := GetProcAddress(PHPLib, 'zend_register_list_destructors_ex');
- zend_register_resource := GetProcAddress(PHPLib, 'zend_register_resource');
- zend_fetch_resource := GetProcAddress(PHPLib, 'zend_fetch_resource');
- zend_list_insert := GetProcAddress(PHPLib, 'zend_list_insert');
+ LFunc(@zend_disable_function, 'zend_disable_function');
+ LFunc(@zend_disable_class, 'zend_disable_class');
+ LFunc(@zend_register_list_destructors_ex, 'zend_register_list_destructors_ex');
+ LFunc(@zend_register_resource, 'zend_register_resource');
+ LFunc(@zend_fetch_resource, 'zend_fetch_resource');
+ LFunc(@zend_list_insert, 'zend_list_insert');
{$IFNDEF PHP7}
- _zend_list_addref := GetProcAddress(PHPLib, '_zend_list_addref');
- _zend_list_delete := GetProcAddress(PHPLib, '_zend_list_delete');
- _zend_list_find := GetProcAddress(PHPLib, '_zend_list_find');
+ LFunc(@_zend_list_addref, '_zend_list_addref');
+ LFunc(@_zend_list_delete, '_zend_list_delete');
+ LFunc(@_zend_list_find, '_zend_list_find');
{$ENDIF}
- zend_rsrc_list_get_rsrc_type := GetProcAddress(PHPLib, 'zend_rsrc_list_get_rsrc_type');
- zend_fetch_list_dtor_id := GetProcAddress(PHPLib, 'zend_fetch_list_dtor_id');
+ LFunc(@zend_rsrc_list_get_rsrc_type, 'zend_rsrc_list_get_rsrc_type');
+ LFunc(@zend_fetch_list_dtor_id, 'zend_fetch_list_dtor_id');
- zend_get_compiled_filename := GetProcAddress(PHPLib, 'zend_get_compiled_filename');
+ LFunc(@zend_get_compiled_filename, 'zend_get_compiled_filename');
- zend_get_compiled_lineno := GetProcAddress(PHPLib, 'zend_get_compiled_lineno');
+ LFunc(@zend_get_compiled_lineno, 'zend_get_compiled_lineno');
- zend_ini_deactivate := GetProcAddress(PHPLib, 'zend_ini_deactivate');
+ LFunc(@zend_ini_deactivate, 'zend_ini_deactivate');
// -- tsrm_startup
- tsrm_startup := GetProcAddress(PHPLib, 'tsrm_startup');
+ LFunc(@tsrm_startup, 'tsrm_startup');
// -- ts_allocate_id
- ts_allocate_id := GetProcAddress(PHPLib, 'ts_allocate_id');
+ LFunc(@ts_allocate_id, 'ts_allocate_id');
// -- ts_free_id
- ts_free_id := GetProcAddress(PHPLib, 'ts_free_id');
+ LFunc(@ts_free_id, 'ts_free_id');
// -- zend_strndup
- zend_strndup := GetProcAddress(PHPLib,
+ LFunc(@zend_strndup,
{$IFNDEF PHP7}
'zend_strndup'
{$ELSE}
@@ -2060,7 +2337,7 @@ function LoadZEND(const DllFilename: zend_ustr = PHPWin) : boolean;
{$ENDIF});
// -- _emalloc
- _emalloc := GetProcAddress(PHPLib,
+ LFunc(@_emalloc,
{$IFNDEF PHP7}
'_emalloc'
{$ELSE}
@@ -2069,7 +2346,7 @@ function LoadZEND(const DllFilename: zend_ustr = PHPWin) : boolean;
// -- _efree
- _efree := GetProcAddress(PHPLib,
+ LFunc(@_efree,
{$IFNDEF PHP7}
'_efree'
{$ELSE}
@@ -2078,7 +2355,7 @@ function LoadZEND(const DllFilename: zend_ustr = PHPWin) : boolean;
// -- _ecalloc
- _ecalloc := GetProcAddress(PHPLib,
+ LFunc(@_ecalloc,
{$IFNDEF PHP7}
'_ecalloc'
{$ELSE}
@@ -2087,7 +2364,7 @@ function LoadZEND(const DllFilename: zend_ustr = PHPWin) : boolean;
// -- _erealloc
- _erealloc := GetProcAddress(PHPLib,
+ LFunc(@_erealloc,
{$IFNDEF PHP7}
'_erealloc'
{$else}
@@ -2096,7 +2373,7 @@ function LoadZEND(const DllFilename: zend_ustr = PHPWin) : boolean;
// -- _estrdup
- _estrdup := GetProcAddress(PHPLib,
+ LFunc(@_estrdup,
{$IFNDEF PHP7}
'_estrdup'
{$ELSE}
@@ -2104,635 +2381,653 @@ function LoadZEND(const DllFilename: zend_ustr = PHPWin) : boolean;
{$ENDIF});
// -- _estrndup
- _estrndup := GetProcAddress(PHPLib,
+ LFunc(@_estrndup,
{$IFNDEF PHP7}
'_estrndup'
{$ELSE}
'_estrndup@@8'
{$ENDIF});
+ {$ifdef PHP_UNICODE}
// -- _estrndup Unicode
- _estrndupu := GetProcAddress(PHPLib,
+ LFunc(@_estrndupu,
{$IFNDEF PHP7}
'_estrndup'
{$ELSE}
'_estrndup@@8'
{$ENDIF});
+ {$endif}
// -- zend_set_memory_limit
- zend_set_memory_limit := GetProcAddress(PHPLib, 'zend_set_memory_limit');
+ LFunc(@zend_set_memory_limit, 'zend_set_memory_limit');
// -- start_memory_manager
- start_memory_manager := GetProcAddress(PHPLib, 'start_memory_manager');
+ LFunc(@start_memory_manager, 'start_memory_manager');
// -- shutdown_memory_manager
- shutdown_memory_manager := GetProcAddress(PHPLib, 'shutdown_memory_manager');
-
- {$IFDEF PHP4}
- // -- zend_hash_init
- zend_hash_init := GetProcAddress(PHPLib, 'zend_hash_init');
-
- // -- zend_hash_init_ex
- zend_hash_init_ex := GetProcAddress(PHPLib, 'zend_hash_init_ex');
+ LFunc(@shutdown_memory_manager, 'shutdown_memory_manager');
- // -- zend_hash_quick_add_or_update
- zend_hash_quick_add_or_update := GetProcAddress(PHPLib, 'zend_hash_quick_add_or_update');
-
- // -- zend_hash_index_update_or_next_insert
- zend_hash_index_update_or_next_insert := GetProcAddress(PHPLib, 'zend_hash_index_update_or_next_insert');
-
- // -- zend_hash_merge
- zend_hash_merge := GetProcAddress(PHPLib, 'zend_hash_merge');
- {$ELSE}
- _zend_hash_init := GetProcAddress(PHPLib, '_zend_hash_init');
- _zend_hash_init_ex := GetProcAddress(PHPLib, '_zend_hash_init_ex');
+ LFunc(@_zend_hash_init, '_zend_hash_init');
+ LFunc(@_zend_hash_init_ex, '_zend_hash_init_ex');
- {$ENDIF}
-
- {$IFDEF PHP4}
- // -- zend_hash_add_or_update
- zend_hash_add_or_update := GetProcAddress(PHPLib, 'zend_hash_add_or_update');
- {$ELSE}
// -- zend_hash_add_or_update
- _zend_hash_add_or_update := GetProcAddress(PHPLib, '_zend_hash_add_or_update');
- {$ENDIF}
+ LFunc(@_zend_hash_add_or_update,
+ {$IFDEF PHP7}'_zend_hash_add_or_update@@16'{$ELSE}'_zend_hash_add_or_update'{$ENDIF});
// -- zend_hash_destroy
- zend_hash_destroy := GetProcAddress(PHPLib, 'zend_hash_destroy');
+ LFunc(@zend_hash_destroy, {$IFDEF PHP7}'zend_hash_destroy@@4'{$ELSE}'zend_hash_destroy'{$ENDIF});
// -- zend_hash_clean
- zend_hash_clean := GetProcAddress(PHPLib, 'zend_hash_clean');
+ LFunc(@zend_hash_clean, {$IFDEF PHP7}'zend_hash_clean@@4'{$ELSE}'zend_hash_clean'{$ENDIF});
// -- zend_hash_add_empty_element
- zend_hash_add_empty_element := GetProcAddress(PHPLib, 'zend_hash_add_empty_element');
+ LFunc(@zend_hash_add_empty_element, {$IFDEF PHP7}'zend_hash_add_empty_element@@8'{$ELSE}'zend_hash_add_empty_element'{$ENDIF});
// -- zend_hash_graceful_destroy
- zend_hash_graceful_destroy := GetProcAddress(PHPLib, 'zend_hash_graceful_destroy');
+ LFunc(@zend_hash_graceful_destroy, {$IFDEF PHP7}'zend_hash_graceful_destroy@@4'{$ELSE}'zend_hash_graceful_destroy'{$ENDIF});
// -- zend_hash_graceful_reverse_destroy
- zend_hash_graceful_reverse_destroy := GetProcAddress(PHPLib, 'zend_hash_graceful_reverse_destroy');
+ LFunc(@zend_hash_graceful_reverse_destroy, {$IFDEF PHP7}'zend_hash_graceful_reverse_destroy@@4'{$ELSE}'zend_hash_graceful_reverse_destroy'{$ENDIF});
// -- zend_hash_apply
- zend_hash_apply := GetProcAddress(PHPLib, 'zend_hash_apply');
+ LFunc(@zend_hash_apply, {$IFDEF PHP7}'zend_hash_apply@@8'{$ELSE}'zend_hash_apply'{$ENDIF});
// -- zend_hash_apply_with_argument
- zend_hash_apply_with_argument := GetProcAddress(PHPLib, 'zend_hash_apply_with_argument');
+ LFunc(@zend_hash_apply_with_argument, {$IFDEF PHP7}'zend_hash_apply_with_argument@@12'{$ELSE}'zend_hash_apply_with_argument'{$ENDIF});
// -- zend_hash_reverse_apply
- zend_hash_reverse_apply := GetProcAddress(PHPLib, 'zend_hash_reverse_apply');
+ LFunc(@zend_hash_reverse_apply, {$IFDEF PHP7}'zend_hash_reverse_apply@@8'{$ELSE}'zend_hash_reverse_apply'{$ENDIF});
// -- zend_hash_del_key_or_index
- zend_hash_del_key_or_index := GetProcAddress(PHPLib, 'zend_hash_del_key_or_index');
+ LFunc(@zend_hash_del_key_or_index, {$IFDEF PHP7}'zend_hash_del@@8'{$ELSE}'zend_hash_del_key_or_index'{$ENDIF});
// -- zend_get_hash_value
- zend_get_hash_value := GetProcAddress(PHPLib,
+ LFunc(@zend_get_hash_value,
{$IFDEF PHP560}'zend_hash_func'{$ELSE}'zend_get_hash_value'{$ENDIF});
// -- zend_hash_find
- zend_hash_find := GetProcAddress(PHPLib, 'zend_hash_find');
+ LFunc(@zend_hash_find, {$IFDEF PHP7}'zend_hash_find@@8'{$ELSE}'zend_hash_find'{$ENDIF});
// -- zend_hash_quick_find
- zend_hash_quick_find := GetProcAddress(PHPLib, 'zend_hash_quick_find');
+ LFunc(@zend_hash_quick_find, {$IFDEF PHP7}'zend_hash_find@@8'{$ELSE}'zend_hash_quick_find'{$ENDIF});
// -- zend_hash_index_find
- zend_hash_index_find := GetProcAddress(PHPLib, 'zend_hash_index_find');
+ LFunc(@zend_hash_index_find, {$IFDEF PHP7}'zend_hash_index_find@@8'{$ELSE}'zend_hash_index_find'{$ENDIF});
// -- zend_hash_exists
- zend_hash_exists := GetProcAddress(PHPLib, 'zend_hash_exists');
+ LFunc(@zend_hash_exists, {$IFDEF PHP7}'zend_hash_exists@@8'{$ELSE}'zend_hash_exists'{$ENDIF});
// -- zend_hash_index_exists
- zend_hash_index_exists := GetProcAddress(PHPLib, 'zend_hash_index_exists');
-
+ LFunc(@zend_hash_index_exists, {$IFDEF PHP7}'zend_hash_index_exists@@8'{$ELSE}'zend_hash_index_exists'{$ENDIF});
+ {$IFDEF PHP7}
+ LFunc(@_zend_hash_add_or_update, '_zend_hash_add_or_update@@16');
+ LFunc(@_zend_hash_add, '_zend_hash_add@@12');
+ {$IFDEF COMPILER_php7pv}
+ LFunc(@zend_hash_index_findZval,'zend_hash_index_findZval');
+ LFunc(@zend_symtable_findTest,'zend_symtable_findTest');
+ LFunc(@zend_hash_index_existsZval,'zend_hash_index_existsZval');
+ {$ENDIF}
+ {$ELSE}
// -- zend_hash_next_free_element
- zend_hash_next_free_element := GetProcAddress(PHPLib, 'zend_hash_next_free_element');
-
+ LFunc(@zend_hash_next_free_element, 'zend_hash_next_free_element');
+ {$ENDIF}
// -- zend_hash_move_forward_ex
- zend_hash_move_forward_ex := GetProcAddress(PHPLib, 'zend_hash_move_forward_ex');
+ LFunc(@zend_hash_move_forward_ex, {$IFDEF PHP7}'zend_hash_move_forward_ex@@8'{$ELSE}'zend_hash_move_forward_ex'{$ENDIF});
// -- zend_hash_move_backwards_ex
- zend_hash_move_backwards_ex := GetProcAddress(PHPLib, 'zend_hash_move_backwards_ex');
+ LFunc(@zend_hash_move_backwards_ex, {$IFDEF PHP7}'zend_hash_move_backwards_ex@@8'{$ELSE}'zend_hash_move_backwards_ex'{$ENDIF});
// -- zend_hash_get_current_key_ex
- zend_hash_get_current_key_ex := GetProcAddress(PHPLib, 'zend_hash_get_current_key_ex');
+ LFunc(@zend_hash_get_current_key_ex, {$IFDEF PHP7}'zend_hash_get_current_key_ex@@16'{$ELSE}'zend_hash_get_current_key_ex'{$ENDIF});
// -- zend_hash_get_current_key_type_ex
- zend_hash_get_current_key_type_ex := GetProcAddress(PHPLib, 'zend_hash_get_current_key_type_ex');
+ LFunc(@zend_hash_get_current_key_type_ex, {$IFDEF PHP7}'zend_hash_get_current_key_type_ex@@8'{$ELSE}'zend_hash_get_current_key_type_ex'{$ENDIF});
// -- zend_hash_get_current_data_ex
- zend_hash_get_current_data_ex := GetProcAddress(PHPLib, 'zend_hash_get_current_data_ex');
+ LFunc(@zend_hash_get_current_data_ex, {$IFDEF PHP7}'zend_hash_get_current_data_ex@@8'{$ELSE}'zend_hash_get_current_data_ex'{$ENDIF});
// -- zend_hash_internal_pointer_reset_ex
- zend_hash_internal_pointer_reset_ex := GetProcAddress(PHPLib, 'zend_hash_internal_pointer_reset_ex');
+ LFunc(@zend_hash_internal_pointer_reset_ex, {$IFDEF PHP7}'zend_hash_internal_pointer_reset_ex@@8'{$ELSE}'zend_hash_internal_pointer_reset_ex'{$ENDIF});
// -- zend_hash_internal_pointer_end_ex
- zend_hash_internal_pointer_end_ex := GetProcAddress(PHPLib, 'zend_hash_internal_pointer_end_ex');
+ LFunc(@zend_hash_internal_pointer_end_ex, {$IFDEF PHP7}'zend_hash_internal_pointer_end_ex@@8'{$ELSE}'zend_hash_internal_pointer_end_ex'{$ENDIF});
// -- zend_hash_copy
- zend_hash_copy := GetProcAddress(PHPLib, 'zend_hash_copy');
+ LFunc(@zend_hash_copy, {$IFDEF PHP7}'zend_hash_copy@@12'{$ELSE}'zend_hash_copy'{$ENDIF});
// -- zend_hash_sort
- zend_hash_sort := GetProcAddress(PHPLib, 'zend_hash_sort');
+ LFunc(@zend_hash_sort, {$IFDEF PHP7}'zend_hash_sort_ex@@16'{$ELSE}'zend_hash_sort'{$ENDIF});
// -- zend_hash_compare
- zend_hash_compare := GetProcAddress(PHPLib, 'zend_hash_compare');
+ LFunc(@zend_hash_compare, 'zend_hash_compare');
// -- zend_hash_minmax
- zend_hash_minmax := GetProcAddress(PHPLib, 'zend_hash_minmax');
+ LFunc(@zend_hash_minmax, {$IFDEF PHP7}'zend_hash_minmax@@12'{$ELSE}'zend_hash_minmax'{$ENDIF});
// -- zend_hash_num_elements
- zend_hash_num_elements := GetProcAddress(PHPLib, 'zend_hash_num_elements');
+ {$IFNDEF PHP7}
+ LFunc(@zend_hash_num_elements, 'zend_hash_num_elements');
+ {$ENDIF}
// -- zend_hash_rehash
- zend_hash_rehash := GetProcAddress(PHPLib, 'zend_hash_rehash');
+ LFunc(@zend_hash_rehash, {$IFDEF PHP7}'zend_hash_rehash@@4'{$ELSE}'zend_hash_rehash'{$ENDIF});
// -- zend_hash_func
- zend_hash_func := GetProcAddress(PHPLib, 'zend_hash_func');
+ LFunc(@zend_hash_func, 'zend_hash_func');
// -- zend_get_constant
- zend_get_constant := GetProcAddress(PHPLib, 'zend_get_constant');
+ LFunc(@zend_get_constant, 'zend_get_constant');
- // -- zend_register_long_constant
- zend_register_long_constant := GetProcAddress(PHPLib, 'zend_register_long_constant');
+ // -- zend_register_null_constant
+ {$if defined(PHP530)}
+ LFunc(@zend_register_null_constant, 'zend_register_null_constant');
+
+ // -- zend_register_bool_constant
+ LFunc(@zend_register_bool_constant, 'zend_register_bool_constant');
+ // -- zend_register_long_constant
+ LFunc(@zend_register_long_constant, 'zend_register_long_constant');
+ {$ifend}
// -- zend_register_double_constant
- zend_register_double_constant := GetProcAddress(PHPLib, 'zend_register_double_constant');
+ LFunc(@zend_register_double_constant, 'zend_register_double_constant');
// -- zend_register_string_constant
- zend_register_string_constant := GetProcAddress(PHPLib, 'zend_register_string_constant');
+ LFunc(@zend_register_string_constant, 'zend_register_string_constant');
// -- zend_register_stringl_constant
- zend_register_stringl_constant := GetProcAddress(PHPLib, 'zend_register_stringl_constant');
+ LFunc(@zend_register_stringl_constant, 'zend_register_stringl_constant');
// -- zend_register_constant
- zend_register_constant := GetProcAddress(PHPLib, 'zend_register_constant');
+ LFunc(@zend_register_constant, 'zend_register_constant');
- zend_register_auto_global := GetProcAddress(PHPLib, 'zend_register_auto_global');
+ LFunc(@zend_register_auto_global, 'zend_register_auto_global');
+ {$IFDEF PHP5}
+ LFunc(@zend_activate_auto_globals, 'zend_activate_auto_globals');
+ {$ENDIF}
// -- tsrm_shutdown
- tsrm_shutdown := GetProcAddress(PHPLib, 'tsrm_shutdown');
+ LFunc(@tsrm_shutdown, 'tsrm_shutdown');
// -- ts_resource_ex
- ts_resource_ex := GetProcAddress(PHPLib, 'ts_resource_ex');
+ LFunc(@ts_resource_ex, 'ts_resource_ex');
// -- ts_free_thread
- ts_free_thread := GetProcAddress(PHPLib, 'ts_free_thread');
+ LFunc(@ts_free_thread, 'ts_free_thread');
// -- zend_error
- zend_error := GetProcAddress(PHPLib, 'zend_error');
+ LFunc(@zend_error, 'zend_error');
// -- zend_error_cb
- zend_error_cb := GetProcAddress(PHPLib, 'zend_error_cb');
+ LFunc(@zend_error_cb, 'zend_error_cb');
// -- zend_eval_string
- zend_eval_string := GetProcAddress(PHPLib, 'zend_eval_string');
-
- // -- zend_make_compiled_string_description
- zend_make_compiled_string_description := GetProcAddress(PHPLib, 'zend_make_compiled_string_description');
-
+ LFunc(@zend_eval_string, 'zend_eval_string');
- {$IFDEF PHP4}
- // -- _zval_dtor
- _zval_dtor := GetProcAddress(PHPLib, '_zval_dtor');
-
- // -- _zval_copy_ctor
- _zval_copy_ctor := GetProcAddress(PHPLib, '_zval_copy_ctor');
+ // -- zend_eval_string
+ LFunc(@zend_eval_string_ex, 'zend_eval_string_ex');
- {$ELSE}
- _zval_copy_ctor_func := GetProcAddress(PHPLib, '_zval_copy_ctor_func');
- _zval_dtor_func := GetProcAddress(PHPLib, '_zval_dtor_func');
- _zval_ptr_dtor := GetProcAddress(PHPLib, '_zval_ptr_dtor');
+ // -- zend_make_compiled_string_description
+ LFunc(@zend_make_compiled_string_description, 'zend_make_compiled_string_description');
- {$ENDIF}
+ LFunc(@_zval_copy_ctor_func, {$IFDEF PHP7}'_zval_copy_ctor_func@@4'{$ELSE}'_zval_copy_ctor_func'{$ENDIF});
+ LFunc(@_zval_dtor_func, {$IFDEF PHP7}'_zval_dtor_func@@4'{$ELSE}'_zval_dtor_func'{$ENDIF});
+ LFunc(@_zval_ptr_dtor, '_zval_ptr_dtor');
// -- zend_print_variable
- zend_print_variable := GetProcAddress(PHPLib, 'zend_print_variable');
+ LFunc(@zend_print_variable, 'zend_print_variable');
// -- zend_stack_init
- zend_stack_init := GetProcAddress(PHPLib, 'zend_stack_init');
+ LFunc(@zend_stack_init, 'zend_stack_init');
// -- zend_stack_push
- zend_stack_push := GetProcAddress(PHPLib, 'zend_stack_push');
+ LFunc(@zend_stack_push, 'zend_stack_push');
// -- zend_stack_top
- zend_stack_top := GetProcAddress(PHPLib, 'zend_stack_top');
+ LFunc(@zend_stack_top, 'zend_stack_top');
// -- zend_stack_del_top
- zend_stack_del_top := GetProcAddress(PHPLib, 'zend_stack_del_top');
+ LFunc(@zend_stack_del_top, 'zend_stack_del_top');
// -- zend_stack_int_top
- zend_stack_int_top := GetProcAddress(PHPLib, 'zend_stack_int_top');
+ LFunc(@zend_stack_int_top, 'zend_stack_int_top');
// -- zend_stack_is_empty
- zend_stack_is_empty := GetProcAddress(PHPLib, 'zend_stack_is_empty');
+ LFunc(@zend_stack_is_empty, 'zend_stack_is_empty');
// -- zend_stack_destroy
- zend_stack_destroy := GetProcAddress(PHPLib, 'zend_stack_destroy');
+ LFunc(@zend_stack_destroy, 'zend_stack_destroy');
// -- zend_stack_base
- zend_stack_base := GetProcAddress(PHPLib, 'zend_stack_base');
+ LFunc(@zend_stack_base, 'zend_stack_base');
// -- zend_stack_count
- zend_stack_count := GetProcAddress(PHPLib, 'zend_stack_count');
+ LFunc(@zend_stack_count, 'zend_stack_count');
// -- zend_stack_apply
- zend_stack_apply := GetProcAddress(PHPLib, 'zend_stack_apply');
+ LFunc(@zend_stack_apply, 'zend_stack_apply');
// -- zend_stack_apply_with_argument
- zend_stack_apply_with_argument := GetProcAddress(PHPLib, 'zend_stack_apply_with_argument');
+ LFunc(@zend_stack_apply_with_argument, 'zend_stack_apply_with_argument');
// -- _convert_to_string
- _convert_to_string := GetProcAddress(PHPLib, '_convert_to_string');
+ LFunc(@_convert_to_string, {$IFDEF PHP7}'_convert_to_string@@4'{$ELSE}'_convert_to_string'{$ENDIF});
// -- add_function
- add_function := GetProcAddress(PHPLib, 'add_function');
+ LFunc(@add_function, {$IFDEF PHP7}'add_function@@12'{$ELSE}'add_function'{$ENDIF});
// -- sub_function
- sub_function := GetProcAddress(PHPLib, 'sub_function');
+ LFunc(@sub_function, {$IFDEF PHP7}'sub_function@@12'{$ELSE}'sub_function'{$ENDIF});
// -- mul_function
- mul_function := GetProcAddress(PHPLib, 'mul_function');
+ LFunc(@mul_function, {$IFDEF PHP7}'mul_function@@12'{$ELSE}'mul_function'{$ENDIF});
// -- div_function
- div_function := GetProcAddress(PHPLib, 'div_function');
+ LFunc(@div_function, {$IFDEF PHP7}'div_function@@12'{$ELSE}'div_function'{$ENDIF});
// -- mod_function
- mod_function := GetProcAddress(PHPLib, 'mod_function');
+ LFunc(@mod_function, {$IFDEF PHP7}'mod_function@@12'{$ELSE}'mod_function'{$ENDIF});
// -- boolean_xor_function
- boolean_xor_function := GetProcAddress(PHPLib, 'boolean_xor_function');
+ LFunc(@boolean_xor_function, {$IFDEF PHP7}'boolean_xor_function@@12'{$ELSE}'boolean_xor_function'{$ENDIF});
// -- boolean_not_function
- boolean_not_function := GetProcAddress(PHPLib, 'boolean_not_function');
+ LFunc(@boolean_not_function, {$IFDEF PHP7}'boolean_not_function@@8'{$ELSE}'boolean_not_function'{$ENDIF});
// -- bitwise_not_function
- bitwise_not_function := GetProcAddress(PHPLib, 'bitwise_not_function');
+ LFunc(@bitwise_not_function, {$IFDEF PHP7}'bitwise_not_function@@8'{$ELSE}'bitwise_not_function'{$ENDIF});
// -- bitwise_or_function
- bitwise_or_function := GetProcAddress(PHPLib, 'bitwise_or_function');
+ LFunc(@bitwise_or_function, {$IFDEF PHP7}'bitwise_or_function@@12'{$ELSE}'bitwise_or_function'{$ENDIF});
// -- bitwise_and_function
- bitwise_and_function := GetProcAddress(PHPLib, 'bitwise_and_function');
+ LFunc(@bitwise_and_function, {$IFDEF PHP7}'bitwise_and_function@@12'{$ELSE}'bitwise_and_function'{$ENDIF});
// -- bitwise_xor_function
- bitwise_xor_function := GetProcAddress(PHPLib, 'bitwise_xor_function');
+ LFunc(@bitwise_xor_function, {$IFDEF PHP7}'bitwise_xor_function@@12'{$ELSE}'bitwise_xor_function'{$ENDIF});
// -- shift_left_function
- shift_left_function := GetProcAddress(PHPLib, 'shift_left_function');
+ LFunc(@shift_left_function, {$IFDEF PHP7}'shift_left_function@@12'{$ELSE}'shift_left_function'{$ENDIF});
// -- shift_right_function
- shift_right_function := GetProcAddress(PHPLib, 'shift_right_function');
+ LFunc(@shift_right_function, {$IFDEF PHP7}'shift_right_function@@12'{$ELSE}'shift_right_function'{$ENDIF});
// -- concat_function
- concat_function := GetProcAddress(PHPLib, 'concat_function');
+ LFunc(@concat_function, {$IFDEF PHP7}'concat_function@@12'{$ELSE}'concat_function'{$ENDIF});
// -- is_equal_function
- is_equal_function := GetProcAddress(PHPLib, 'is_equal_function');
+ LFunc(@is_equal_function, {$IFDEF PHP7}'is_equal_function@@12'{$ELSE}'is_equal_function'{$ENDIF});
// -- is_identical_function
- is_identical_function := GetProcAddress(PHPLib, 'is_identical_function');
+ LFunc(@is_identical_function, {$IFDEF PHP7}'is_identical_function@@12'{$ELSE}'is_identical_function'{$ENDIF});
// -- is_not_identical_function
- is_not_identical_function := GetProcAddress(PHPLib, 'is_not_identical_function');
+ LFunc(@is_not_identical_function, {$IFDEF PHP7}'is_not_identical_function@@12'{$ELSE}'is_not_identical_function'{$ENDIF});
// -- is_not_equal_function
- is_not_equal_function := GetProcAddress(PHPLib, 'is_not_equal_function');
+ LFunc(@is_not_equal_function, {$IFDEF PHP7}'is_not_equal_function@@12'{$ELSE}'is_not_equal_function'{$ENDIF});
// -- is_smaller_function
- is_smaller_function := GetProcAddress(PHPLib, 'is_smaller_function');
+ LFunc(@is_smaller_function, {$IFDEF PHP7}'is_smaller_function@@12'{$ELSE}'is_smaller_function'{$ENDIF});
// -- is_smaller_or_equal_function
- is_smaller_or_equal_function := GetProcAddress(PHPLib, 'is_smaller_or_equal_function');
+ LFunc(@is_smaller_or_equal_function, {$IFDEF PHP7}'is_smaller_or_equal_function@@12'{$ELSE}'is_smaller_or_equal_function'{$ENDIF});
// -- increment_function
- increment_function := GetProcAddress(PHPLib, 'increment_function');
+ LFunc(@increment_function, {$IFDEF PHP7}'increment_function@@4'{$ELSE}'increment_function'{$ENDIF});
// -- decrement_function
- decrement_function := GetProcAddress(PHPLib, 'decrement_function');
+ LFunc(@decrement_function, {$IFDEF PHP7}'decrement_function@@4'{$ELSE}'decrement_function'{$ENDIF});
// -- convert_scalar_to_number
- convert_scalar_to_number := GetProcAddress(PHPLib, 'convert_scalar_to_number');
+ LFunc(@convert_scalar_to_number, {$IFDEF PHP7}'convert_scalar_to_number@@4'{$ELSE}'convert_scalar_to_number'{$ENDIF});
// -- convert_to_long
- convert_to_long := GetProcAddress(PHPLib, 'convert_to_long');
+ LFunc(@convert_to_long, {$IFDEF PHP7}'convert_to_long@@4'{$ELSE}'convert_to_long'{$ENDIF});
// -- convert_to_double
- convert_to_double := GetProcAddress(PHPLib, 'convert_to_double');
+ LFunc(@convert_to_double, {$IFDEF PHP7}'convert_to_double@@4'{$ELSE}'convert_to_double'{$ENDIF});
// -- convert_to_long_base
- convert_to_long_base := GetProcAddress(PHPLib, 'convert_to_long_base');
+ LFunc(@convert_to_long_base, {$IFDEF PHP7}'convert_to_long_base@@8'{$ELSE}'convert_to_long_base'{$ENDIF});
// -- convert_to_null
- convert_to_null := GetProcAddress(PHPLib, 'convert_to_null');
+ LFunc(@convert_to_null, {$IFDEF PHP7}'convert_to_null@@4'{$ELSE}'convert_to_null'{$ENDIF});
// -- convert_to_boolean
- convert_to_boolean := GetProcAddress(PHPLib, 'convert_to_boolean');
+ LFunc(@convert_to_boolean, {$IFDEF PHP7}'convert_to_boolean@@4'{$ELSE}'convert_to_boolean'{$ENDIF});
// -- convert_to_array
- convert_to_array := GetProcAddress(PHPLib, 'convert_to_array');
+ LFunc(@convert_to_array, {$IFDEF PHP7}'convert_to_array@@4'{$ELSE}'convert_to_array'{$ENDIF});
// -- convert_to_object
- convert_to_object := GetProcAddress(PHPLib, 'convert_to_object');
-
+ LFunc(@convert_to_object, {$IFDEF PHP7}'convert_to_object@@4'{$ELSE}'convert_to_object'{$ENDIF});
+ {$IFNDEF PHP7}
// -- add_char_to_string
- add_char_to_string := GetProcAddress(PHPLib, 'add_char_to_string');
+ LFunc(@add_char_to_string, 'add_char_to_string');
// -- add_string_to_string
- add_string_to_string := GetProcAddress(PHPLib, 'add_string_to_string');
-
+ LFunc(@add_string_to_string, 'add_string_to_string');
+ {$ENDIF}
// -- zend_string_to_double
- zend_string_to_double := GetProcAddress(PHPLib, 'zend_string_to_double');
+ LFunc(@zend_string_to_double, {$IFDEF PHP7}'zend_strtod'{$ELSE}'zend_string_to_double'{$ENDIF});
// -- zval_is_true
- zval_is_true := GetProcAddress(PHPLib, 'zval_is_true');
+ LFunc(@zval_is_true, {$IFDEF PHP7}'zend_is_true@@4'{$ELSE}'zval_is_true'{$ENDIF});
// -- compare_function
- compare_function := GetProcAddress(PHPLib, 'compare_function');
+ LFunc(@compare_function, {$IFDEF PHP7}'compare_function@@12'{$ELSE}'compare_function'{$ENDIF});
// -- numeric_compare_function
- numeric_compare_function := GetProcAddress(PHPLib, 'numeric_compare_function');
+ LFunc(@numeric_compare_function, {$IFDEF PHP7}'numeric_compare_function@@8'{$ELSE}'numeric_compare_function'{$ENDIF});
// -- string_compare_function
- string_compare_function := GetProcAddress(PHPLib, 'string_compare_function');
+ LFunc(@string_compare_function, {$IFDEF PHP7}'string_compare_function@@8'{$ELSE}'string_compare_function'{$ENDIF});
// -- zend_str_tolower
- zend_str_tolower := GetProcAddress(PHPLib, 'zend_str_tolower');
+ LFunc(@zend_str_tolower, {$IFDEF PHP7}'zend_str_tolower@@8'{$ELSE}'zend_str_tolower'{$ENDIF});
// -- zend_binary_zval_strcmp
- zend_binary_zval_strcmp := GetProcAddress(PHPLib, 'zend_binary_zval_strcmp');
+ LFunc(@zend_binary_zval_strcmp, {$IFDEF PHP7}'zend_binary_zval_strcmp@@8'{$ELSE}'zend_binary_zval_strcmp'{$ENDIF});
// -- zend_binary_zval_strncmp
- zend_binary_zval_strncmp := GetProcAddress(PHPLib, 'zend_binary_zval_strncmp');
+ LFunc(@zend_binary_zval_strncmp, {$IFDEF PHP7}'zend_binary_zval_strncmp@@12'{$ELSE}'zend_binary_zval_strncmp'{$ENDIF});
// -- zend_binary_zval_strcasecmp
- zend_binary_zval_strcasecmp := GetProcAddress(PHPLib, 'zend_binary_zval_strcasecmp');
+ LFunc(@zend_binary_zval_strcasecmp, {$IFDEF PHP7}'zend_binary_zval_strcasecmp@@8'{$ELSE}'zend_binary_zval_strcasecmp'{$ENDIF});
// -- zend_binary_zval_strncasecmp
- zend_binary_zval_strncasecmp := GetProcAddress(PHPLib, 'zend_binary_zval_strncasecmp');
+ LFunc(@zend_binary_zval_strncasecmp, {$IFDEF PHP7}'zend_binary_zval_strncasecmp@@12'{$ELSE}'zend_binary_zval_strncasecmp'{$ENDIF});
// -- zend_binary_strcmp
- zend_binary_strcmp := GetProcAddress(PHPLib, 'zend_binary_strcmp');
+ LFunc(@zend_binary_strcmp, {$IFDEF PHP7}'zend_binary_strcmp@@16'{$ELSE}'zend_binary_strcmp'{$ENDIF});
// -- zend_binary_strncmp
- zend_binary_strncmp := GetProcAddress(PHPLib, 'zend_binary_strncmp');
+ LFunc(@zend_binary_strncmp, {$IFDEF PHP7}'zend_binary_strncmp@@20'{$ELSE}'zend_binary_strncmp'{$ENDIF});
// -- zend_binary_strcasecmp
- zend_binary_strcasecmp := GetProcAddress(PHPLib, 'zend_binary_strcasecmp');
+ LFunc(@zend_binary_strcasecmp, {$IFDEF PHP7}'zend_binary_strcasecmp@@16'{$ELSE}'zend_binary_strcasecmp'{$ENDIF});
// -- zend_binary_strncasecmp
- zend_binary_strncasecmp := GetProcAddress(PHPLib, 'zend_binary_strncasecmp');
+ LFunc(@zend_binary_strncasecmp, {$IFDEF PHP7}'zend_binary_strncasecmp@@20'{$ELSE}'zend_binary_strncasecmp'{$ENDIF});
// -- zendi_smart_strcmp
- zendi_smart_strcmp := GetProcAddress(PHPLib, 'zendi_smart_strcmp');
+ LFunc(@zendi_smart_strcmp, {$IFDEF PHP7}'zendi_smart_strcmp@@8'{$ELSE}'zendi_smart_strcmp'{$ENDIF});
// -- zend_compare_symbol_tables
- zend_compare_symbol_tables := GetProcAddress(PHPLib, 'zend_compare_symbol_tables');
+ LFunc(@zend_compare_symbol_tables, {$IFDEF PHP7}'zend_compare_symbol_tables@@8'{$ELSE}'zend_compare_symbol_tables'{$ENDIF});
// -- zend_compare_arrays
- zend_compare_arrays := GetProcAddress(PHPLib, 'zend_compare_arrays');
+ LFunc(@zend_compare_arrays, {$IFDEF PHP7}'zend_compare_arrays@@8'{$ELSE}'zend_compare_arrays'{$ENDIF});
// -- zend_compare_objects
- zend_compare_objects := GetProcAddress(PHPLib, 'zend_compare_objects');
+ LFunc(@zend_compare_objects, {$IFDEF PHP7}'zend_compare_objects@@8'{$ELSE}'zend_compare_objects'{$ENDIF});
// -- zend_atoi
- zend_atoi := GetProcAddress(PHPLib, 'zend_atoi');
+ LFunc(@zend_atoi, {$IFDEF PHP7}'zend_atoi@@8'{$ELSE}'zend_atoi'{$ENDIF});
// -- get_active_function_name
- get_active_function_name := GetProcAddress(PHPLib, 'get_active_function_name');
+ LFunc(@get_active_function_name, 'get_active_function_name');
// -- zend_get_executed_filename
- zend_get_executed_filename := GetProcAddress(PHPLib, 'zend_get_executed_filename');
+ LFunc(@zend_get_executed_filename, 'zend_get_executed_filename');
// -- zend_get_executed_lineno
- zend_get_executed_lineno := GetProcAddress(PHPLib, 'zend_get_executed_lineno');
+ LFunc(@zend_get_executed_lineno, 'zend_get_executed_lineno');
// -- zend_set_timeout
- zend_set_timeout := GetProcAddress(PHPLib, 'zend_set_timeout');
+ LFunc(@zend_set_timeout, 'zend_set_timeout');
// -- zend_unset_timeout
- zend_unset_timeout := GetProcAddress(PHPLib, 'zend_unset_timeout');
+ LFunc(@zend_unset_timeout, 'zend_unset_timeout');
// -- zend_timeout
- zend_timeout := GetProcAddress(PHPLib, 'zend_timeout');
+ LFunc(@zend_timeout, 'zend_timeout');
// -- zend_highlight
- zend_highlight := GetProcAddress(PHPLib, 'zend_highlight');
+ LFunc(@zend_highlight, 'zend_highlight');
// -- zend_strip
- zend_strip := GetProcAddress(PHPLib, 'zend_strip');
+ LFunc(@zend_strip, 'zend_strip');
// -- highlight_file
- highlight_file := GetProcAddress(PHPLib, 'highlight_file');
+ LFunc(@highlight_file, 'highlight_file');
// -- highlight_string
- highlight_string := GetProcAddress(PHPLib, 'highlight_string');
+ LFunc(@highlight_string, 'highlight_string');
// -- zend_html_putc
- zend_html_putc := GetProcAddress(PHPLib, 'zend_html_putc');
+ LFunc(@zend_html_putc, 'zend_html_putc');
// -- zend_html_puts
- zend_html_puts := GetProcAddress(PHPLib, 'zend_html_puts');
+ LFunc(@zend_html_puts, 'zend_html_puts');
+
+ LFunc(@zend_parse_method_parameters, 'zend_parse_method_parameters');
+ LFunc(@zend_parse_method_parameters_ex, 'zend_parse_method_parameters_ex');
+ {$IFDEF PHP7}
+ // -- zend_parse_parameters_throw
+ LFunc(@zend_parse_parameters_throw, 'zend_parse_parameters_throw');
+ LFunc(@ZvalGetArgs, 'zend_get_parameters_ex');
+ {$ELSE}
// -- zend_indent
- zend_indent := GetProcAddress(PHPLib, 'zend_indent');
+ LFunc(@zend_indent, 'zend_indent');
+ {$ENDIF}
+ // -- _zend_get_parameters_array
+ LFunc(@_zend_get_parameters_array, '_zend_get_parameters_array');
// -- _zend_get_parameters_array_ex
- _zend_get_parameters_array_ex := GetProcAddress(PHPLib, '_zend_get_parameters_array_ex');
+ LFunc(@_zend_get_parameters_array_ex, '_zend_get_parameters_array_ex');
// -- zend_ini_refresh_caches
- zend_ini_refresh_caches := GetProcAddress(PHPLib, 'zend_ini_refresh_caches');
+ LFunc(@zend_ini_refresh_caches, 'zend_ini_refresh_caches');
// -- zend_alter_ini_entry
- zend_alter_ini_entry := GetProcAddress(PHPLib, 'zend_alter_ini_entry');
- zend_alter_ini_entry_ex:= GetProcAddress(PHPLib, 'zend_alter_ini_entry_ex');
+ LFunc(@zend_alter_ini_entry, 'zend_alter_ini_entry');
+ LFunc(@zend_alter_ini_entry_ex, 'zend_alter_ini_entry_ex');
// -- zend_restore_ini_entry
- zend_restore_ini_entry := GetProcAddress(PHPLib, 'zend_restore_ini_entry');
+ LFunc(@zend_restore_ini_entry, 'zend_restore_ini_entry');
// -- zend_ini_long
- zend_ini_long := GetProcAddress(PHPLib, 'zend_ini_long');
+ LFunc(@zend_ini_long, 'zend_ini_long');
// -- zend_ini_double
- zend_ini_double := GetProcAddress(PHPLib, 'zend_ini_double');
+ LFunc(@zend_ini_double, 'zend_ini_double');
// -- zend_ini_string
- zend_ini_string := GetProcAddress(PHPLib, 'zend_ini_string');
+ LFunc(@zend_ini_string, 'zend_ini_string');
// -- compile_string
- compile_string := GetProcAddress(PHPLib, 'compile_string');
+ LFunc(@compile_string, 'compile_string');
// -- execute
- execute := GetProcAddress(PHPLib, {$IFDEF PHP550}'zend_execute'{$ELSE}'execute'{$ENDIF});
+ LFunc(@execute, {$IFDEF PHP550}'zend_execute'{$ELSE}'execute'{$ENDIF});
// -- zend_wrong_param_count
- zend_wrong_param_count := GetProcAddress(PHPLib, 'zend_wrong_param_count');
+ LFunc(@zend_wrong_param_count, 'zend_wrong_param_count');
// -- zend_hash_quick_add_or_update
- _zend_hash_quick_add_or_update := GetProcAddress(PHPLib, '_zend_hash_quick_add_or_update');
+ LFunc(@_zend_hash_quick_add_or_update, '_zend_hash_quick_add_or_update');
// -- add_property_long_ex
- add_property_long_ex := GetProcAddress(PHPLib, 'add_property_long_ex');
+ LFunc(@add_property_long_ex, 'add_property_long_ex');
// -- add_property_null_ex
- add_property_null_ex := GetProcAddress(PHPLib, 'add_property_null_ex');
+ LFunc(@add_property_null_ex, 'add_property_null_ex');
// -- add_property_bool_ex
- add_property_bool_ex := GetProcAddress(PHPLib, 'add_property_bool_ex');
+ LFunc(@add_property_bool_ex, 'add_property_bool_ex');
// -- add_property_resource_ex
- add_property_resource_ex := GetProcAddress(PHPLib, 'add_property_resource_ex');
+ LFunc(@add_property_resource_ex, 'add_property_resource_ex');
// -- add_property_double_ex
- add_property_double_ex := GetProcAddress(PHPLib, 'add_property_double_ex');
+ LFunc(@add_property_double_ex, 'add_property_double_ex');
// -- add_property_string_ex
- add_property_string_ex := GetProcAddress(PHPLib, 'add_property_string_ex');
+ LFunc(@add_property_string_ex, 'add_property_string_ex');
// -- add_property_stringl_ex
- add_property_stringl_ex := GetProcAddress(PHPLib, 'add_property_stringl_ex');
+ LFunc(@add_property_stringl_ex, 'add_property_stringl_ex');
// -- add_property_zval_ex
- add_property_zval_ex := GetProcAddress(PHPLib, 'add_property_zval_ex');
-
- call_user_function := GetProcAddress(PHPLib, 'call_user_function');
- call_user_function_ex := GetProcAddress(PHPLib, 'call_user_function_ex');
+ LFunc(@add_property_zval_ex, 'add_property_zval_ex');
+ LFunc(@call_user_function, {$IFDEF COMPILER_php7pv}'__call_function'{$ELSE}'call_user_function'{$ENDIF});
+ {$IFNDEF COMPILER_php7pv}
+ LFunc(@call_user_function_ex, 'call_user_function_ex');
+ {$ENDIF}
// -- add_assoc_long_ex
- add_assoc_long_ex := GetProcAddress(PHPLib, 'add_assoc_long_ex');
+ LFunc(@add_assoc_long_ex, 'add_assoc_long_ex');
// -- add_assoc_null_ex
- add_assoc_null_ex := GetProcAddress(PHPLib, 'add_assoc_null_ex');
+ LFunc(@add_assoc_null_ex, 'add_assoc_null_ex');
// -- add_assoc_bool_ex
- add_assoc_bool_ex := GetProcAddress(PHPLib, 'add_assoc_bool_ex');
+ LFunc(@add_assoc_bool_ex, 'add_assoc_bool_ex');
// -- add_assoc_resource_ex
- add_assoc_resource_ex := GetProcAddress(PHPLib, 'add_assoc_resource_ex');
+ LFunc(@add_assoc_resource_ex, 'add_assoc_resource_ex');
// -- add_assoc_double_ex
- add_assoc_double_ex := GetProcAddress(PHPLib, 'add_assoc_double_ex');
+ LFunc(@add_assoc_double_ex, 'add_assoc_double_ex');
// -- add_assoc_string_ex
- add_assoc_string_ex := GetProcAddress(PHPLib, 'add_assoc_string_ex');
+ LFunc(@add_assoc_string_ex, 'add_assoc_string_ex');
// -- add_assoc_stringl_ex
- add_assoc_stringl_ex := GetProcAddress(PHPLib, 'add_assoc_stringl_ex');
+ LFunc(@add_assoc_stringl_ex, 'add_assoc_stringl_ex');
// -- add_assoc_zval_ex
- add_assoc_zval_ex := GetProcAddress(PHPLib, 'add_assoc_zval_ex');
+ LFunc(@add_assoc_zval_ex, 'add_assoc_zval_ex');
// -- add_index_long
- add_index_long := GetProcAddress(PHPLib, 'add_index_long');
+ LFunc(@add_index_long, 'add_index_long');
// -- add_index_null
- add_index_null := GetProcAddress(PHPLib, 'add_index_null');
+ LFunc(@add_index_null, 'add_index_null');
// -- add_index_bool
- add_index_bool := GetProcAddress(PHPLib, 'add_index_bool');
+ LFunc(@add_index_bool, 'add_index_bool');
// -- add_index_resource
- add_index_resource := GetProcAddress(PHPLib, 'add_index_resource');
+ LFunc(@add_index_resource, 'add_index_resource');
// -- add_index_double
- add_index_double := GetProcAddress(PHPLib, 'add_index_double');
+ LFunc(@add_index_double, 'add_index_double');
// -- add_index_string
- add_index_string := GetProcAddress(PHPLib, 'add_index_string');
+ LFunc(@add_index_string, 'add_index_string');
// -- add_index_stringl
- add_index_stringl := GetProcAddress(PHPLib, 'add_index_stringl');
+ LFunc(@add_index_stringl, 'add_index_stringl');
// -- add_index_zval
- add_index_zval := GetProcAddress(PHPLib, 'add_index_zval');
+ LFunc(@add_index_zval, 'add_index_zval');
// -- add_next_index_long
- add_next_index_long := GetProcAddress(PHPLib, 'add_next_index_long');
+ LFunc(@add_next_index_long, 'add_next_index_long');
// -- add_next_index_null
- add_next_index_null := GetProcAddress(PHPLib, 'add_next_index_null');
+ LFunc(@add_next_index_null, 'add_next_index_null');
// -- add_next_index_bool
- add_next_index_bool := GetProcAddress(PHPLib, 'add_next_index_bool');
+ LFunc(@add_next_index_bool, 'add_next_index_bool');
// -- add_next_index_resource
- add_next_index_resource := GetProcAddress(PHPLib, 'add_next_index_resource');
+ LFunc(@add_next_index_resource, 'add_next_index_resource');
// -- add_next_index_double
- add_next_index_double := GetProcAddress(PHPLib, 'add_next_index_double');
+ LFunc(@add_next_index_double, 'add_next_index_double');
// -- add_next_index_string
- add_next_index_string := GetProcAddress(PHPLib, 'add_next_index_string');
+ LFunc(@add_next_index_string, 'add_next_index_string');
// -- add_next_index_stringl
- add_next_index_stringl := GetProcAddress(PHPLib, 'add_next_index_stringl');
+ LFunc(@add_next_index_stringl, 'add_next_index_stringl');
// -- add_next_index_zval
- add_next_index_zval := GetProcAddress(PHPLib, 'add_next_index_zval');
+ LFunc(@add_next_index_zval, 'add_next_index_zval');
// -- add_get_assoc_string_ex
- add_get_assoc_string_ex := GetProcAddress(PHPLib, 'add_get_assoc_string_ex');
+ LFunc(@add_get_assoc_string_ex, 'add_get_assoc_string_ex');
// -- add_get_assoc_stringl_ex
- add_get_assoc_stringl_ex := GetProcAddress(PHPLib, 'add_get_assoc_stringl_ex');
+ LFunc(@add_get_assoc_stringl_ex, 'add_get_assoc_stringl_ex');
// -- add_get_index_long
- add_get_index_long := GetProcAddress(PHPLib, 'add_get_index_long');
+ LFunc(@add_get_index_long, 'add_get_index_long');
// -- add_get_index_double
- add_get_index_double := GetProcAddress(PHPLib, 'add_get_index_double');
+ LFunc(@add_get_index_double, 'add_get_index_double');
// -- add_get_index_string
- add_get_index_string := GetProcAddress(PHPLib, 'add_get_index_string');
+ LFunc(@add_get_index_string, 'add_get_index_string');
// -- add_get_index_stringl
- add_get_index_stringl := GetProcAddress(PHPLib, 'add_get_index_stringl');
+ LFunc(@add_get_index_stringl, 'add_get_index_stringl');
// -- _array_init
- _array_init := GetProcAddress(PHPLib, '_array_init');
+ LFunc(@_array_init, '_array_init');
// -- _object_init
- _object_init := GetProcAddress(PHPLib, '_object_init');
+ LFunc(@_object_init, '_object_init');
// -- _object_init_ex
- _object_init_ex := GetProcAddress(PHPLib, '_object_init_ex');
+ LFunc(@_object_init_ex, '_object_init_ex');
// -- _object_and_properties_init
- _object_and_properties_init := GetProcAddress(PHPLib, '_object_and_properties_init');
+ LFunc(@_object_and_properties_init, '_object_and_properties_init');
- // -- zend_register_internal_class
- zend_register_internal_class := GetProcAddress(PHPLib, 'zend_register_internal_class');
+ // -- zend_register_internal_class
+ LFunc(@zend_register_internal_class, 'zend_register_internal_class');
// -- zend_register_internal_class_ex
- zend_register_internal_class_ex := GetProcAddress(PHPLib, 'zend_register_internal_class_ex');
+ LFunc(@zend_register_internal_class_ex, 'zend_register_internal_class_ex');
+
+ // -- zend_startup_module
+ LFunc(@zend_startup_module, 'zend_startup_module');
+
+ // -- zend_startup_module_ex
+ LFunc(@zend_startup_module_ex, 'zend_startup_module_ex');
+
+ // -- zend_register_module_ex
+ LFunc(@zend_register_module_ex, 'zend_register_module_ex');
+
+ // -- zend_register_internal_module
+ LFunc(@zend_register_internal_module, 'zend_register_internal_module');
+
+ // -- zend_startup_modules
+ LFunc(@zend_startup_modules, 'zend_startup_modules');
+
+ // -- zend_collect_module_handlers
+ LFunc(@zend_collect_module_handlers, 'zend_collect_module_handlers');
// -- get_zend_version
- get_zend_version := GetProcAddress(PHPLib, 'get_zend_version');
+ LFunc(@get_zend_version, 'get_zend_version');
// -- zend_make_printable_zval
- zend_make_printable_zval := GetProcAddress(PHPLib, 'zend_make_printable_zval');
+ LFunc(@zend_make_printable_zval, 'zend_make_printable_zval');
// -- zend_print_zval
- zend_print_zval := GetProcAddress(PHPLib, 'zend_print_zval');
+ LFunc(@zend_print_zval, 'zend_print_zval');
// -- zend_print_zval_r
- zend_print_zval_r := GetProcAddress(PHPLib, 'zend_print_zval_r');
+ LFunc(@zend_print_zval_r, 'zend_print_zval_r');
// -- zend_output_debug_string
- zend_output_debug_string := GetProcAddress(PHPLib, 'zend_output_debug_string');
+ LFunc(@zend_output_debug_string, 'zend_output_debug_string');
// -- zend_get_parameters
- ZendGetParameters := GetProcAddress(PHPLib, 'zend_get_parameters');
+ LFunc(@Zend_Get_Parameters, 'zend_get_parameters');
// - zend_get_parameters_ex (native call)
- zend_get_params_ex := GetProcAddress(PHPLib, 'zend_get_params_ex');
+ LFunc(@zend_get_params_ex, 'zend_get_parameters_ex');
{$IFDEF PHP5}
- zend_destroy_file_handle := GetProcAddress(PHPLib, 'zend_destroy_file_handle');
+ LFunc(@zend_destroy_file_handle, 'zend_destroy_file_handle');
{$ENDIF}
- {$IFNDEF QUIET_LOAD}
- CheckZendErrors;
- {$ENDIF}
-
- WriteFuncPtr := GetProcAddress(PHPLib, 'zend_write');
+ LFunc(WriteFuncPtr, 'zend_write');
if Assigned(WriteFuncPtr) then
@zend_write := pointer(WriteFuncPtr^);
@@ -2750,7 +3045,7 @@ procedure convert_to_string(op: pzval);
_convert_to_string(op, nil, 0);
end;
-procedure INIT_CLASS_ENTRY(var class_container: Tzend_class_entry; class_name: zend_pchar; functions: pointer);
+procedure INIT_CLASS_ENTRY(var class_container: Tzend_class_entry; class_name: zend_pchar; functions: {$IFDEF PHP7}HashTable{$ELSE}pointer{$ENDIF});
begin
if class_name = nil then
@@ -2761,16 +3056,18 @@ procedure INIT_CLASS_ENTRY(var class_container: Tzend_class_entry; class_name: z
{$IFNDEF COMPILER_VC9}
class_container.name := strdup(class_name);
{$ELSE}
- class_container.name := estrdup(class_name);
+ {$IFDEF PHP7}
+ class_container.name.val := estrdup(class_name);
+ {$ELSE}
+ class_container.name := estrdup(class_name);
+ {$ENDIF}
{$ENDIF}
-
+ {$IFDEF PHP7}
+ class_container.name.len := strlen(class_name);
+ class_container.function_table := functions;
+ {$ELSE}
class_container.name_length := strlen(class_name);
class_container.builtin_functions := functions;
-
- {$IFDEF PHP4}
- class_container.handle_function_call := nil;
- class_container.handle_property_get := nil;
- class_container.handle_property_set := nil;
{$ENDIF}
end;
{$IFNDEF PHP7}
@@ -2791,19 +3088,26 @@ procedure ALLOC_ZVAL(out Result: pzval);
{$ENDIF}
procedure INIT_PZVAL(p: pzval);
begin
+ {$IFDEF PHP7}
+ p^.value.counted.gc.refcount := 1;
+ {$ELSE}
p^.refcount := 1;
p^.is_ref := 0;
+ {$ENDIF}
end;
procedure LOCK_ZVAL(p: pzval);
begin
- Inc(p^.refcount);
+ Inc({$IFDEF PHP7}
+ p^.value.counted.gc.refcount{$ELSE}p^.refcount{$ENDIF});
end;
procedure UNLOCK_ZVAL(p: pzval);
begin
- if p^.refcount > 0 then
- Dec(p^.refcount);
+ if {$IFDEF PHP7}
+ p^.value.counted.gc.refcount{$ELSE}p^.refcount{$ENDIF} > 0 then
+ Dec({$IFDEF PHP7}
+ p^.value.counted.gc.refcount{$ELSE}p^.refcount{$ENDIF});
end;
function MAKE_STD_ZVAL: pzval;
@@ -2814,85 +3118,71 @@ function MAKE_STD_ZVAL: pzval;
INIT_PZVAL(Result);
end;
-function zend_get_parameters_ex(number: integer; var Params: pzval_array): integer;
+function zend_get_parameters_my(number: integer; var Params: pzval_array; TSRMLS_DC: Pointer): integer;
var
i : integer;
+
+ p:
+ {$IFDEF PHP7}
+ pzval
+ {$ELSE}
+ pppzval
+ {$ENDIF};
begin
- SetLength(Params, number);
if number = 0 then
begin
Result := SUCCESS;
Exit;
end;
+ {$IFDEF PHP7}
+ Params.value.arr.nNumOfElements := number;
for i := 0 to number - 1 do
- New(Params[i]);
+ zend_hash_index_add_empty_element(Params.value.arr, i);
- Result := zend_get_parameters(number, number, Params);
-end;
+ p := emalloc(number * sizeOf(zval));
+ Result := _zend_get_parameters_array_ex(number, p);
-function zend_get_parameters_my(number: integer; var Params: pzval_array; TSRMLS_DC: Pointer): integer;
-var
- i : integer;
- p: {$IFNDEF PHP700} pppzval {$ELSE} pzval{$ENDIF};
-begin
- SetLength(Params, number);
- if number = 0 then
+ for i := 0 to number - 1 do
begin
- Result := SUCCESS;
- Exit;
+ _zend_hash_update_ind(Params.value.arr, i, p, '', 0);
+ if i <> number then
+ inc(integer(p), sizeof(zval));
end;
+
+ efree(p);
+ _zend_get_parameters_array_ex(number, p);
+ {$ELSE}
+ SetLength(Params, number);
for i := 0 to number - 1 do
New(Params[i]);
- {$IFNDEF PHP700}
+
p := emalloc(number * sizeOf(ppzval));
- {$ENDIF}
Result := _zend_get_parameters_array_ex(number, p, TSRMLS_DC);
for i := 0 to number - 1 do
begin
- {$IFNDEF PHP700}Params[i]^ := p^^ {$ELSE}Params[i] := p{$ENDIF};
+ Params[i]^ := p^^;
if i <> number then
- inc(integer({$IFNDEF PHP700}p^{$ELSE}p{$ENDIF}), sizeof({$IFNDEF PHP700} ppzval {$ELSE} pzval{$ENDIF}));
+ p^ := ppzval( integer(p^) + sizeof(ppzval) );
end;
efree(p);
-end;
-
-function zend_get_parameters(ht: integer; param_count: integer; Params: array of ppzval): integer; assembler; register;
-asm
- push esi
- mov esi, ecx
- mov ecx, [ebp+8]
- cmp ecx, 0
- je @first
- @toploop:
- {$IFDEF VERSION6}
- push [esi][ecx * 4]
- {$ELSE}
- push dword [esi][ecx * 4]
{$ENDIF}
- loop @toploop
- @first:
- push dword [esi]
- push edx
- push eax
- call ZendGetParameters
- mov ecx, [ebp+8]
- add ecx, 3
- @toploop2:
- pop edx
- loop @toploop2
- pop esi
end;
procedure dispose_pzval_array(Params: pzval_array);
var
i : integer;
begin
+ {$IFDEF PHP7}
+ if Params.value.arr.nNumOfElements>0 then
+ for i := 0 to Params.value.arr.nNumOfElements-1 do
+ Freemem(zend_hash_index_findZval(Params,i));
+ {$ELSE}
if Length(Params)>0 then
-
for i := 0 to High(Params) do
FreeMem(Params[i]);
+ {$ENDIF}
Params := nil;
end;
@@ -2902,259 +3192,24 @@ constructor EPHP4DelphiException.Create(const Msg: zend_ustr);
begin
inherited Create('Unable to link '+ Msg+' function');
end;
+constructor EPHP4DelphiHookException.Create(const Msg: zend_ustr);
+begin
+ inherited Create('Unable to hook '+ Msg+' function');
+end;
{procedure zenderror(Error : zend_pchar);
begin
zend_error(E_PARSE, Error);
end;}
-
-{$IFNDEF QUIET_LOAD}
-procedure CheckZendErrors;
-begin
- if @zend_disable_function = nil then raise EPHP4DelphiException.Create('zend_disable_function');
- if @zend_disable_class = nil then raise EPHP4DelphiException.Create('zend_disable_class');
- if @zend_register_list_destructors_ex = nil then raise EPHP4DelphiException.Create('zend_register_list_destructors_ex');
- if @zend_register_resource = nil then raise EPHP4DelphiException.Create('zend_register_resource');
- if @zend_fetch_resource = nil then raise EPHP4DelphiException.Create('zend_fetch_resource');
- if @zend_list_insert = nil then raise EPHP4DelphiException.Create('zend_list_insert');
- {$IFNDEF PHP7}
- if @_zend_list_addref = nil then raise EPHP4DelphiException.Create('zend_list_addref');
- if @_zend_list_delete = nil then raise EPHP4DelphiException.Create('zend_list_delete');
- if @_zend_list_find = nil then raise EPHP4DelphiException.Create('_zend_list_find');
- {$ENDIF}
- if @zend_rsrc_list_get_rsrc_type = nil then raise EPHP4DelphiException.Create('zend_rsrc_list_get_rsrc_type');
- if @zend_fetch_list_dtor_id = nil then raise EPHP4DelphiException.Create('zend_fetch_list_dtor_id');
- if @zend_get_compiled_filename = nil then raise EPHP4DelphiException.Create('zend_get_compiled_filename');
- if @zend_get_compiled_lineno = nil then raise EPHP4DelphiException.Create('zend_get_compiled_lineno');
- if @tsrm_startup = nil then raise EPHP4DelphiException.Create('tsrm_startup');
- if @ts_allocate_id = nil then raise EPHP4DelphiException.Create('ts_allocate_id');
- if @ts_free_id = nil then raise EPHP4DelphiException.Create('ts_free_id');
- if @zend_strndup = nil then raise EPHP4DelphiException.Create('zend_strndup');
-
- if @_emalloc = nil then raise EPHP4DelphiException.Create('_emalloc');
- if @_efree = nil then raise EPHP4DelphiException.Create('_efree');
- if @_ecalloc = nil then raise EPHP4DelphiException.Create('_ecalloc');
- if @_erealloc = nil then raise EPHP4DelphiException.Create('_erealloc');
- if @_estrdup = nil then raise EPHP4DelphiException.Create('_estrdup');
- if @_estrndup = nil then raise EPHP4DelphiException.Create('_estrndup');
- if @zend_set_memory_limit = nil then raise EPHP4DelphiException.Create('zend_set_memory_limit');
- if @start_memory_manager = nil then raise EPHP4DelphiException.Create('start_memory_manager');
- if @shutdown_memory_manager = nil then raise EPHP4DelphiException.Create('shutdown_memory_manager');
- {$IFDEF PHP4}
- if @zend_hash_init = nil then raise EPHP4DelphiException.Create('zend_hash_init');
- if @zend_hash_init_ex = nil then raise EPHP4DelphiException.Create('zend_hash_init_ex');
- if @zend_hash_add_or_update = nil then raise EPHP4DelphiException.Create('zend_hash_add_or_update');
- if @zend_hash_quick_add_or_update = nil then raise EPHP4DelphiException.Create('zend_hash_quick_add_or_update');
- if @zend_hash_index_update_or_next_insert = nil then raise EPHP4DelphiException.Create('zend_hash_index_update_or_next_insert');
- if @zend_hash_merge = nil then raise EPHP4DelphiException.Create('zend_hash_merge');
- {$ENDIF}
-
- {$IFDEF PHP5}
- if @_zend_hash_add_or_update = nil then raise EPHP4DelphiException.Create('_zend_hash_add_or_update');
- {$ENDIF}
-
- if @zend_hash_destroy = nil then raise EPHP4DelphiException.Create('zend_hash_destroy');
- if @zend_hash_clean = nil then raise EPHP4DelphiException.Create('zend_hash_clean');
- if @zend_hash_add_empty_element = nil then raise EPHP4DelphiException.Create('zend_hash_add_empty_element');
- if @zend_hash_graceful_destroy = nil then raise EPHP4DelphiException.Create('zend_hash_graceful_destroy');
- if @zend_hash_graceful_reverse_destroy = nil then raise EPHP4DelphiException.Create('zend_hash_graceful_reverse_destroy');
- if @zend_hash_apply = nil then raise EPHP4DelphiException.Create('zend_hash_apply');
- if @zend_hash_apply_with_argument = nil then raise EPHP4DelphiException.Create('zend_hash_apply_with_argument');
- if @zend_hash_reverse_apply = nil then raise EPHP4DelphiException.Create('zend_hash_reverse_apply');
- if @zend_hash_del_key_or_index = nil then raise EPHP4DelphiException.Create('zend_hash_del_key_or_index');
- if @zend_get_hash_value = nil then raise EPHP4DelphiException.Create('zend_get_hash_value');
- if @zend_hash_find = nil then raise EPHP4DelphiException.Create('zend_hash_find');
- if @zend_hash_quick_find = nil then raise EPHP4DelphiException.Create('zend_hash_quick_find');
- if @zend_hash_index_find = nil then raise EPHP4DelphiException.Create('zend_hash_index_find');
- if @zend_hash_exists = nil then raise EPHP4DelphiException.Create('zend_hash_exists');
- if @zend_hash_index_exists = nil then raise EPHP4DelphiException.Create('zend_hash_index_exists');
- if @zend_hash_next_free_element = nil then raise EPHP4DelphiException.Create('zend_hash_next_free_element');
- if @zend_hash_move_forward_ex = nil then raise EPHP4DelphiException.Create('zend_hash_move_forward_ex');
- if @zend_hash_move_backwards_ex = nil then raise EPHP4DelphiException.Create('zend_hash_move_backwards_ex');
- if @zend_hash_get_current_key_ex = nil then raise EPHP4DelphiException.Create('zend_hash_get_current_key_ex');
- if @zend_hash_get_current_key_type_ex = nil then raise EPHP4DelphiException.Create('zend_hash_get_current_key_type_ex');
- if @zend_hash_get_current_data_ex = nil then raise EPHP4DelphiException.Create('zend_hash_get_current_data_ex');
- if @zend_hash_internal_pointer_reset_ex = nil then raise EPHP4DelphiException.Create('zend_hash_internal_pointer_reset_ex');
- if @zend_hash_internal_pointer_end_ex = nil then raise EPHP4DelphiException.Create('zend_hash_internal_pointer_end_ex');
- if @zend_hash_copy = nil then raise EPHP4DelphiException.Create('zend_hash_copy');
- if @zend_hash_sort = nil then raise EPHP4DelphiException.Create('zend_hash_sort');
- if @zend_hash_compare = nil then raise EPHP4DelphiException.Create('zend_hash_compare');
- if @zend_hash_minmax = nil then raise EPHP4DelphiException.Create('zend_hash_minmax');
- if @zend_hash_num_elements = nil then raise EPHP4DelphiException.Create('zend_hash_num_elements');
- if @zend_hash_rehash = nil then raise EPHP4DelphiException.Create('zend_hash_rehash');
- if @zend_hash_func = nil then raise EPHP4DelphiException.Create('zend_hash_func');
- if @zend_get_constant = nil then raise EPHP4DelphiException.Create('zend_get_constant');
- if @zend_register_long_constant = nil then raise EPHP4DelphiException.Create('zend_register_long_constant');
- if @zend_register_double_constant = nil then raise EPHP4DelphiException.Create('zend_register_double_constant');
- if @zend_register_string_constant = nil then raise EPHP4DelphiException.Create('zend_register_string_constant');
- if @zend_register_stringl_constant = nil then raise EPHP4DelphiException.Create('zend_register_stringl_constant');
- if @zend_register_constant = nil then raise EPHP4DelphiException.Create('zend_register_constant');
- if @tsrm_shutdown = nil then raise EPHP4DelphiException.Create('tsrm_shutdown');
- if @ts_resource_ex = nil then raise EPHP4DelphiException.Create('ts_resource_ex');
- if @ts_free_thread = nil then raise EPHP4DelphiException.Create('ts_free_thread');
- if @zend_error = nil then raise EPHP4DelphiException.Create('zend_error');
- if @zend_error_cb = nil then raise EPHP4DelphiException.Create('zend_error_cb');
- if @zend_eval_string = nil then raise EPHP4DelphiException.Create('zend_eval_string');
- if @zend_make_compiled_string_description = nil then raise EPHP4DelphiException.Create('zend_make_compiled_string_description');
-
- {$IFDEF PHP4}
- if @_zval_dtor = nil then raise EPHP4DelphiException.Create('_zval_dtor');
- if @_zval_copy_ctor = nil then raise EPHP4DelphiException.Create('_zval_copy_ctor');
- {$ELSE}
- if @_zval_dtor_func = nil then raise EPHP4DelphiException.Create('_zval_dtor_func');
- if @_zval_copy_ctor_func = nil then raise EPHP4DelphiException.Create('_zval_ctor_func');
- {$ENDIF}
-
- if @zend_print_variable = nil then raise EPHP4DelphiException.Create('zend_print_variable');
- if @zend_stack_init = nil then raise EPHP4DelphiException.Create('zend_stack_init');
- if @zend_stack_push = nil then raise EPHP4DelphiException.Create('zend_stack_push');
- if @zend_stack_top = nil then raise EPHP4DelphiException.Create('zend_stack_top');
- if @zend_stack_del_top = nil then raise EPHP4DelphiException.Create('zend_stack_del_top');
- if @zend_stack_int_top = nil then raise EPHP4DelphiException.Create('zend_stack_int_top');
- if @zend_stack_is_empty = nil then raise EPHP4DelphiException.Create('zend_stack_is_empty');
- if @zend_stack_destroy = nil then raise EPHP4DelphiException.Create('zend_stack_destroy');
- if @zend_stack_base = nil then raise EPHP4DelphiException.Create('zend_stack_base');
- if @zend_stack_count = nil then raise EPHP4DelphiException.Create('zend_stack_count');
- if @zend_stack_apply = nil then raise EPHP4DelphiException.Create('zend_stack_apply');
- if @zend_stack_apply_with_argument = nil then raise EPHP4DelphiException.Create('zend_stack_apply_with_argument');
- if @_convert_to_string = nil then raise EPHP4DelphiException.Create('_convert_to_string');
- if @add_function = nil then raise EPHP4DelphiException.Create('add_function');
- if @sub_function = nil then raise EPHP4DelphiException.Create('sub_function');
- if @mul_function = nil then raise EPHP4DelphiException.Create('mul_function');
- if @div_function = nil then raise EPHP4DelphiException.Create('div_function');
- if @mod_function = nil then raise EPHP4DelphiException.Create('mod_function');
- if @boolean_xor_function = nil then raise EPHP4DelphiException.Create('boolean_xor_function');
- if @boolean_not_function = nil then raise EPHP4DelphiException.Create('boolean_not_function');
- if @bitwise_not_function = nil then raise EPHP4DelphiException.Create('bitwise_not_function');
- if @bitwise_or_function = nil then raise EPHP4DelphiException.Create('bitwise_or_function');
- if @bitwise_and_function = nil then raise EPHP4DelphiException.Create('bitwise_and_function');
- if @bitwise_xor_function = nil then raise EPHP4DelphiException.Create('bitwise_xor_function');
- if @shift_left_function = nil then raise EPHP4DelphiException.Create('shift_left_function');
- if @shift_right_function = nil then raise EPHP4DelphiException.Create('shift_right_function');
- if @concat_function = nil then raise EPHP4DelphiException.Create('concat_function');
- if @is_equal_function = nil then raise EPHP4DelphiException.Create('is_equal_function');
- if @is_identical_function = nil then raise EPHP4DelphiException.Create('is_identical_function');
- if @is_not_identical_function = nil then raise EPHP4DelphiException.Create('is_not_identical_function');
- if @is_not_equal_function = nil then raise EPHP4DelphiException.Create('is_not_equal_function');
- if @is_smaller_function = nil then raise EPHP4DelphiException.Create('is_smaller_function');
- if @is_smaller_or_equal_function = nil then raise EPHP4DelphiException.Create('is_smaller_or_equal_function');
- if @increment_function = nil then raise EPHP4DelphiException.Create('increment_function');
- if @decrement_function = nil then raise EPHP4DelphiException.Create('decrement_function');
- if @convert_scalar_to_number = nil then raise EPHP4DelphiException.Create('convert_scalar_to_number');
- if @convert_to_long = nil then raise EPHP4DelphiException.Create('convert_to_long');
- if @convert_to_double = nil then raise EPHP4DelphiException.Create('convert_to_double');
- if @convert_to_long_base = nil then raise EPHP4DelphiException.Create('convert_to_long_base');
- if @convert_to_null = nil then raise EPHP4DelphiException.Create('convert_to_null');
- if @convert_to_boolean = nil then raise EPHP4DelphiException.Create('convert_to_boolean');
- if @convert_to_array = nil then raise EPHP4DelphiException.Create('convert_to_array');
- if @convert_to_object = nil then raise EPHP4DelphiException.Create('convert_to_object');
- if @add_char_to_string = nil then raise EPHP4DelphiException.Create('add_char_to_string');
- if @add_string_to_string = nil then raise EPHP4DelphiException.Create('add_string_to_string');
- if @zend_string_to_double = nil then raise EPHP4DelphiException.Create('zend_string_to_double');
- if @zval_is_true = nil then raise EPHP4DelphiException.Create('zval_is_true');
- if @compare_function = nil then raise EPHP4DelphiException.Create('compare_function');
- if @numeric_compare_function = nil then raise EPHP4DelphiException.Create('numeric_compare_function');
- if @string_compare_function = nil then raise EPHP4DelphiException.Create('string_compare_function');
- if @zend_str_tolower = nil then raise EPHP4DelphiException.Create('zend_str_tolower');
- if @zend_binary_zval_strcmp = nil then raise EPHP4DelphiException.Create('zend_binary_zval_strcmp');
- if @zend_binary_zval_strncmp = nil then raise EPHP4DelphiException.Create('zend_binary_zval_strncmp');
- if @zend_binary_zval_strcasecmp = nil then raise EPHP4DelphiException.Create('zend_binary_zval_strcasecmp');
- if @zend_binary_zval_strncasecmp = nil then raise EPHP4DelphiException.Create('zend_binary_zval_strncasecmp');
- if @zend_binary_strcmp = nil then raise EPHP4DelphiException.Create('zend_binary_strcmp');
- if @zend_binary_strncmp = nil then raise EPHP4DelphiException.Create('zend_binary_strncmp');
- if @zend_binary_strcasecmp = nil then raise EPHP4DelphiException.Create('zend_binary_strcasecmp');
- if @zend_binary_strncasecmp = nil then raise EPHP4DelphiException.Create('zend_binary_strncasecmp');
- if @zendi_smart_strcmp = nil then raise EPHP4DelphiException.Create('zendi_smart_strcmp');
- if @zend_compare_symbol_tables = nil then raise EPHP4DelphiException.Create('zend_compare_symbol_tables');
- if @zend_compare_arrays = nil then raise EPHP4DelphiException.Create('zend_compare_arrays');
- if @zend_compare_objects = nil then raise EPHP4DelphiException.Create('zend_compare_objects');
- if @zend_atoi = nil then raise EPHP4DelphiException.Create('zend_atoi');
- if @get_active_function_name = nil then raise EPHP4DelphiException.Create('get_active_function_name');
- if @zend_get_executed_filename = nil then raise EPHP4DelphiException.Create('zend_get_executed_filename');
- if @zend_set_timeout = nil then raise EPHP4DelphiException.Create('zend_set_timeout');
- if @zend_unset_timeout = nil then raise EPHP4DelphiException.Create('zend_unset_timeout');
- if @zend_timeout = nil then raise EPHP4DelphiException.Create('zend_timeout');
- if @zend_highlight = nil then raise EPHP4DelphiException.Create('zend_highlight');
- if @zend_strip = nil then raise EPHP4DelphiException.Create('zend_strip');
- if @highlight_file = nil then raise EPHP4DelphiException.Create('highlight_file');
- if @highlight_string = nil then raise EPHP4DelphiException.Create('highlight_string');
- if @zend_html_putc = nil then raise EPHP4DelphiException.Create('zend_html_putc');
- if @zend_html_puts = nil then raise EPHP4DelphiException.Create('zend_html_puts');
- if @zend_indent = nil then raise EPHP4DelphiException.Create('zend_indent');
- if @_zend_get_parameters_array_ex = nil then raise EPHP4DelphiException.Create('_zend_get_parameters_array_ex');
- if @zend_ini_refresh_caches = nil then raise EPHP4DelphiException.Create('zend_ini_refresh_caches');
- if @zend_alter_ini_entry = nil then raise EPHP4DelphiException.Create('zend_alter_ini_entry');
- if @zend_restore_ini_entry = nil then raise EPHP4DelphiException.Create('zend_restore_ini_entry');
- if @zend_ini_long = nil then raise EPHP4DelphiException.Create('zend_ini_long');
- if @zend_ini_double = nil then raise EPHP4DelphiException.Create('zend_ini_double');
- if @zend_ini_string = nil then raise EPHP4DelphiException.Create('zend_ini_string');
- if @compile_string = nil then raise EPHP4DelphiException.Create('compile_string');
- if @execute = nil then raise EPHP4DelphiException.Create('execute');
- if @zend_wrong_param_count = nil then raise EPHP4DelphiException.Create('zend_wrong_param_count');
- if @add_property_long_ex = nil then raise EPHP4DelphiException.Create('add_property_long_ex');
- if @add_property_null_ex = nil then raise EPHP4DelphiException.Create('add_property_null_ex');
- if @add_property_bool_ex = nil then raise EPHP4DelphiException.Create('add_property_bool_ex');
- if @add_property_resource_ex = nil then raise EPHP4DelphiException.Create('add_property_resource_ex');
- if @add_property_double_ex = nil then raise EPHP4DelphiException.Create('add_property_double_ex');
- if @add_property_string_ex = nil then raise EPHP4DelphiException.Create('add_property_string_ex');
- if @add_property_stringl_ex = nil then raise EPHP4DelphiException.Create('add_property_stringl_ex');
- if @add_property_zval_ex = nil then raise EPHP4DelphiException.Create('add_property_zval_ex');
- if @call_user_function = nil then raise EPHP4DelphiException.Create('call_user_function');
- if @call_user_function_ex = nil then raise EPHP4DelphiException.Create('call_user_function_ex');
- if @add_assoc_long_ex = nil then raise EPHP4DelphiException.Create('add_assoc_long_ex');
- if @add_assoc_null_ex = nil then raise EPHP4DelphiException.Create('add_assoc_null_ex');
- if @add_assoc_bool_ex = nil then raise EPHP4DelphiException.Create('add_assoc_bool_ex');
- if @add_assoc_resource_ex = nil then raise EPHP4DelphiException.Create('add_assoc_resource_ex');
- if @add_assoc_double_ex = nil then raise EPHP4DelphiException.Create('add_assoc_double_ex');
- if @add_assoc_string_ex = nil then raise EPHP4DelphiException.Create('add_assoc_string_ex');
- if @add_assoc_stringl_ex = nil then raise EPHP4DelphiException.Create('add_assoc_stringl_ex');
- if @add_assoc_zval_ex = nil then raise EPHP4DelphiException.Create('add_assoc_zval_ex');
- if @add_index_long = nil then raise EPHP4DelphiException.Create('add_index_long');
- if @add_index_null = nil then raise EPHP4DelphiException.Create('add_index_null');
- if @add_index_bool = nil then raise EPHP4DelphiException.Create('add_index_bool');
- if @add_index_resource = nil then raise EPHP4DelphiException.Create('add_index_resource');
- if @add_index_double = nil then raise EPHP4DelphiException.Create('add_index_double');
- if @add_index_string = nil then raise EPHP4DelphiException.Create('add_index_string');
- if @add_index_stringl = nil then raise EPHP4DelphiException.Create('add_index_stringl');
- if @add_index_zval = nil then raise EPHP4DelphiException.Create('add_index_zval');
- if @add_next_index_long = nil then raise EPHP4DelphiException.Create('add_next_index_long');
- if @add_next_index_null = nil then raise EPHP4DelphiException.Create('add_next_index_null');
- if @add_next_index_bool = nil then raise EPHP4DelphiException.Create('add_next_index_bool');
- if @add_next_index_resource = nil then raise EPHP4DelphiException.Create('add_next_index_resource');
- if @add_next_index_double = nil then raise EPHP4DelphiException.Create('add_next_index_double');
- if @add_next_index_string = nil then raise EPHP4DelphiException.Create('add_next_index_string');
- if @add_next_index_stringl = nil then raise EPHP4DelphiException.Create('add_next_index_stringl');
- if @add_next_index_zval = nil then raise EPHP4DelphiException.Create('add_next_index_zval');
- if @add_get_assoc_string_ex = nil then raise EPHP4DelphiException.Create('add_get_assoc_string_ex');
- if @add_get_assoc_stringl_ex = nil then raise EPHP4DelphiException.Create('add_get_assoc_stringl_ex');
- if @add_get_index_long = nil then raise EPHP4DelphiException.Create('add_get_index_long');
- if @add_get_index_double = nil then raise EPHP4DelphiException.Create('add_get_index_double');
- if @add_get_index_string = nil then raise EPHP4DelphiException.Create('add_get_index_string');
- if @add_get_index_stringl = nil then raise EPHP4DelphiException.Create('add_get_index_stringl');
- if @_array_init = nil then raise EPHP4DelphiException.Create('_array_init');
- if @_object_init = nil then raise EPHP4DelphiException.Create('_object_init');
- if @_object_init_ex = nil then raise EPHP4DelphiException.Create('_object_init_ex');
- if @_object_and_properties_init = nil then raise EPHP4DelphiException.Create('_object_and_properties_init');
- if @zend_register_internal_class = nil then raise EPHP4DelphiException.Create('zend_register_internal_class');
- if @zend_register_internal_class_ex = nil then raise EPHP4DelphiException.Create('zend_register_internal_class_ex');
- if @get_zend_version = nil then raise EPHP4DelphiException.Create('get_zend_version');
- if @zend_make_printable_zval = nil then raise EPHP4DelphiException.Create('zend_make_printable_zval');
- if @zend_print_zval = nil then raise EPHP4DelphiException.Create('zend_print_zval');
- if @zend_print_zval_r = nil then raise EPHP4DelphiException.Create('zend_print_zval_r');
- if @zend_output_debug_string = nil then raise EPHP4DelphiException.Create('zend_output_debug_string');
- if @ZendGetParameters = nil then raise EPHP4DelphiException.Create('zend_get_parameters');
-end;
-{$ENDIF}
-
-function zend_hash_get_current_data(ht: PHashTable; pData: Pointer): Integer; cdecl;
+function zend_hash_get_current_data(ht: {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; pData: Pointer): Integer; cdecl;
begin
- result := zend_hash_get_current_data_ex(ht, pData, nil);
+ result := zend_hash_get_current_data_ex(ht, pData, cardinal(nil));
end;
-procedure zend_hash_internal_pointer_reset(ht: PHashTable); cdecl;
+procedure zend_hash_internal_pointer_reset(ht: {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}); cdecl;
begin
- zend_hash_internal_pointer_reset_ex(ht, nil);
+ zend_hash_internal_pointer_reset_ex(ht, cardinal(nil));
end;
function ts_resource(id : integer) : pointer;
@@ -3167,17 +3222,13 @@ function tsrmls_fetch : pointer;
result := ts_resource_ex(0, nil);
end;
-{$IFDEF PHP4}
-function zval_copy_ctor(val : pzval) : integer;
-begin
- result := _zval_copy_ctor(val, nil, 0);
-end;
-{$ENDIF}
-
-function zend_unregister_functions(functions : pzend_function_entry; count : integer; function_table : PHashTable; TSRMLS_DC : pointer) : integer;
+function zend_unregister_functions(functions : {$IFDEF PHP7}P_zend_function_entry{$ELSE}pzend_function_entry{$ENDIF}; count : integer; function_table : {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; TSRMLS_DC : pointer) : integer;
var
i : integer;
- ptr : pzend_function_entry;
+ {$IFDEF PHP7}
+ pzs: zend_pchar;
+ {$ENDIF}
+ ptr : {$IFDEF PHP7}P_zend_function_entry{$ELSE}pzend_function_entry{$ENDIF};
begin
Result := SUCCESS;
i := 0;
@@ -3188,7 +3239,13 @@ function zend_unregister_functions(functions : pzend_function_entry; count : int
begin
if ( count <> -1 ) and (i >= count) then
break;
+ {$IFDEF PHP7}
+ pzs^.len := strlen(ptr.fname);
+ pzs^.val := estrdup(ptr.fname);
+ zend_hash_del_key_or_index(function_table, pzs);
+ {$ELSE}
zend_hash_del_key_or_index(function_table, ptr.fname, strlen(ptr.fname) +1, 0, HASH_DEL_KEY);
+ {$ENDIF}
inc(ptr);
inc(i);
end;
@@ -3196,14 +3253,14 @@ function zend_unregister_functions(functions : pzend_function_entry; count : int
// registers all functions in *library_functions in the function hash
-function zend_register_functions(functions : pzend_function_entry; function_table : PHashTable; _type: integer; TSRMLS_DC : pointer) : integer;
+function zend_register_functions(functions : {$IFDEF PHP7}P_zend_function_entry{$ELSE}pzend_function_entry{$ENDIF}; function_table : {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; _type: integer; TSRMLS_DC : pointer) : integer;
var
- ptr : pzend_function_entry;
- _function : zend_function;
- internal_function : PzendInternalFunction;
+ ptr : {$IFDEF PHP7}P_zend_function_entry{$ELSE}pzend_function_entry{$ENDIF};
+ _function : {$IFDEF PHP7} _zend_function{$ELSE}zend_function{$ENDIF};
+ internal_function :{$IFDEF PHP7}P_zend_internal_function{$ELSE}PzendInternalFunction{$ENDIF};
count : integer;
unload : integer;
- target_function_table : PHashTable;
+ target_function_table : {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF};
error_type : integer;
begin
@@ -3230,8 +3287,12 @@ function zend_register_functions(functions : pzend_function_entry; function_tab
while (ptr.fname <> nil) do
begin
internal_function.handler := ptr.handler;
+ {$IFDEF PHP7}
+ internal_function.function_name.val := ptr.fname;
+ {$ELSE}
internal_function.function_name := ptr.fname;
- if (internal_function.handler = nil) then begin
+ {$ENDIF}
+ if not Assigned(internal_function.handler) then begin
zend_error(error_type, 'Null function defined as active function');
zend_unregister_functions(functions, count, target_function_table, TSRMLS_DC);
Result := FAILURE;
@@ -3264,36 +3325,43 @@ function zend_register_functions(functions : pzend_function_entry; function_tab
end;
-
+function __fgsapi(sapi_globals_value:pointer; tsrmls_dc:pointer): Pointer;
+type P = ^IntPtr;
+begin
+ Result := ppointer( P(tsrmls_dc)^ + IntPtr(sapi_globals_value)*Sizeof(Pointer) - Sizeof(Pointer) )^;
+end;
function GetGlobalResource(resource_name: AnsiString) : pointer;
var
global_id : pointer;
- global_value : integer;
- global_ptr : pointer;
- tsrmls_dc : pointer;
begin
Result := nil;
try
global_id := GetProcAddress(PHPLib, zend_pchar(resource_name));
if Assigned(global_id) then
begin
- tsrmls_dc := tsrmls_fetch;
- global_value := integer(global_id^);
- asm
- mov ecx, global_value
- mov edx, dword ptr tsrmls_dc
- mov eax, dword ptr [edx]
- mov ecx, dword ptr [eax+ecx*4-4]
- mov global_ptr, ecx
- end;
- Result := global_ptr;
+ Result := __fgsapi(pointer(global_id^), tsrmls_fetch);
end;
except
Result := nil;
end;
end;
+function GetGlobalResourceDC(resource_name: AnsiString;TSRMLS_DC:pointer) : pointer;
+var
+ global_id : pointer;
+begin
+ Result := nil;
+ try
+ global_id := GetProcAddress(PHPLib, zend_pchar(resource_name));
+ if Assigned(global_id) then
+ begin
+ Result := Pointer( __fgsapi(pointer(global_id^), TSRMLS_DC) );
+ end;
+ except
+ Result := nil;
+ end;
+end;
function GetCompilerGlobals : Pzend_compiler_globals;
begin
@@ -3314,7 +3382,7 @@ function GetAllocGlobals : pointer;
procedure zend_addref_p;
begin
- Inc(z.refcount);
+ Inc({$IFDEF PHP7}z.value.counted.gc.refcount{$ELSE}z.refcount{$ENDIF});
end;
procedure my_class_add_ref;
@@ -3333,6 +3401,20 @@ procedure copy_zend_constant(C: PZendConstant); cdecl;
end;
function object_init(arg: pzval; ce: pzend_class_entry; TSRMLS_DC : pointer) : integer; cdecl; assembler;
+{$IFDEF CPUX64}
+asm
+ mov rax, [rsp + 32]
+ mov rcx, [rsp + 24]
+ mov rdx, [rsp + 16]
+ pop rbp
+ push rax
+ push rcx
+ push rdx
+ call _object_init_ex
+ add rsp, $0c
+ ret
+end;
+{$ELSE}
asm
mov eax, [esp + 16]
mov ecx, [esp + 12]
@@ -3345,6 +3427,7 @@ function object_init(arg: pzval; ce: pzend_class_entry; TSRMLS_DC : pointer) : i
add esp, $0c
ret
end;
+{$ENDIF}
function Z_LVAL(z : pzval) : longint;
@@ -3355,10 +3438,10 @@ function Z_LVAL(z : pzval) : longint;
exit;
end;
- if z._type = IS_LONG then
+ if {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} = IS_LONG then
Result := z.value.lval
else
- case z._type of
+ case {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} of
IS_DOUBLE: Result := Trunc(z.value.dval);
IS_BOOL : Result := z.value.lval;
IS_STRING: Result := StrToIntDef( Z_STRVAL(z), 0 );
@@ -3375,10 +3458,10 @@ function Z_BVAL(z : pzval) : boolean;
exit;
end;
- if z._type = IS_BOOL then
- Result := zend_bool(z.value.lval)
+ if {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} = IS_BOOL then
+ Result := boolean(zend_bool(z.value.lval))
else
- case z._type of
+ case {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} of
IS_DOUBLE: if Trunc(z.value.dval) = 0 then Result := false else Result := true;
IS_LONG : if z.value.lval = 0 then Result := false else Result := true;
IS_STRING: if Z_STRVAL(z) = '' then Result := False else Result := True;
@@ -3396,10 +3479,10 @@ function Z_DVAL(z : pzval) : double;
exit;
end;
- if z._type = IS_DOUBLE then
+ if {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} = IS_DOUBLE then
Result := z.value.dval
else
- case z._type of
+ case {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} of
IS_LONG, IS_BOOL: Result := z.value.lval;
IS_STRING: Result := StrToFloatDef( Z_STRVAL(z), 0 );
else
@@ -3408,8 +3491,7 @@ function Z_DVAL(z : pzval) : double;
end;
function Z_VARREC(z: pzval): TVarRec;
- Var
- P: zend_ustr;
+var P: zend_ustr;
begin
if z = nil then
begin
@@ -3418,7 +3500,7 @@ function Z_VARREC(z: pzval): TVarRec;
exit;
end;
- case z._type of
+ case {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} of
IS_BOOL: begin
Result.VType := vtBoolean;
Result.VBoolean := Boolean(z.value.lval);
@@ -3433,13 +3515,13 @@ function Z_VARREC(z: pzval): TVarRec;
Result.VExtended^ := z.value.dval;
end;
IS_STRING: begin
- Result.VType := {$IFDEF PHP_UNICE}vtString{$ELSE}vtAnsiString{$ENDIF};
+ Result.VType := {$IFDEF PHP_UNICODE}vtString{$ELSE}vtAnsiString{$ENDIF};
SetLength(P, z.value.str.len);
Move(z.value.str.val^, P[1], z.value.str.len);
- {$IFDEF PHP_UNICE}
- Result.VString := Pointer(String(p));
+ {$IFDEF PHP_UNICODE}
+ Result.VUnicodeString := Pointer(P);
{$ELSE}
Result.VAnsiString := Pointer(P);
{$ENDIF}
@@ -3451,86 +3533,166 @@ function Z_VARREC(z: pzval): TVarRec;
end;
end;
end;
+{$ifndef WSTR}
+function RawByteString(s: String): TBytes; overload;
+begin
+
+end;
+
+function RawByteString(s: PAnsiChar): TBytes; overload;
+begin
+
+end;
+function Z_RAWSTR(z: pzval): TBytes;
+{$else}
+function Z_RAWSTR(z: pzval): RawByteString;
+{$endif}
+{$ifdef fpc}
+var
+ s_len: SizeInt;
+{$endif}
+begin
+ Result := '';
+ case z^._type of
+ IS_BOOL:
+ begin
+ if z^.value.lval = 1 then
+ Result := RawByteString('True')
+ Else
+ Result := RawByteString('False');
+ end;
+ IS_LONG:
+ Result := RawByteString(IntToStr(z^.value.lval));
+ IS_DOUBLE:
+ Result := RawByteString(FloatToStr(z^.value.dval));
+ IS_STRING:
+ begin
+ SetString(Result, PAnsiChar(z^.value.str.val), z^.value.str.len);
+ SetCodePage(Result, CP_UTF8, not IsUTF8String(Result));
+ end;
+ IS_ARRAY:
+ Result := RawByteString('(array)');
+ IS_OBJECT:
+ Result := RawByteString('[object]');
+ IS_RESOURCE:
+ Result := RawByteString('#resource#id:' + IntToStr(z^.value.lval));
+ end;
+end;
function Z_STRUVAL(z : pzval) : UTF8String;
begin
+ Result := UTf8String(Z_RawStr(z));
+end;
+
+function Z_STRVAL(z : pzval) : WideString;
+begin
+ Result := WideString(Z_RawStr(z));
+end;
+
+function Z_ASTRVAL(z : pzval) : AnsiString;
+begin
+ Result := AnsiString(Z_RawStr(z));
+end;
+
+function Z_SSTRVAL(z : pzval) : String;
+begin
+ Result := String(Z_RawStr(z));
+end;
+
+function Z_CHAR(z: PZval) : zend_uchar;
+var S: zend_ustr;
+begin
+Result := #0;
if z = nil then
- begin
- Result := '';
exit;
- end;
- if z._type = IS_STRING then
- begin
- SetLength(Result, z.value.str.len);
- Move(z.value.str.val^, Result[1], z.value.str.len);
- end else
- case z._type of
- IS_LONG: Result := IntToStr(z.value.lval);
- IS_DOUBLE: Result := FloatToStr(z.value.dval);
- IS_BOOL: if z.value.lval = 0 then Result := '' else Result := '1';
- else
- Result := '';
+ if {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} = IS_STRING then
+ S := z.value.str.val
+ else
+ case {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} of
+ IS_LONG: S := IntToStr(z.value.lval);
+ IS_DOUBLE: S := FloatToStr(z.value.dval);
+ IS_BOOL: if z.value.lval = 0 then S := '0' else S := '1';
end;
+ SetLength(S,1);
+ Result := zend_uchar(S[1]);
end;
-
-function Z_STRVAL(z : pzval) : zend_ustr;
+function Z_ACHAR(z: PZVAL): AnsiChar;
+var S: AnsiString;
begin
+Result := #0;
if z = nil then
- begin
- Result := '';
exit;
- end;
- if z._type = IS_STRING then
- begin
- SetLength(Result, z.value.str.len);
- Move(z.value.str.val^, Result[1], z.value.str.len);
- end else
- case z._type of
- IS_LONG: Result := IntToStr(z.value.lval);
- IS_DOUBLE: Result := FloatToStr(z.value.dval);
- IS_BOOL: if z.value.lval = 0 then Result := '' else Result := '1';
- else
- Result := '';
+ if {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} = IS_STRING then
+ S := z.value.str.val
+ else
+ case {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} of
+ IS_LONG: S := IntToStr(z.value.lval);
+ IS_DOUBLE: S := FloatToStr(z.value.dval);
+ IS_BOOL: if z.value.lval = 0 then S := '0' else S := '1';
end;
+ SetLength(S,1);
+ Result := AnsiChar(S[1]);
end;
-function Z_STRWVAL(z : pzval) : String;
+function Z_WCHAR(z: PZVAL): WideChar;
+var S: WideString;
begin
+Result := #0;
if z = nil then
- begin
- Result := '';
exit;
- end;
- if z._type = IS_STRING then
- begin
- SetLength(Result, z.value.str.len);
- Move(z.value.str.val^, Result[1], z.value.str.len);
- end else
- case z._type of
- IS_LONG: Result := IntToStr(z.value.lval);
- IS_DOUBLE: Result := FloatToStr(z.value.dval);
- IS_BOOL: if z.value.lval = 0 then Result := '' else Result := '1';
- else
- Result := '';
+ if {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} = IS_STRING then
+ S := z.value.str.val
+ else
+ case {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} of
+ IS_LONG: S := IntToStr(z.value.lval);
+ IS_DOUBLE: S := FloatToStr(z.value.dval);
+ IS_BOOL: if z.value.lval = 0 then S := '0' else S := '1';
+ end;
+ SetLength(S,1);
+ Result := WideChar(S[1]);
+end;
+{$ifdef WSTR}
+function Z_UCHAR(z: PZVAL): UTF8Char;
+var S: UTF8String;
+begin
+Result := #0;
+ if z = nil then
+ exit;
+
+ if {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} = IS_STRING then
+ S := z.value.str.val
+ else
+ case {$IFDEF PHP7}z.u1.v._type{$ELSE}z._type{$ENDIF} of
+ IS_LONG: S := IntToStr(z.value.lval);
+ IS_DOUBLE: S := FloatToStr(z.value.dval);
+ IS_BOOL: if z.value.lval = 0 then S := '0' else S := '1';
end;
+ SetLength(S,1);
+ Result := Utf8Char(S[1]);
+end;
+{$else}
+function Z_UCHAR(z: PZVAL): AnsiChar;
+begin
+ Result := Z_ACHAR(z);
end;
+{$endif}
function Z_STRLEN(z : pzval) : longint;
begin
Result := Length(Z_STRVAL(z));
end;
-function Z_ARRVAL(z : pzval ) : PHashTable;
+function Z_ARRVAL(z : pzval ) : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF};
begin
- Result := z.value.ht;
+ Result := {$IFDEF PHP7} z.value.arr {$ELSE}z.value.ht{$ENDIF};
end;
-function Z_OBJ_HANDLE(z :pzval) : zend_object_handle;
+function Z_OBJ_HANDLE(z :pzval) : {$IFDEF PHP7} P_zend_object_handlers {$ELSE} zend_object_handle{$ENDIF};
begin
- Result := z.value.obj.handle;
+ Result := {$IFDEF PHP7}z.value.obj.handlers{$ELSE}z.value.obj.handle{$ENDIF};
end;
function Z_OBJ_HT(z : pzval) : pzend_object_handlers;
@@ -3538,13 +3700,18 @@ function Z_OBJ_HT(z : pzval) : pzend_object_handlers;
Result := z.value.obj.handlers;
end;
-function Z_OBJPROP(z : pzval) : PHashtable;
-var
- TSRMLS_DC : pointer;
+function Z_OBJPROP(z : pzval;TSRMLS_DC:pointer=nil) : {$IFDEF PHP7} PZend_Array {$ELSE} PHashTable {$ENDIF};
+{$IFDEF PHP7}
+begin
+ Result := Z_OBJ_HT(z)^.get_properties(z);
+end;
+{$ELSE}
begin
+ if TSRMLS_DC = nil then
TSRMLS_DC := ts_resource_ex(0, nil);
Result := Z_OBJ_HT(z)^.get_properties(@z, TSRMLS_DC);
end;
+{$ENDIF}
{$ENDIF}
@@ -3552,7 +3719,7 @@ function Z_OBJPROP(z : pzval) : PHashtable;
{$IFDEF PHP5}
procedure _zval_copy_ctor (val: pzval; __zend_filename: zend_pchar; __zend_lineno: uint);
begin
- if val^._type <= IS_BOOL then
+ if {$IFDEF PHP7}val^.u1.v._type{$ELSE}val^._type{$ENDIF} <= IS_BOOL then
Exit
else
_zval_copy_ctor_func(val, __zend_filename, __zend_lineno);
@@ -3560,28 +3727,38 @@ procedure _zval_copy_ctor (val: pzval; __zend_filename: zend_pchar; __zend_line
procedure _zval_dtor(val: pzval; __zend_filename: zend_pchar; __zend_lineno: uint);
begin
- if val^._type <= IS_BOOL then
+ if {$IFDEF PHP7}val^.u1.v._type{$ELSE}val^._type{$ENDIF} <= IS_BOOL then
Exit
else
_zval_dtor_func(val, __zend_filename, __zend_lineno);
end;
-function zend_hash_init (ht : PHashTable; nSize : uint; pHashFunction : pointer; pDestructor : pointer; persistent: zend_bool) : integer;
+function zend_hash_init (ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; nSize : uint; pHashFunction : pointer; pDestructor : pointer; persistent: zend_bool) : integer;
begin
Result := _zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent, nil, 0);
end;
-function zend_hash_add_or_update(ht : PHashTable; arKey : zend_pchar;
- nKeyLength : uint; pData : pointer; nDataSize : uint; pDes : pointer;
+function zend_hash_add_or_update(ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; arKey : zend_pchar;
+ nKeyLength : uint; pData : {$IFDEF PHP7}pzval{$ELSE}pointer{$ENDIF}; nDataSize : uint; pDes : pointer;
flag : integer) : integer;
+{$IFDEF PHP7}
+var pz: zend_pchar;
+{$ENDIF}
begin
+ {$IFDEF PHP7}
+ pz^.len := strlen(arKey);
+ pz^.val := estrdup(arKey);
+ if Assigned(_zend_hash_add_or_update) then
+ Result := _zend_hash_add_or_update(ht, pz, pData, flag, '', 0).u2.fe_iter_idx
+ {$ELSE}
if Assigned(_zend_hash_add_or_update) then
Result := _zend_hash_add_or_update(ht, arKey, nKeyLength, pData, nDataSize, pDes, flag, nil, 0)
+ {$ENDIF}
else
Result := FAILURE;
end;
-function zend_hash_init_ex (ht : PHashTable; nSize : uint; pHashFunction : pointer;
+function zend_hash_init_ex (ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; nSize : uint; pHashFunction : pointer;
pDestructor : pointer; persistent : zend_bool; bApplyProtection : zend_bool): integer;
begin
Result := _zend_hash_init_ex(ht, nSize, pHashFunction, pDestructor, persistent, bApplyProtection, nil, 0);
@@ -3589,7 +3766,7 @@ function zend_hash_init_ex (ht : PHashTable; nSize : uint; pHashFunction : poin
{$ENDIF}
-{$IFNDEF PHP_UNICE}
+{$IFNDEF PHP_UNICODE}
function AnsiFormat(const Format: AnsiString; const Args: array of const): AnsiString;
begin
Result := Sysutils.Format(Format, Args);
@@ -3611,13 +3788,13 @@ function DupStr(strSource : zend_pchar) : zend_pchar; cdecl;
end;
{$ENDIF}
-initialization
{$IFDEF PHP4DELPHI_AUTOLOAD}
+initialization
LoadZEND;
{$ENDIF}
-finalization
{$IFDEF PHP4DELPHI_AUTOUNLOAD}
+finalization
UnloadZEND;
{$ENDIF}
diff --git a/Source/ZendTypes.pas b/Source/ZendTypes.pas
index 9c2b874..d0d768b 100644
--- a/Source/ZendTypes.pas
+++ b/Source/ZendTypes.pas
@@ -7,7 +7,7 @@
{ serge_perevoznyk@hotmail.com }
{ http://users.telenet.be/ws36637 }
{*******************************************************}
-{$I 'PHP.inc'}
+{$I PHP.INC}
{ $Id: ZendTypes.pas,v 7.4 10/2009 delphi32 Exp $ }
@@ -16,7 +16,7 @@
interface
uses
- Windows, SysUtils;
+ {$IFNDEF FPC} Windows {$ELSE} LCLType{$ENDIF}, SysUtils;
const
//zend.h
@@ -35,43 +35,23 @@ interface
const ZEND_BUILD_DEBUG = '';
{$ENDIF}
-{$IFDEF PHP_COMPILER_ID}
-{$IFDEF COMPILER_VC9}
const ZEND_BUILD_SYSTEM =
-{$IFDEF COMPILER_VC14}
-',VC14'
-{$ELSE}
- {$IFDEF COMPILER_VC13}
- ',VC13'
- {$ELSE}
- {$IFDEF COMPILER_VC12}
- ',VC12'
- {$ELSE}
- {$IFDEF COMPILER_VC11}
- ',VC11'
- {$ELSE}
- {$IFDEF COMPILER_VC11}
- ',VC10'
- {$ELSE}
- ',VC9'
- {$ENDIF}
- {$ENDIF}
- {$ENDIF}
- {$ENDIF}
-{$ENDIF};
-{$ELSE}
-{$IFDEF COMPILER_VC6}
-const ZEND_BUILD_SYSTEM = ',VC6';
-{$ELSE}
-const ZEND_BUILD_SYSTEM = ', $DEFINE COMPILER_VCx directive error. See PHP.INC for more details';
-{$ENDIF}
-{$ENDIF}
-{$ENDIF}
-
+{$IFDEF PHP_COMPILER_ID}
+{$if defined(COMPILER_VC14)}',VC14'
+{$elseif COMPILER_VC13} ',VC13'
+{$elseif COMPILER_VC12} ',VC12'
+{$elseif COMPILER_VC11} ',VC11'
+{$elseif COMPILER_VC10} ',VC10'
+{$elseif COMPILER_VC9} ',VC9'
+{$elseif COMPILER_VC6} ',VC6'
+{$else}', $DEFINE COMPILER_VCx directive error. See PHP.INC for more details'
+{$ifend}
+{$else}
+', $DEFINE COMPILER_VCx directive error. See PHP.INC for more details'
+{$endif};
{$ENDIF}
-
//zend_vm_opcodes.h
const
ZEND_NOP = 0;
@@ -340,47 +320,36 @@ interface
//zend_modules.h
const
-{$IFDEF PHP7}
- ZEND_MODULE_API_NO = 20151012;
-{$ELSE}
- {$IFDEF PHP530}
- ZEND_MODULE_API_NO =
- {$IFDEF PHP560}
- 20131226
- {$ELSE}
- {$IFDEF PHP550}20121212{$ELSE}{$IFDEF PHP540}20100525{$ELSE}20090626{$ENDIF}{$ENDIF}
- {$ENDIF};
- {$ELSE}
- {$IFDEF PHP520}
- ZEND_MODULE_API_NO = 20060613;
- {$ELSE}
- {$IFDEF PHP512}
- ZEND_MODULE_API_NO = 20050922;
- {$ELSE}
- {$IFDEF PHP511}
- ZEND_MODULE_API_NO = 20050922;
- {$ELSE}
- {$IFDEF PHP510}
- ZEND_MODULE_API_NO = 20050617;
- {$ELSE}
- {$IFDEF PHP504}
- ZEND_MODULE_API_NO = 20041030;
- {$ELSE}
- ZEND_MODULE_API_NO = 20040412;
- {$ENDIF}
- {$ENDIF}
- {$ENDIF}
- {$ENDIF}
- {$ENDIF}
-{$ENDIF}
-{$ENDIF}
-{$IFDEF ZTS}
-const
- USING_ZTS = 1;
-{$ELSE}
+ ZEND_MODULE_API_NO_700 = 20151012;
+ ZEND_MODULE_API_NO_560 = 20131226;
+ ZEND_MODULE_API_NO_550 = 20121212;
+ ZEND_MODULE_API_NO_540 = 20100525;
+ ZEND_MODULE_API_NO_530 = 20090626;
+ ZEND_MODULE_API_NO_520 = 20060613;
+ ZEND_MODULE_API_NO_511 = 20050922;
+ ZEND_MODULE_API_NO_510 = 20050617;
+ ZEND_MODULE_API_NO_504 = 20041030;
+ ZEND_MODULE_API_NO_500 = 20040412;
+
+ ZEND_MODULE_API_NO =
+ {$ifdef PHP700}20151012
+ {$elseif defined(PHP560)}20131226
+ {$elseif defined(PHP550)}20121212
+ {$elseif defined(PHP540)}20100525
+ {$elseif defined(PHP530)}20090626
+ {$elseif defined(PHP520)}20060613
+ {$elseif defined(PHP512)}20050922
+ {$elseif defined(PHP511)}20050922
+ {$elseif defined(PHP510)}20050617
+ {$elseif defined(PHP504)}20041030
+ {$else}20040412
+ {$ifend};
+
const
- USING_ZTS = 0;
-{$ENDIF}
+ USING_ZTS =
+ {$ifdef ZTS}1
+ {$else}0
+ {$endif};
const
@@ -478,14 +447,33 @@ interface
{ Common Types }
type
- zend_uint = uint;
+ CharPtr =
+ {$IFDEF VERSION12}
+ WideChar
+ {$ELSE}
+ AnsiChar
+ {$ENDIF};
+ {$IFDEF CPUX64}
+ IntPtr = Int64;
+ UIntPtr = UInt64;
+ ULongPtr = ULong64;
+ {$ELSE}
+ IntPtr = Longint;
+ UIntPtr = LongWord;
+ ULongPtr = ULong;
+ {$ENDIF}
+ {$if defined(WSTR) and (CompilerVersion < 22) }
+ UTF8Char = AnsiChar;
+ PUTF8Char = PAnsiChar;
+ {$ifend}
+ zend_uint = UIntPtr;
zend_bool = boolean;
- zend_uchar = {$IFDEF PHP_UNICE}Utf8Char{$ELSE}AnsiChar{$ENDIF};
- zend_ustr = {$IFDEF PHP_UNICE}Utf8String{$ELSE}AnsiString{$ENDIF};
- zend_ulong = ulong;
- zend_long = integer;
- zend_pchar = {$IFDEF PHP_UNICE}PUtf8Char{$ELSE}PAnsiChar{$ENDIF};
- zend_pstr = {$IFDEF PHP_UNICE}PUtf8String{$ELSE}PAnsiString{$ENDIF};
+ zend_uchar = {$IFDEF PHP_UNICODE}UTF8Char{$ELSE}AnsiChar{$ENDIF};
+ zend_ustr = {$IFDEF PHP_UNICODE}UTF8String{$ELSE}AnsiString{$ENDIF};
+ zend_ulong = ULongPtr;
+ zend_long = IntPtr;
+ zend_pchar = {$IFDEF PHP_UNICODE}PUTF8Char{$ELSE}PAnsiChar{$ENDIF};
+ zend_pstr = {$IFDEF PHP_UNICODE}PUtf8String{$ELSE}PAnsiString{$ENDIF};
{$IFDEF PHP7}
_zend_refcounted_h = record
refcount : cardinal;
@@ -504,28 +492,31 @@ _zend_refcounted = record
gc : zend_refcounted_h;
end;
zend_refcounted = _zend_refcounted;
- zend_string = record
+ _zend_string = record
gc : zend_refcounted_h;
h : zend_ulong;
len : size_t;
val : zend_pchar;
end;
+
+ P_zend_refcounted = ^_zend_refcounted;
+ zend_string = _zend_string;
+ P_zend_string = ^_zend_string;
+ pzend_string = ^_zend_string;
+ {$ELSE}
+ pzend_string = zend_pchar;
{$ENDIF}
zend_ushort = word;
unsigned_char = byte;
{ Common Types }
-type
- pzend_string = {$IFDEF PHP_UNICE}PUTF8Char{$ELSE}PAnsiChar{$ENDIF};
-
type
uint = longword;
PINT = ^Integer;
size_t = cardinal;
- {$IFNDEF PHP700}
+ {$IFNDEF PHP7}
ppointer = ^pointer;
pppointer = ^ppointer;
{$ENDIF}
-
PStat = ^TStat;
TStat = record
st_dev: Word;
@@ -574,7 +565,7 @@ TBucket = record
pLast: PBucket;
arKey: array[0..0] of zend_uchar;
end;
-
+ {$IFNDEF PHP7}
PHashTable = ^THashTable;
THashTable =
record
@@ -591,10 +582,10 @@ TBucket = record
nApplyCount: Byte;
bApplyProtection: boolean;
end;
+ {$ENDIF}
+ HashPosition = {$IFDEF PHP7} cardinal {$ELSE} PBucket {$ENDIF};
- HashPosition = PBucket;
-
-
+ {$IFNDEF PHP7}
{$IFDEF PHP5}
zend_op_array =
@@ -707,13 +698,12 @@ zend_object_iterator_funcs = record
move_forward : pointer;
rewind : pointer;
end;
-
zend_object_iterator = record
data : pointer;
funcs : PZendObjectIteratorFuncs;
index : ulong;
end;
-
+ {$ENDIF}
zend_class_iterator_funcs = record
funcs : pointer;
new_iterator : pointer;
@@ -793,27 +783,12 @@ zend_function = record
end;
{$ENDIF}
-
+ {$IFNDEF PHP7}
Pzend_class_entry = ^Tzend_class_entry;
PPZend_class_entry = ^PZend_class_entry;
- {$IFDEF PHP4}
- Tzend_class_entry =
- record
- _type: zend_uchar;
- name: zend_pchar;
- name_length: uint;
- parent: pointer;
- refcount: pointer;
- constants_updated: boolean;
- function_table: THashTable;
- default_properties: THashTable;
- builtin_functions: pointer;
- handle_function_call: pointer;
- handle_property_get: pointer;
- handle_property_set: pointer;
- end;
- {$ELSE}
+ {$ENDIF}
+ {$IFNDEF PHP7}
Tzend_class_entry = record
_type : zend_uchar;
name : zend_pchar;
@@ -823,45 +798,49 @@ Tzend_class_entry = record
constants_updated : zend_bool;
ce_flags : zend_uint;
- function_table : THashTable;
- default_properties : THashTable;
- properties_info : THashTable;
- default_static_members : THashTable;
+ function_table : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF};
+ default_properties : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF};
+ properties_info : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF};
+ default_static_members : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF};
static_members : PHashTable;
- constants_table : THashTable;
+ constants_table : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF};
builtin_functions : pointer;
- _constructor : PZendFunction;
- _destructor : PZendFunction;
- clone : PZendFunction;
- __get : PZendFunction;
- __set : PZendFunction;
- //{$IFDEF PHP510}
- __unset : PZendFunction;
- __isset : PZendFunction;
- //{$ENDIF}
- __call: PZendFunction;
- //{$IFDEF PHP530}
- __callstatic : PZendFunction;
- //{$ENDIF}
- //{$IFDEF PHP520}
- __tostring : pointer;
- //{$ENDIF}
- //{$IFDEF PHP510}
- serialize_func : PZendFunction;
- unserialize_func : PZendFunction;
- // {$ENDIF}
+ _constructor : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ _destructor : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ clone : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ __get : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ __set : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ {$IFDEF PHP510}
+ __unset : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ __isset : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ {$ENDIF}
+ __call: {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ {$IFDEF PHP530}
+ __callstatic : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ {$ENDIF}
+ {$IFDEF PHP520}
+ __tostring : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ {$ENDIF}
+ {$IFDEF PHP510}
+ serialize_func : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ unserialize_func : {$IFDEF PHP7}P_zend_function{$ELSE}PZendFunction{$ENDIF};
+ {$ENDIF}
iterator_funcs : zend_class_iterator_funcs;
create_object : pointer;
get_iterator : pointer;
interface_gets_implemented : pointer;
+ {$IFDEF PHP530}
get_static_method : pointer;
+ {$ENDIF}
+ {$IFDEF PHP511}
serialize : pointer;
unserialize : pointer;
+ {$ENDIF}
interfaces : pointer;
num_interfaces : zend_uint;
@@ -872,10 +851,14 @@ Tzend_class_entry = record
doc_comment : zend_pchar;
doc_comment_len : zend_uint;
+ {$IFDEF PHP511}
module : pointer;
+ {$ENDIF}
end;
{$ENDIF}
+ {$IFNDEF PHP7}
+ //P_zend_object_handlers = ^_zend_object_handlers;
Pzend_Object = ^Tzend_object;
PPzend_Object = ^PZend_Object;
_zend_object = record
@@ -894,18 +877,19 @@ _zend_object = record
{$ENDIF}
end;
Tzend_Object = _zend_object;
-
{$IFDEF PHP5}
+ {$ENDIF}
type
- Tzend_object_get_properties = function (_object : pointer; TSRMLS_DC : pointer) : PHashtable; cdecl;
+ Tzend_object_get_properties = function (_object : pointer; TSRMLS_DC : pointer) :{$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF}; cdecl;
Pzend_object_get_propeeries = ^Tzend_object_get_properties;
Tzend_object_get_classname = function(_object : pointer; class_name : pointer; class_name_len : pointer; p : integer; TSRMLS_DC : pointer) : integer; cdecl;
- zend_object_handlers = record
+ {$IFNDEF PHP7}
+ _zend_object_handlers = record
// general object functions
add_ref : pointer;
del_ref : pointer;
@@ -936,40 +920,24 @@ zend_object_handlers = record
get_closure : pointer;
{$ENDIF}
end;
- pzend_object_handlers = ^zend_object_handlers;
+ {$ENDIF}
+ zend_object_handle = cardinal;
+ {$IFNDEF PHP7}
+ zend_object_handlers = _zend_object_handlers;
+ pzend_object_handlers = ^_zend_object_handlers;
+
- zend_object_handle = cardinal;
_zend_object_value = record
handle : zend_object_handle;
handlers : pzend_object_handlers;
end;
TZendObjectValue = _zend_object_value;
PZendObjectValue = ^TZendObjectValue;
+ {$ENDIF}
{$ENDIF}
- Pzvalue_value = ^zvalue_value;
- {$IFDEF PHP7}
- zvalue_value = Packed record
- case longint of
- 0 : ( lval : zend_long );
- 1 : ( dval : double );
- 2 : ( counted : P_zend_refcounted );
- 3 : ( str : Pzend_string );
- 4 : ( arr : Pzend_array );
- 5 : ( obj : Pzend_object );
- 6 : ( res : Pzend_resource );
- 7 : ( ref : P_zend_reference );
- 8 : ( ast : P_zend_ast_ref );
- 9 : ( zv : Pzval );
- 10 : ( ptr : pointer );
- 11 : ( ce : P_zend_class_entry );
- 12 : ( func : P_zend_function );
- 13 : ( ww : Packed record
- w1 : cardinal;
- w2 : cardinal;
- end );
- end;
- {$ELSE}
+{$IFNDEF PHP7}
+Pzvalue_value = ^zvalue_value;
zvalue_value = record
case longint of
0: (lval: zend_long);
@@ -979,67 +947,25 @@ zvalue_value = record
len: integer;
end);
3: (ht: PHashTable);
- {$IFDEF PHP4}
- 4: (obj: Tzend_Object);
- {$ELSE}
4 : (obj : _zend_object_value);
- {$ENDIF}
end;
- {$ENDIF}
- {$IFNDEF PHP700}
pppzval = ^ppzval;
ppzval = ^pzval;
- {$ENDIF}
- {$IFDEF PHP4}
- Pzval = ^zval;
- zval = record
- value: zvalue_value;
- _type: Byte;
- is_ref: Byte;
- refcount: Smallint;
- end;
- Tzval = zval;
- {$ELSE}
pzval = ^zval;
- {$IFDEF PHP7}
- _zval_struct = Packed record
- value : zend_value;
- u1 : Packed record
- case longint of
- 0 : ( v : record
- _type : zend_uchar;
- type_flags : zend_uchar;
- const_flags : zend_uchar;
- reserved : zend_uchar;
- end );
- 1 : ( type_info : cardinal );
- end;
- u2 : Packed record
- case longint of
- 0 : ( var_flags : LongWord );
- 1 : ( next : cardinal );
- 2 : ( cache_slot : cardinal );
- 3 : ( lineno : cardinal );
- 4 : ( num_args : cardinal );
- 5 : ( fe_pos : cardinal );
- 6 : ( fe_iter_idx : cardinal );
- end;
- end;
- zval = _zval_struct;
- {$ENDIF}
zval = record
value : zvalue_value;
refcount : zend_uint;
_type : byte;
is_ref : byte;
end;
- {$ENDIF}
+
+{$ENDIF}
ppzval_array = ^pzval_array;
- pzval_array = array of {$IFNDEF PHP700} ppzval{$ELSE} pzval{$ENDIF};
- pzval_array_ex = array of pzval;
+ pzval_array = array of ppzval;
+ pzval_array_ex = array of pzval;
type
PZend_rsrc_list_entry = ^zend_rsrc_list_entry;
@@ -1126,32 +1052,29 @@ _zend_stream = record
PZendFileHandle = ^TZendFileHandle;
zend_file_handle =
record
- {$IFDEF PHP530}
+ {$IF Defined(PHP530) or Defined(PHP540) or Defined(PHP550) or Defined(PHP560) or Defined(PHP700)}
_type : zend_stream_type;
{$ELSE}
_type: uchar;
- {$ENDIF}
+ {$IFEND}
filename: zend_pchar;
opened_path: zend_pchar;
handle:
record
case Integer of
- 1:
- (
- fd: Integer;
- );
- 2:
- (
- fp: pointer;
- );
- {$IFDEF PHP5}
- 3 :
- (
- stream : TZendStream;
- );
+ {$IFDEF PHP7}
+ 0:( fd: Integer; );
+ 1:( fp: pointer; );
+ 2 : ( stream : TZendStream; );
+ {$ELSE}
+ 1:( fd: Integer; );
+ 2:( fp: pointer; );
+ {$IFDEF PHP5}
+ 3 : ( stream : TZendStream; );
+ {$ENDIF}
{$ENDIF}
end;
- free_filename: shortint;
+ free_filename: {$IFDEF PHP7}byte{$ELSE}shortint{$ENDIF};
end;
TZendFileHandle = zend_file_handle;
@@ -1213,17 +1136,14 @@ _zend_arg_info = record
PZendArgInfo = ^TZendArgInfo;
{$ENDIF}
+ {$IFNDEF PHP7}
Pzend_function_entry = ^Tzend_function_entry;
zend_function_entry = record
fname: zend_pchar;
handler: pointer;
- {$IFDEF PHP4}
- func_arg_types: Pbyte;
- {$ELSE}
arg_info : PZendArgInfo;
num_args : zend_uint;
flags : zend_uint;
- {$ENDIF}
end;
Tzend_function_entry = zend_function_entry;
TZendFunctionEntry = zend_function_entry;
@@ -1239,7 +1159,9 @@ _zend_function_entry = record
num_args : uint;
flags : uint;
end;
+ {$ENDIF}
Pzend_module_entry = ^Tzend_module_entry;
+ PPzend_module_entry = ^Pzend_module_entry;
p_zend_module_entry = ^_zend_module_entry;
_zend_module_entry = record
size : word;
@@ -1256,10 +1178,14 @@ _zend_module_entry = record
request_shutdown_func : pointer;
info_func : pointer;
version : zend_pchar;
- globals_size : size_t;
- globals_id_ptr : pointer;
- globals_ctor : pointer;
- globals_dtor : pointer;
+
+ {$IFDEF PHP520}
+ globals_size : size_t;
+ globals_id_ptr : pointer;
+ globals_ctor : pointer;
+ globals_dtor : pointer;
+ {$ENDIF}
+
post_deactivate_func : pointer;
module_started : integer;
_type : byte;
@@ -1290,9 +1216,13 @@ Tzend_module_entry = record
{$IFDEF PHP5}
{$IFDEF PHP520}
globals_size : size_t;
+ {$IFDEF PHP540}
+ globals_ptr : pointer;
+ {$ELSE}
globals_id_ptr : pointer;
- globals_ctor : pointer;
- globals_dtor : pointer;
+ {$ENDIF}
+ globals_ctor : procedure (global:pointer);cdecl;
+ globals_dtor : procedure (global:pointer);cdecl;
{$ENDIF}
{$ENDIF}
@@ -1307,7 +1237,7 @@ Tzend_module_entry = record
global_id: integer;
{$ENDIF}
- module_started: integer;
+ module_started: longint;
_type: byte;
handle: pointer;
module_number: longint;
@@ -1445,12 +1375,12 @@ zend_compiler_globals = record
active_op_array : pointer;
- function_table : PHashTable; // function symbol table
- class_table : PHashTable; // class table
+ function_table : {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; // function symbol table
+ class_table : {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF}; // class table
- filenames_table : THashTable;
+ filenames_table : {$IFDEF PHP7} zend_array {$ELSE} THashTable{$ENDIF};
- auto_globals : PHashTable;
+ auto_globals : {$IFDEF PHP7} Pzend_array {$ELSE} PHashTable{$ENDIF};
in_compilation : zend_bool;
short_tags : zend_bool;
@@ -1520,7 +1450,7 @@ type _zend_property_info = record
Pzend_executor_globals = ^zend_executor_globals;
zend_executor_globals = record
- return_value_ptr_ptr : {$IFNDEF PHP700} ppzval{$ELSE} pzval{$ENDIF};
+ return_value_ptr_ptr : {$IFNDEF PHP7} ppzval{$ELSE} pzval{$ENDIF};
uninitialized_zval : zval;
uninitialized_zval_ptr : pzval;
@@ -1537,21 +1467,10 @@ zend_executor_globals = record
symtable_cache_ptr : ^PHashTable;
opline_ptr : pointer;
-
- {$IFDEF PHP4}
- current_execute_data : pointer;
- {$ENDIF}
-
active_symbol_table : PHashTable;
- symbol_table : THashTable; // main symbol table
-
- included_files : THashTable; // files already included */
-
- {$IFDEF PHP4}
- bailout : jump_buf;
- {$ELSE}
+ symbol_table : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF}; // main symbol table
+ included_files : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF}; // files already included */
bailout : p_jump_buf;
- {$ENDIF}
error_reporting : integer;
orig_error_reporting : integer;
@@ -1559,9 +1478,9 @@ zend_executor_globals = record
active_op_array : pointer;
- function_table : PHashTable; // function symbol table */
- class_table : PHashTable; // class table
- zend_constants : PHashTable; // constants table */
+ function_table : {$IFDEF PHP7}Pzval{$ELSE}PHashTable{$ENDIF}; // function symbol table */
+ class_table : {$IFDEF PHP7}Pzval{$ELSE}PHashTable{$ENDIF}; // class table
+ zend_constants : {$IFDEF PHP7}Pzval{$ELSE}PHashTable{$ENDIF}; // constants table */
{$IFDEF PHP5}
scope : pointer;
@@ -1580,10 +1499,6 @@ zend_executor_globals = record
{$ENDIF}
{$ENDIF}
- {$IFDEF PHP4}
- bailout_set : zend_bool;
- {$ENDIF}
-
full_tables_cleanup : zend_bool;
{$IFDEF PHP5}
ze1_compatibility_mode : zend_bool;
@@ -1594,8 +1509,8 @@ zend_executor_globals = record
timed_out : zend_bool;
- regular_list : THashTable;
- persistent_list : ThashTable;
+ regular_list : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF};
+ persistent_list : {$IFDEF PHP7}HashTable{$ELSE}THashTable{$ENDIF};
argument_stack : zend_ptr_stack;
diff --git a/Source/hzend_types.pas b/Source/hzend_types.pas
new file mode 100644
index 0000000..325f3a6
--- /dev/null
+++ b/Source/hzend_types.pas
@@ -0,0 +1,3078 @@
+unit hzend_types;
+
+interface
+
+uses {$IFDEF FPC}Winapi.Windows{$ELSE}Windows{$ENDIF};
+
+var
+ _TestCreate:Pointer;
+
+const
+{#define IS_UNDEF 0
+#define IS_NULL 1
+#define IS_FALSE 2
+#define IS_TRUE 3
+#define IS_LONG 4
+#define IS_DOUBLE 5
+#define IS_STRING 6
+#define IS_ARRAY 7
+#define IS_OBJECT 8
+#define IS_RESOURCE 9
+#define IS_REFERENCE 10}
+
+ E_ERROR = 1 shl 0;
+ E_WARNING = 1 shl 1;
+ E_PARSE = 1 shl 2;
+ E_NOTICE = 1 shl 3;
+ E_CORE_ERROR = 1 shl 4;
+ E_CORE_WARNING = 1 shl 5;
+ E_COMPILE_ERROR = 1 shl 6;
+ E_COMPILE_WARNING = 1 shl 7;
+ E_USER_ERROR = 1 shl 8;
+ E_USER_WARNING = 1 shl 9;
+ E_USER_NOTICE = 1 shl 10;
+ E_STRICT = 1 shl 11;
+ E_RECOVERABLE_ERROR = 1 shl 12;
+ E_DEPRECATED = 1 shl 13;
+ E_USER_DEPRECATED = 1 shl 14;
+ E_ALL = (((((((((((((E_ERROR or E_WARNING) or E_PARSE) or E_NOTICE) or E_CORE_ERROR) or E_CORE_WARNING) or E_COMPILE_ERROR) or E_COMPILE_WARNING) or E_USER_ERROR) or E_USER_WARNING) or E_USER_NOTICE) or E_RECOVERABLE_ERROR) or E_DEPRECATED) or E_USER_DEPRECATED) or E_STRICT;
+ E_CORE = E_CORE_ERROR or E_CORE_WARNING;
+
+
+ ZEND_INI_USER = 1 shl 0;
+ ZEND_INI_PERDIR = 1 shl 1;
+ ZEND_INI_SYSTEM = 1 shl 2;
+ ZEND_INI_ALL = (ZEND_INI_USER or ZEND_INI_PERDIR or ZEND_INI_SYSTEM);
+
+
+ ZEND_INI_DISPLAY_ORIG = 1 ;
+ ZEND_INI_DISPLAY_ACTIVE= 2 ;
+
+ ZEND_INI_STAGE_STARTUP = 1 or 0;
+ ZEND_INI_STAGE_SHUTDOWN = 1 or 1;
+ZEND_INI_STAGE_ACTIVATE = 1 or 2;
+ ZEND_INI_STAGE_DEACTIVATE = 1 or 3;
+ZEND_INI_STAGE_RUNTIME = 1 or 4;
+ZEND_INI_STAGE_HTACCESS = 1 or 5;
+
+
+ IS_UNDEF = 0 ;
+ IS_NULL = 1 ;
+ IS_FALSE = 2 ;
+ IS_TRUE = 3 ;
+ IS_LONG = 4 ;
+ IS_DOUBLE = 5 ;
+ IS_STRING = 6 ;
+ IS_ARRAY = 7 ;
+ IS_OBJECT = 8 ;
+ IS_RESOURCE = 9 ;
+ IS_REFERENCE = 10 ;
+
+
+ IS_CONSTANT = 11 ;
+ IS_CONSTANT_AST = 12 ;
+
+
+ IS_BOOL = 13 ;
+ IS_CALLABLE = 14 ;
+
+ IS_INDIRECT = 15 ;
+ IS_PTR = 17 ;
+ // IS_BOOL = 4;
+
+ IS_TYPE_CONSTANT = (1 SHL 0);
+ IS_TYPE_IMMUTABLE = (1 SHL 1) ;
+ IS_TYPE_REFCOUNTED = (1 SHL 2) ;
+IS_TYPE_COLLECTABLE = (1 SHL 3);
+ IS_TYPE_COPYABLE = (1 SHL 4) ;
+ IS_TYPE_SYMBOLTABLE = (1 SHL 5) ;
+
+Z_TYPE_FLAGS_SHIFT = 8 ;
+Z_CONST_FLAGS_SHIFT = 16;
+
+
+
+
+
+ IS_STRING_EX = IS_STRING or ((IS_TYPE_REFCOUNTED or IS_TYPE_COPYABLE) shl Z_TYPE_FLAGS_SHIFT);
+
+
+
+ SUCCESS = 0;
+ FAILURE = -1;
+
+
+
+ HASH_UPDATE = 1 SHL 0;
+ HASH_ADD = 1 SHL 1;
+ HASH_NEXT_INSERT = 1 SHL 2;
+
+ HASH_DEL_KEY = 0;
+ HASH_DEL_INDEX = 1;
+ HASH_DEL_KEY_QUICK = 2;
+
+ ZEND_AST_SPECIAL_SHIFT = 6;
+ZEND_AST_IS_LIST_SHIFT = 7;
+ZEND_AST_NUM_CHILDREN_SHIFT = 8;
+
+ PHP_API_VERSION = 20151012 ;
+ YYDEBUG = 0 ;
+ PHP_DEFAULT_CHARSET = 'UTF-8';
+
+ MODULE_PERSISTENT = 1;
+ MODULE_TEMPORARY = 2;
+
+ SAPI_HEADER_ADD = 1 shr 0;
+
+ SAPI_HEADER_SENT_SUCCESSFULLY = 1 ;
+SAPI_HEADER_DO_SEND = 2 ;
+ SAPI_HEADER_SEND_FAILED = 3 ;
+
+ SAPI_DEFAULT_MIMETYPE = 'text/html';
+ SAPI_DEFAULT_CHARSET = PHP_DEFAULT_CHARSET;
+ SAPI_PHP_VERSION_HEADER = 'X-Powered-By: PHP/" PHP_VERSION';
+
+ //zend_constants.h
+const
+ CONST_CS = (1 shl 0) { Case Sensitive }
+ ;
+ CONST_PERSISTENT = (1 shl 1) { Persistent }
+ ;
+const
+ ZEND_INTERNAL_FUNCTION = 1;
+ ZEND_USER_FUNCTION = 2;
+ ZEND_OVERLOADED_FUNCTION = 3;
+ ZEND_EVAL_CODE = 4;
+ ZEND_INTERNAL_CLASS = 1;
+ ZEND_USER_CLASS = 2;
+ ZEND_EVAL = (1 shl 0);
+ ZEND_INCLUDE = (1 shl 1);
+ ZEND_INCLUDE_ONCE = (1 shl 2);
+ ZEND_REQUIRE = (1 shl 3);
+ ZEND_REQUIRE_ONCE = (1 shl 4);
+ ZEND_ISSET = (1 shl 0);
+ ZEND_ISEMPTY = (1 shl 1);
+ ZEND_CT = (1 shl 0);
+ ZEND_RT = (1 shl 1);
+type
+ pppointer = ^ppointer;
+
+
+
+
+
+ _zend_ast_kind = (ZEND_AST_ZVAL_ = 1 shl ZEND_AST_SPECIAL_SHIFT,ZEND_AST_ZNODE_,ZEND_AST_FUNC_DECL,
+ ZEND_AST_CLOSURE,ZEND_AST_METHOD,ZEND_AST_CLASS,
+ ZEND_AST_ARG_LIST = 1 shl ZEND_AST_IS_LIST_SHIFT,ZEND_AST_LIST_,ZEND_AST_ARRAY,
+ ZEND_AST_ENCAPS_LIST,ZEND_AST_EXPR_LIST,
+ ZEND_AST_STMT_LIST,ZEND_AST_IF,ZEND_AST_SWITCH_LIST,
+ ZEND_AST_CATCH_LIST,ZEND_AST_PARAM_LIST,
+ ZEND_AST_CLOSURE_USES,ZEND_AST_PROP_DECL,
+ ZEND_AST_CONST_DECL,ZEND_AST_CLASS_CONST_DECL,
+ ZEND_AST_NAME_LIST,ZEND_AST_TRAIT_ADAPTATIONS,
+ ZEND_AST_USE,ZEND_AST_MAGIC_CONST = 0 shl ZEND_AST_NUM_CHILDREN_SHIFT,
+ ZEND_AST_TYPE,ZEND_AST_VAR = 1 shl ZEND_AST_NUM_CHILDREN_SHIFT,ZEND_AST_CONST,
+ ZEND_AST_UNPACK,ZEND_AST_UNARY_PLUS,ZEND_AST_UNARY_MINUS,
+ ZEND_AST_CAST,ZEND_AST_EMPTY,ZEND_AST_ISSET,
+ ZEND_AST_SILENCE,ZEND_AST_SHELL_EXEC,ZEND_AST_CLONE,
+ ZEND_AST_EXIT,ZEND_AST_PRINT,ZEND_AST_INCLUDE_OR_EVAL,
+ ZEND_AST_UNARY_OP,ZEND_AST_PRE_INC,ZEND_AST_PRE_DEC,
+ ZEND_AST_POST_INC,ZEND_AST_POST_DEC,ZEND_AST_YIELD_FROM,
+ ZEND_AST_GLOBAL,ZEND_AST_UNSET,ZEND_AST_RETURN,
+ ZEND_AST_LABEL,ZEND_AST_REF_,ZEND_AST_HALT_COMPILER,
+ ZEND_AST_ECHO,ZEND_AST_THROW,ZEND_AST_GOTO,
+ ZEND_AST_BREAK,ZEND_AST_CONTINUE,ZEND_AST_DIM = 2 shl ZEND_AST_NUM_CHILDREN_SHIFT,
+ ZEND_AST_PROP,ZEND_AST_STATIC_PROP,ZEND_AST_CALL,
+ ZEND_AST_CLASS_CONST,ZEND_AST_ASSIGN,ZEND_AST_ASSIGN_REF,
+ ZEND_AST_ASSIGN_OP,ZEND_AST_BINARY_OP,ZEND_AST_GREATER,
+ ZEND_AST_GREATER_EQUAL,ZEND_AST_AND,ZEND_AST_OR,
+ ZEND_AST_ARRAY_ELEM,ZEND_AST_NEW,ZEND_AST_INSTANCEOF,
+ ZEND_AST_YIELD,ZEND_AST_COALESCE,ZEND_AST_STATIC,
+ ZEND_AST_WHILE,ZEND_AST_DO_WHILE,ZEND_AST_IF_ELEM,
+ ZEND_AST_SWITCH,ZEND_AST_SWITCH_CASE,ZEND_AST_DECLARE,
+ ZEND_AST_CONST_ELEM,ZEND_AST_USE_TRAIT,
+ ZEND_AST_TRAIT_PRECEDENCE,ZEND_AST_METHOD_REFERENCE,
+ ZEND_AST_NAMESPACE,ZEND_AST_USE_ELEM,ZEND_AST_TRAIT_ALIAS,
+ ZEND_AST_GROUP_USE,ZEND_AST_METHOD_CALL = 3 shl ZEND_AST_NUM_CHILDREN_SHIFT,
+ ZEND_AST_STATIC_CALL,ZEND_AST_CONDITIONAL,
+ ZEND_AST_TRY,ZEND_AST_CATCH,ZEND_AST_PARAM,
+ ZEND_AST_PROP_ELEM,ZEND_AST_FOR = 4 shl ZEND_AST_NUM_CHILDREN_SHIFT,ZEND_AST_FOREACH
+ );
+ plongint = ^longint;
+
+ P_zend_objects_store = ^_zend_objects_store;
+ Pzend_objects_store = ^zend_objects_store;
+ uint32_t = CARDINAL;
+
+
+ zend_pchar = {$IFDEF PHP_UNICODE}PUtf8Char{$ELSE}PAnsiChar{$ENDIF};
+ zend_pstr = {$IFDEF PHP_UNICODE}PUtf8String{$ELSE}PAnsiString{$ENDIF};
+
+ //zend_uchar = {$IFDEF PHP_UNICODE}Utf8Char{$ELSE}AnsiChar{$ENDIF};
+ zend_ustr = {$IFDEF PHP_UNICODE}Utf8String{$ELSE}AnsiString{$ENDIF};
+
+
+
+
+
+
+
+
+ P_zend_object = ^_zend_object;
+ PP_zend_object = ^P_zend_object;
+ PPP_zend_object = ^PP_zend_object;
+ Pzend_object = ^_zend_object;
+ PPzend_object = ^P_zend_object;
+ PPPzend_object = ^PP_zend_object;
+
+ P_zend_refcounted = ^_zend_refcounted;
+ P_zend_string = ^_zend_string;
+ PP_zend_string = ^P_zend_string;
+ PPP_zend_string = ^PP_zend_string;
+ Pzend_string = ^_zend_string;
+ PPzend_string = ^P_zend_string;
+ PPPzend_string = ^PP_zend_string;
+
+ Pzend_mm_chunk_alloc_t = ^zend_mm_chunk_alloc_t;
+ P_zend_resource = ^_zend_resource;
+ PP_zend_resource =^P_zend_resource;
+ PPP_zend_resource =^PP_zend_resource;
+ Pzend_resource = ^_zend_resource;
+ PPzend_resource =^P_zend_resource;
+ PPPzend_resource =^PP_zend_resource;
+ P_zend_ast_ref = ^_zend_ast_ref;
+ P_zend_reference = ^_zend_reference;
+ P_zend_array = ^_zend_array;
+ PP_zend_array = ^P_zend_array;
+ PPP_zend_array = ^PP_zend_array;
+ Pzend_array = ^_zend_array;
+ PPzend_array = ^P_zend_array;
+ PPPzend_array = ^PP_zend_array;
+
+ P_zval_struct = ^_zval_struct;
+ P_zend_function = ^_zend_function;
+ PP_zend_function = ^P_zend_function;
+ PPP_zend_function = ^PP_zend_function;
+ Pzend_function = ^_zend_function;
+ PPzend_function = ^P_zend_function;
+ PPPzend_function = ^PP_zend_function;
+ P_zend_value = ^_zend_value;
+ Pzend_ast_kind = ^zend_ast_kind;
+ zend_ast_kind = Word;
+ Pzend_ast_attr = ^zend_ast_attr;
+ zend_ast_attr = Word;
+ Pzend_bool = ^zend_bool;
+ zend_bool = byte;
+ Pzend_uchar = ^zend_uchar;
+ zend_uchar = byte;
+ zend_long = integer;
+ Pzend_long = ^zend_long;
+ PPzend_long = ^Pzend_long;
+ Pzend_stack = ^zend_stack;
+ P_zend_stack = ^_zend_stack;
+
+
+ zend_ulong = FixedUInt;
+ P_zend_ulong = ^zend_ulong;
+ zend_off_t = integer;
+ Pzend_off_t = ^zend_off_t;
+ PPzend_off_t = ^Pzend_off_t;
+ P_zend_mm_huge_list = ^_zend_mm_huge_list;
+
+ P_zend_mm_free_slot = ^_zend_mm_free_slot;
+ P_zend_mm_bin = ^_zend_mm_bin;
+ P_zend_mm_page = ^_zend_mm_page;
+ P_zend_mm_chunk = ^_zend_mm_chunk;
+ P_zend_mm_heap = ^_zend_mm_heap;
+ PP_zend_mm_heap = ^P_zend_mm_heap;
+ PPP_zend_mm_heap = ^PP_zend_mm_heap;
+ Pzend_mm_heap = ^_zend_mm_heap;
+ PPzend_mm_heap = ^P_zend_mm_heap;
+ PPPzend_mm_heap = ^PP_zend_mm_heap;
+ P_zend_mm_debug_info = ^_zend_mm_debug_info;
+
+ Pzend_ini_entry_def = ^zend_ini_entry_def;
+
+ P_zend_ini_entry = ^_zend_ini_entry;
+ P_zend_ini_entry_def = ^_zend_ini_entry_def;
+
+ zend_uint = uint;
+ zend_ushort = ushort;
+ Pzend_value = ^zend_value;
+ Pzend_file_handle = ^zend_file_handle;
+ P_zend_ast = ^_zend_ast;
+ P_zend_ast_list = ^_zend_ast_list;
+ Pzend_ast_list = ^zend_ast_list;
+ Pzend_ast_decl = ^zend_ast_decl;
+ P_zend_ast_zval = ^_zend_ast_zval;
+ Pzend_ast_zval = ^zend_ast_zval;
+ P_zend_ast_decl = ^_zend_ast_decl;
+ PHashTable = Pzend_array;
+ PPHashTable = ^PHashTable;
+ Pzend_intptr_t = ^zend_intptr_t;
+ Pzend_uintptr_t = ^zend_uintptr_t;
+ pzval = ^zval;
+ ppzval = ^pzval;
+ pppzval = ^ppzval;
+ Pzend_utility_values = ^zend_utility_values;
+ Pzend_utility_functions = ^zend_utility_functions;
+ Pzend_trait_alias = ^zend_trait_alias;
+ Pzend_trait_precedence = ^zend_trait_precedence;
+ Pzend_trait_method_reference = ^zend_trait_method_reference;
+ PZEND_RESULT_CODE = ^ZEND_RESULT_CODE;
+ P_zend_serialize_data = ^_zend_serialize_data;
+ P_zend_unserialize_data = ^_zend_unserialize_data;
+ P_zend_trait_method_reference = ^_zend_trait_method_reference;
+ P_zend_trait_precedence = ^_zend_trait_precedence;
+ P_zend_trait_alias = ^_zend_trait_alias;
+ P_zend_class_entry = ^_zend_class_entry;
+ PP_zend_class_entry = ^P_zend_class_entry;
+ PPP_zend_class_entry = ^PP_zend_class_entry;
+ Pzend_class_entry = ^_zend_class_entry;
+ PPzend_class_entry = ^P_zend_class_entry;
+ PPPzend_class_entry = ^PP_zend_class_entry;
+
+ P_zend_utility_functions = ^_zend_utility_functions;
+ P_zend_utility_values = ^_zend_utility_values;
+ Pzend_error_handling_t = ^zend_error_handling_t;
+ Pzend_error_handling = ^zend_error_handling;
+ Pzend_stream_type = ^zend_stream_type;
+
+ P_zend_op = ^_zend_op;
+ P_zend_execute_data = ^_zend_execute_data;
+ PP_zend_execute_data = ^P_zend_execute_data;
+ PPP_zend_execute_data = ^PP_zend_execute_data;
+ Pzend_execute_data = ^_zend_execute_data;
+ PPzend_execute_data = ^P_zend_execute_data;
+ PPPzend_execute_data = ^PP_zend_execute_data;
+ P_zend_function_entry = ^_zend_function_entry;
+ P_zend_fcall_info_cache = ^_zend_fcall_info_cache;
+ Pzend_function_entry = ^zend_function_entry;
+ Pzend_declarables = ^zend_declarables;
+ Pzend_ast_znode = ^zend_ast_znode;
+ Pznode = ^znode;
+ Pznode_op = ^znode_op;
+ Pzend_stream = ^zend_stream;
+ Pzend_mmap = ^zend_mmap;
+ Pzend_fcall_info_cache = ^zend_fcall_info_cache;
+ P_zend_mmap = ^_zend_mmap;
+ P_zend_stream = ^_zend_stream;
+ P_zend_file_handle = ^_zend_file_handle;
+ P_znode_op = ^_znode_op;
+ P_znode = ^_znode;
+ P_zend_ast_znode = ^_zend_ast_znode;
+ P_zend_declarables = ^_zend_declarables;
+ P_zend_oparray_context = ^_zend_oparray_context;
+ Pzend_internal_function_info = ^zend_internal_function_info;
+ Pzend_arg_info = ^zend_arg_info;
+ Pzend_internal_arg_info = ^zend_internal_arg_info;
+ Pzend_property_info = ^zend_property_info;
+ Pzend_try_catch_element = ^zend_try_catch_element;
+ Pzend_label = ^zend_label;
+ Pzend_closure = ^zend_closure;
+ P_zend_closure = ^_zend_closure;
+ P_zend_multibyte_functions = ^_zend_multibyte_functions;
+ Pzend_encoding_internal_encoding_getter = ^zend_encoding_internal_encoding_getter;
+ Pzend_encoding_detector = ^zend_encoding_detector;
+
+ Pzend_brk_cont_element = ^zend_brk_cont_element;
+ Pzend_parser_stack_elem = ^zend_parser_stack_elem;
+ Pzend_file_context = ^zend_file_context;
+ Pzend_oparray_context = ^zend_oparray_context;
+ P_zend_file_context = ^_zend_file_context;
+ P_zend_parser_stack_elem = ^_zend_parser_stack_elem;
+ P_zend_brk_cont_element = ^_zend_brk_cont_element;
+ P_zend_label = ^_zend_label;
+ P_zend_try_catch_element = ^_zend_try_catch_element;
+ P_zend_property_info = ^_zend_property_info;
+ P_zend_internal_arg_info = ^_zend_internal_arg_info;
+ P_zend_arg_info = ^_zend_arg_info;
+ P_zend_internal_function_info = ^_zend_internal_function_info;
+ P_zend_op_array = ^_zend_op_array;
+ PP_zend_op_array = ^P_zend_op_array;
+ PPP_zend_op_array = ^PP_zend_op_array;
+ Pzend_op_array = ^_zend_op_array;
+ PPzend_op_array = ^P_zend_op_array;
+ PPPzend_op_array = ^PP_zend_op_array;
+ PHashTableIterator = ^HashTableIterator;
+ P_zend_object_handlers = ^_zend_object_handlers;
+ PBucket = ^Bucket;
+ Pzend_refcounted_h = ^zend_refcounted_h;
+ Pzend_auto_global = ^zend_auto_global;
+ Pzend_internal_function = ^tzend_internal_function;
+ P_zend_internal_function = ^_zend_internal_function;
+ P_zend_call_kind = ^_zend_call_kind;
+ P_zend_auto_global = ^_zend_auto_global;
+ P_zend_refcounted_h = ^_zend_refcounted_h;
+ P_Bucket = ^_Bucket;
+ PHashPosition = ^HashPosition;
+ P_HashTableIterator = ^_HashTableIterator;
+ Pzend_object_read_property_t = ^zend_object_read_property_t;
+ Pzend_object_read_dimension_t = ^zend_object_read_dimension_t;
+ Pzend_object_get_property_ptr_ptr_t = ^zend_object_get_property_ptr_ptr_t;
+ Pzend_object_get_t = ^zend_object_get_t;
+ Pzend_object_get_properties_t = ^zend_object_get_properties_t;
+ Pzend_object_get_method_t = ^zend_object_get_method_t;
+ Pzend_object_get_constructor_t = ^zend_object_get_constructor_t;
+ Pzend_object_get_debug_info_t = ^zend_object_get_debug_info_t;
+ Pzend_call_kind = ^zend_call_kind;
+ Pzend_object_clone_obj_t = ^zend_object_clone_obj_t;
+ Pzend_object_get_class_name_t = ^zend_object_get_class_name_t;
+ Pzend_object_get_gc_t = ^zend_object_get_gc_t;
+ P_zend_class_iterator_funcs = ^_zend_class_iterator_funcs;
+ P_zend_object_iterator_funcs = ^_zend_object_iterator_funcs;
+ Pzend_object_iterator_funcs = ^zend_object_iterator_funcs;
+ P_zend_arena = ^_zend_arena;
+ Pzend_leak_info = ^zend_leak_info;
+ Pzend_mm_debug_info = ^zend_mm_debug_info;
+ Pzend_mm_handlers = ^zend_mm_handlers;
+ P_zend_mm_storage = ^_zend_mm_storage;
+ P_zend_mm_handlers = ^_zend_mm_handlers;
+ P_zend_leak_info = ^_zend_leak_info;
+ P_zend_object_iterator = ^_zend_object_iterator;
+ PP_zend_object_iterator = ^P_zend_object_iterator;
+ PPP_zend_object_iterator = ^PP_zend_object_iterator;
+ Pzend_object_iterator = ^_zend_object_iterator;
+ PPzend_object_iterator = ^P_zend_object_iterator;
+ PPPzend_object_iterator = ^PP_zend_object_iterator;
+ Pzend_class_iterator_funcs = ^zend_class_iterator_funcs;
+ P_zend_module_dep = ^_zend_module_dep;
+ P_zend_module_entry = ^_zend_module_entry;
+ PP_zend_module_entry = ^P_zend_module_entry;
+ PPP_zend_module_entry = ^PP_zend_module_entry;
+ Pzend_module_entry = ^_zend_module_entry;
+ PPzend_module_entry = ^P_zend_module_entry;
+ PPPzend_module_entry = ^PP_zend_module_entry;
+ psmart_str = ^Tsmart_str;
+
+ Psapi_globals_struct = ^sapi_globals_struct;
+ Psapi_header_struct = ^sapi_header_struct;
+ Psapi_headers_struct = ^sapi_headers_struct;
+ Pzend_mm_chunk_free_t = ^zend_mm_chunk_free_t;
+ Pzend_mm_chunk_truncate_t = ^zend_mm_chunk_truncate_t;
+ Pzend_mm_chunk_extend_tt = ^zend_mm_chunk_extend_t;
+ Psapi_request_info = ^sapi_request_info;
+ P_sapi_globals_struct = ^_sapi_globals_struct;
+ Psapi_header_line = ^sapi_header_line;
+ Psapi_header_op_enum = ^sapi_header_op_enum;
+ P_sapi_module_struct = ^_sapi_module_struct;
+ PP_sapi_module_struct = ^P_sapi_module_struct;
+ PPP_sapi_module_struct = ^PP_sapi_module_struct;
+ Psapi_module_struct = ^_sapi_module_struct;
+ PPsapi_module_struct = ^P_sapi_module_struct;
+ PPPsapi_module_struct = ^PP_sapi_module_struct;
+ P_sapi_post_entry = ^_sapi_post_entry;
+ PP_sapi_post_entry = ^P_sapi_post_entry;
+ PPP_sapi_post_entry = ^PP_sapi_post_entry;
+ Psapi_post_entry = ^_sapi_post_entry;
+ PPsapi_post_entry = ^P_sapi_post_entry;
+ PPPsapi_post_entry = ^PP_sapi_post_entry;
+ Pphp_stream_dirent = ^php_stream_dirent;
+ Pphp_stream_ops = ^php_stream_ops;
+ P_php_stream = ^_php_stream;
+ PP_php_stream = ^P_php_stream;
+ PPP_php_stream = ^PP_php_stream;
+ Pphp_stream = ^_php_stream;
+ PPphp_stream = ^P_php_stream;
+ PPPphp_stream = ^PP_php_stream;
+ P_php_stream_wrapper = ^_php_stream_wrapper;
+ PP_php_stream_wrapper = ^P_php_stream_wrapper;
+ PPP_php_stream_wrapper = ^PP_php_stream_wrapper;
+ Pphp_stream_wrapper = ^_php_stream_wrapper;
+ PPphp_stream_wrapper = ^P_php_stream_wrapper;
+ PPPphp_stream_wrapper = ^PP_php_stream_wrapper;
+ P_php_stream_wrapper_ops = ^_php_stream_wrapper_ops;
+ P_php_stream_ops = ^_php_stream_ops;
+ P_php_stream_statbuf = ^_php_stream_statbuf;
+ Pzend_llist = ^zend_llist;
+ Pzend_llist_element = ^zend_llist_element;
+ P_zend_llist_element = ^_zend_llist_element;
+ P_zend_llist = ^_zend_llist;
+ Pzend_llist_position = ^zend_llist_position;
+ Pphp_stream_filter_ops = ^php_stream_filter_ops;
+ Pphp_stream_filter_chain = ^php_stream_filter_chain;
+ Pphp_stream_filter_factory = ^php_stream_filter_factory;
+ P_php_stream_filter_factory = ^_php_stream_filter_factory;
+ P_php_stream_filter = ^_php_stream_filter;
+ PP_php_stream_filter = ^P_php_stream_filter;
+ PPP_php_stream_filter = ^PP_php_stream_filter;
+ Pphp_stream_filter = ^_php_stream_filter;
+ PPphp_stream_filter = ^P_php_stream_filter;
+ PPPphp_stream_filter = ^PP_php_stream_filter;
+ P_php_stream_filter_chain = ^_php_stream_filter_chain;
+ P_php_stream_filter_ops = ^_php_stream_filter_ops;
+ Pphp_stream_filter_status_t = ^php_stream_filter_status_t;
+ P_php_stream_bucket_brigade = ^_php_stream_bucket_brigade;
+ PP_php_stream_bucket_brigade = ^P_php_stream_bucket_brigade;
+ PPP_php_stream_bucket_brigade = ^PP_php_stream_bucket_brigade;
+ Pphp_stream_bucket_brigade = ^_php_stream_bucket_brigade;
+ PPphp_stream_bucket_brigade = ^P_php_stream_bucket_brigade;
+ PPPphp_stream_bucket_brigade = ^PP_php_stream_bucket_brigade;
+ P_php_stream_bucket = ^_php_stream_bucket;
+ PP_php_stream_bucket = ^P_php_stream_bucket;
+ PPP_php_stream_bucket = ^PP_php_stream_bucket;
+ Pphp_stream_bucket = ^_php_stream_bucket;
+ PPphp_stream_bucket = ^P_php_stream_bucket;
+ PPPphp_stream_bucket = ^PP_php_stream_bucket;
+ Puid_t = ^uid_t;
+ uid_t = longint;
+ Pphp_stream_wrapper_ops = ^php_stream_wrapper_ops; zend_encoding = pointer ;
+ Pzend_encoding= ^zend_encoding;
+ PPzend_encoding = ^Pzend_encoding;
+ PPPzend_encoding = ^PPzend_encoding;
+ Pgid_t = ^gid_t;
+ gid_t = longint;
+Pzend_ptr_stack = ^zend_ptr_stack;
+ P_zend_ptr_stack = ^_zend_ptr_stack;
+ Pzend_free_op = ^zend_free_op;
+ zend_free_op = Pzval;
+
+ Pzend_vm_stack = ^_zend_vm_stack;
+ Pzend_ini_parser_param = ^zend_ini_parser_param;
+ P_zend_ini_parser_param = ^_zend_ini_parser_param;
+
+ P_zend_php_scanner_globals = ^_zend_php_scanner_globals;
+ Pzend_php_scanner_event = ^zend_php_scanner_event;
+ zend_php_scanner_event = (ON_TOKEN,ON_FEEDBACK,ON_STOP);
+ P_zend_ini_scanner_globals = ^_zend_ini_scanner_globals;
+ P_zend_executor_globals = ^_zend_executor_globals;
+ P_zend_compiler_globals = ^_zend_compiler_globals;
+
+
+ Pcaddr_t = ^caddr_t;
+ caddr_t = zend_pchar;
+ _zend_fcall_info_cache = record
+ initialized : zend_bool;
+ function_handler : P_zend_function;
+ calling_scope : P_zend_class_entry;
+ called_scope : P_zend_class_entry;
+ _object : P_zend_object;
+ end;
+ zend_fcall_info_cache = _zend_fcall_info_cache;
+ Pphp_stream_statbuf = ^php_stream_statbuf;
+ P_php_stream_notifier = ^_php_stream_notifier;
+ P_php_stream_context = ^_php_stream_context;
+ PP_php_stream_context = ^P_php_stream_context;
+ PPP_php_stream_context = ^PP_php_stream_context;
+ Pphp_stream_context = ^_php_stream_context;
+ PPphp_stream_context = ^P_php_stream_context;
+ PPPphp_stream_context = ^PP_php_stream_context;
+
+ P_php_stream_dirent = ^_php_stream_dirent;
+
+ PP_zend_llist_element = ^P_zend_llist_element;
+ PPP_zend_llist_element = ^PP_zend_llist_element;
+
+ zend_stat_t = pointer;
+ P_zend_stat_t =^zend_stat_t;
+ PP_zend_stat_t = ^P_zend_stat_t;
+ PPP_zend_stat_t = ^PP_zend_stat_t;
+ _zend_value = Packed record
+ case longint of
+ 0 : ( lval : zend_long );
+ 1 : ( dval : double );
+ 2 : ( counted : P_zend_refcounted );
+ 3 : ( str : Pzend_string );
+ 4 : ( arr : Pzend_array );
+ 5 : ( obj : Pzend_object );
+ 6 : ( res : Pzend_resource );
+ 7 : ( ref : P_zend_reference );
+ 8 : ( ast : P_zend_ast_ref );
+ 9 : ( zv : Pzval );
+ 10 : ( ptr : pointer );
+ 11 : ( ce : P_zend_class_entry );
+ 12 : ( func : P_zend_function );
+ 13 : ( ww : Packed record
+ w1 : cardinal;
+ w2 : cardinal;
+ end );
+ end;
+ zend_value = _zend_value;
+
+ _zval_struct = Packed record
+ value : zend_value;
+ u1 : Packed record
+ case longint of
+ 0 : ( v : record
+ _type : zend_uchar;
+ type_flags : zend_uchar;
+ const_flags : zend_uchar;
+ reserved : zend_uchar;
+ end );
+ 1 : ( type_info : cardinal );
+ end;
+ u2 : Packed record
+ case longint of
+ 0 : ( var_flags : LongWord );
+ 1 : ( next : cardinal );
+ 2 : ( cache_slot : cardinal );
+ 3 : ( lineno : cardinal );
+ 4 : ( num_args : cardinal );
+ 5 : ( fe_pos : cardinal );
+ 6 : ( fe_iter_idx : cardinal );
+ end;
+ end;
+ zval = _zval_struct;
+ PZendConstant = ^TZendConstant;
+ zend_constant = record
+ value: zval;
+ flags: Integer;
+ name: zend_pchar;
+ name_len: uint;
+ module_number: Integer;
+ end;
+ TZendConstant = zend_constant;
+ Pzend_syntax_highlighter_ini = ^Tzend_syntax_highlighter_ini;
+ zend_syntax_highlighter_ini =
+ record
+ highlight_html : zend_pchar;
+ highlight_comment : zend_pchar;
+ highlight_default : zend_pchar;
+ highlight_string : zend_pchar;
+ highlight_keyword : zend_pchar;
+ end;
+ PStat = ^TStat;
+ TStat = record
+ st_dev: Word;
+ st_ino: Word;
+ st_mode: Word;
+ st_nlink: SmallInt;
+ st_uid: SmallInt;
+ st_gid: SmallInt;
+ st_rdev: Word;
+ st_size: Longint;
+ st_atime: Longint;
+ st_mtime: Longint;
+ st_ctime: Longint;
+ end;
+ Stat = TStat;
+ Tzend_syntax_highlighter_ini = zend_syntax_highlighter_ini;
+ compare_func_t = function (_para1:pointer; _para2:pointer):longint;cdecl;
+
+ swap_func_t = procedure (_para1:pointer; _para2:pointer);cdecl;
+
+ sort_func_t = procedure (_para1:pointer; _para2:size_t; _para3:size_t; _para4:compare_func_t; _para5:swap_func_t);cdecl;
+
+ dtor_func_t = procedure (pDest:pzval);cdecl;
+
+ copy_ctor_func_t = procedure (pElement:pzval);cdecl;
+
+
+ P_zend_vm_stack = ^_zend_vm_stack;
+
+ _zend_vm_stack = record
+ top : Pzval;
+ _end : Pzval;
+ prev : POINTER;
+ end;
+
+
+ _zend_refcounted_h = record
+ refcount : cardinal;
+ u : record
+ case longint of
+ 0 : ( v : record
+ _type : zend_uchar;
+ flags : zend_uchar;
+ gc_info : word;
+ end );
+ 1 : ( type_info : cardinal );
+ end;
+ end;
+
+
+ zend_refcounted_h = _zend_refcounted_h;
+
+ _zend_refcounted = record
+ gc : zend_refcounted_h;
+ end;
+ zend_refcounted = _zend_refcounted;
+
+
+
+ _zend_string = record
+ gc : zend_refcounted_h;
+ h : zend_ulong;
+ len : size_t;
+ val : zend_pchar;
+ end;
+ zend_string = _zend_string;
+
+ _Bucket = record
+ val : zval;
+ h : zend_ulong;
+ key : P_zend_string;
+ end;
+ Bucket = _Bucket;
+ _zend_ini_entry = record
+ name : P_zend_string;
+ on_modify : pointer;
+ mh_arg1 : pointer;
+ mh_arg2 : pointer;
+ mh_arg3 : pointer;
+ value : P_zend_string;
+ orig_value : P_zend_string;
+ displayer : procedure (ini_entry:p_zend_ini_entry; _type:longint);cdecl;
+ modifiable : longint;
+ orig_modifiable : longint;
+ modified : longint;
+ module_number : longint;
+ end;
+
+ _zend_ini_entry_def = record
+ name : zend_pchar;
+ on_modify : pointer;
+ mh_arg1 : pointer;
+ mh_arg2 : pointer;
+ mh_arg3 : pointer;
+ value : zend_pchar;
+ displayer : procedure (ini_entry:p_zend_ini_entry; _type:longint);cdecl;
+ modifiable : longint;
+ name_length : uint;
+ value_length : uint;
+ end;
+ zend_ini_entry_def = _zend_ini_entry_def;
+zend_ini_parser_cb_t = procedure (arg1:pzval; arg2:pzval; arg3:pzval; callback_type:longint; arg:pointer);cdecl;
+
+
+
+ _zend_array = record
+ gc : zend_refcounted_h;
+ u : record
+ case longint of
+ 0 : ( v : record
+ flags : zend_uchar;
+ nApplyCount : zend_uchar;
+ nIteratorsCount : zend_uchar;
+ reserve : zend_uchar;
+ end );
+ 1 : ( flags : cardinal );
+ end;
+ nTableMask : cardinal;
+ arData : PBucket;
+ nNumUsed : cardinal;
+ nNumOfElements : cardinal;
+ nTableSize : cardinal;
+ nInternalPointer : cardinal;
+ nNextFreeElement : zend_long;
+ pDestructor : dtor_func_t;
+ end;
+ HashTable = _zend_array ;
+ zend_array = _zend_array;
+ pzval_array = pzval;
+ _zend_ast = record
+ kind : zend_ast_kind;
+ attr : zend_ast_attr;
+ lineno : Cardinal;
+ child : array[0..0] of P_zend_ast;
+ end;
+
+ zend_ast = _zend_ast;
+ pzend_ast = ^zend_ast;
+ ppzend_ast = ^pzend_ast;
+ pppzend_ast = ^ppzend_ast;
+
+ _zend_ast_list = record
+ kind : zend_ast_kind;
+ attr : zend_ast_attr;
+ lineno : Cardinal;
+ children : Cardinal;
+ child : array[0..0] of P_zend_ast;
+ end;
+ zend_ast_list = _zend_ast_list;
+
+
+
+
+ P_zend_fcall_info = ^_zend_fcall_info;
+ _zend_fcall_info = record
+ size : size_t;
+ function_table : PHashTable;
+ function_name : zval;
+ symbol_table : P_zend_array;
+ retval : Pzval;
+ params : Pzval;
+ _object : P_zend_object;
+ no_separation : zend_bool;
+ param_count : cardinal;
+ end;
+ zend_fcall_info = _zend_fcall_info;
+ Pzend_fcall_info = ^zend_fcall_info;
+
+
+ _zend_ast_zval = record
+ kind : zend_ast_kind;
+ attr : zend_ast_attr;
+ val : zval;
+ end;
+ zend_ast_zval = _zend_ast_zval;
+
+ _zend_ast_decl = record
+ kind : zend_ast_kind;
+ attr : zend_ast_attr;
+ start_lineno : Cardinal;
+ end_lineno : Cardinal;
+ flags : Cardinal;
+ lex_pos : Pbyte;
+ doc_comment : P_zend_string;
+ name : P_zend_string;
+ child : array[0..3] of P_zend_ast;
+ end;
+ zend_ast_decl = _zend_ast_decl;
+
+ zend_ast_process_t = procedure (ast:pzend_ast);cdecl;
+
+
+ zend_ast_apply_func = procedure (ast_ptr:pPzend_ast);cdecl;
+
+
+
+
+
+ {$IFDEF _WIN64}
+ IntPtr = Int64;
+ UIntPtr = UInt64;
+ {$ELSE}
+ IntPtr = Longint;
+ UIntPtr = LongWord;
+ {$ENDIF}
+
+
+
+ uintptr_t = Cardinal;
+
+
+ ZEND_RESULT_CODE = (SUCCESS_ = 0,FAILURE_ = -(1));
+
+ zend_intptr_t = intptr;
+
+ zend_uintptr_t = uintptr_t;
+ //zend_object_handlers = _zend_object_handlers;
+
+
+ // Pzend_function = ^zend_function;
+
+
+ Pzend_mm_page_info = ^zend_mm_page_info;
+ zend_mm_page_info = uint32_t;
+
+
+ Pzend_mm_bitset = ^zend_mm_bitset;
+ zend_mm_bitset = zend_ulong;
+
+
+
+
+
+
+
+
+ _zend_serialize_data = record end;
+
+ _zend_unserialize_data = record end;
+
+ zend_serialize_data = _zend_serialize_data;
+ zend_unserialize_data = _zend_unserialize_data;
+
+ _zend_trait_method_reference = record
+ method_name : P_zend_string;
+ ce : P_zend_class_entry;
+ class_name : P_zend_string;
+ end;
+ zend_trait_method_reference = _zend_trait_method_reference;
+
+
+ hgerhrh343erg = record
+ case longint of
+ 0 : ( ce : P_zend_class_entry );
+ 1 : ( class_name : P_zend_string );
+ end;
+ _zend_trait_precedence = record
+ trait_method : Pzend_trait_method_reference;
+ exclude_from_classes : ^hgerhrh343erg;
+ end;
+ zend_trait_precedence = _zend_trait_precedence;
+
+ _zend_trait_alias = record
+ trait_method : Pzend_trait_method_reference;
+ alias : P_zend_string;
+ modifiers : Cardinal;
+ end;
+ zend_trait_alias = _zend_trait_alias;
+
+ _zend_class_iterator_funcs = record
+ funcs : Pzend_object_iterator_funcs;
+ zf_new_iterator : P_zend_function;
+ zf_valid : P_zend_function;
+ zf_current : P_zend_function;
+ zf_key : P_zend_function;
+ zf_next : P_zend_function;
+ zf_rewind : P_zend_function;
+ end;
+ zend_class_iterator_funcs = _zend_class_iterator_funcs;
+
+ _zend_class_entry = record
+ _type : char;
+ name : P_zend_string;
+ parent : P_zend_class_entry;
+ refcount : longint;
+ ce_flags : Cardinal;
+ default_properties_count : longint;
+ default_static_members_count : longint;
+ default_properties_table : Pzval;
+ default_static_members_table : Pzval;
+ static_members_table : Pzval;
+ function_table : HashTable;
+ properties_info : HashTable;
+ constants_table : HashTable;
+ _constructor : P_zend_function;
+ _destructor : P_zend_function;
+ clone : P_zend_function;
+ __get : P_zend_function;
+ __set : P_zend_function;
+ __unset : P_zend_function;
+ __isset : P_zend_function;
+ __call : P_zend_function;
+ __callstatic : P_zend_function;
+ __tostring : P_zend_function;
+ __debugInfo : P_zend_function;
+ serialize_func : P_zend_function;
+ unserialize_func : P_zend_function;
+ iterator_funcs : zend_class_iterator_funcs;
+ create_object : function (class_type:p_zend_class_entry):P_zend_object;cdecl;
+ get_iterator : function (ce:p_zend_class_entry; _object:pzval; by_ref:longint):P_zend_object_iterator;cdecl;
+ interface_gets_implemented : function (iface:p_zend_class_entry; class_type:p_zend_class_entry):longint;cdecl;
+ get_static_method : function (ce:p_zend_class_entry; method:p_zend_string):P_zend_function;cdecl;
+ serialize : function (_object:pzval; buffer:LPBYTE; buf_len:Psize_t; data:p_zend_serialize_data):longint;cdecl;
+ unserialize : function (_object:pzval; ce:p_zend_class_entry; buf:pbyte; buf_len:size_t; data:p_zend_unserialize_data):longint;cdecl;
+ num_interfaces : Cardinal;
+ num_traits : Cardinal;
+ interfaces : ^P_zend_class_entry;
+ traits : ^P_zend_class_entry;
+ trait_aliases : ^Pzend_trait_alias;
+ trait_precedences : ^Pzend_trait_precedence;
+ info : record
+ case longint of
+ 0 : ( user : record
+ filename : P_zend_string;
+ line_start : Cardinal;
+ line_end : Cardinal;
+ doc_comment : P_zend_string;
+ end );
+ 1 : ( internal : record
+ builtin_functions : P_zend_function_entry;
+ module : P_zend_module_entry;
+ end );
+ end;
+ end;
+ zend_class_entry = _zend_class_entry;
+ TZend_class_entry = _zend_class_entry;
+
+ zend_stream_fsizer_t = function ( handle:pointer):size_t;cdecl;
+
+ zend_stream_reader_t = function ( handle:pointer; buf:zend_pchar; len:size_t):size_t;cdecl;
+
+ zend_stream_closer_t = procedure ( handle:pointer);cdecl;
+
+
+
+ // __stat64 = zend_stat_t;
+ // stat = zend_stat_t;
+
+ zend_stream_type = (ZEND_HANDLE_FILENAME,ZEND_HANDLE_FD,ZEND_HANDLE_FP,
+ ZEND_HANDLE_STREAM,ZEND_HANDLE_MAPPED);
+
+_zend_mmap = record
+ len : size_t;
+ pos : size_t;
+ map : pointer;
+ buf : zend_pchar;
+ old_handle : pointer;
+ old_closer : zend_stream_closer_t;
+end;
+ zend_mmap = _zend_mmap;
+
+ _zend_stream = record
+ handle : pointer;
+ isatty : longint;
+ mmap : zend_mmap;
+ reader : zend_stream_reader_t;
+ fsizer : zend_stream_fsizer_t;
+ closer : zend_stream_closer_t;
+ end;
+ zend_stream = _zend_stream;
+
+ PZendFileHandle = ^_zend_file_handle;
+ _zend_file_handle = record
+ handle : record
+ case longint of
+ 0 : ( fd : longint );
+ 1 : ( fp : pointer );
+ 2 : ( stream : zend_stream );
+ end;
+ filename : zend_pchar;
+ opened_path : P_zend_string;
+ _type : zend_stream_type;
+ free_filename : zend_bool;
+ end;
+ zend_file_handle = _zend_file_handle;
+
+
+ _zend_utility_functions = record
+ error_function : procedure (_type:longint; error_filename:zend_pchar; error_lineno:uint; format:zend_pchar; args:va_list);cdecl;
+ printf_function : function (format:zend_pchar):size_t;cdecl varargs;
+ write_function : function (str:zend_pchar; str_length:size_t):size_t;cdecl;
+ fopen_function : function (filename:zend_pchar; opened_path:pP_zend_string):POINTER;cdecl;
+ message_handler : procedure (message:zend_long; data:pointer);cdecl;
+ block_interruptions : procedure ;cdecl;
+ unblock_interruptions : procedure ;cdecl;
+ get_configuration_directive : function (name:p_zend_string):Pzval;cdecl;
+ ticks_function : procedure (ticks:longint);cdecl;
+ on_timeout : procedure (seconds:longint);cdecl;
+ stream_open_function : function (filename:zend_pchar; handle:pzend_file_handle):longint;cdecl;
+ vspprintf_function : function (pbuf:PPchar; max_len:size_t; format:zend_pchar; ap:va_list):size_t;cdecl;
+ vstrpprintf_function : function (max_len:size_t; format:zend_pchar; ap:va_list):P_zend_string;cdecl;
+ getenv_function : function (name:zend_pchar; name_len:size_t):zend_pchar;cdecl;
+ resolve_path_function : function (filename:zend_pchar; filename_len:longint):P_zend_string;cdecl;
+ end;
+ zend_utility_functions = _zend_utility_functions;
+
+ _zend_utility_values = record
+ import_use_extension : zend_pchar;
+ import_use_extension_length : uint;
+ html_errors : zend_bool;
+ end;
+ zend_utility_values = _zend_utility_values;
+
+ zend_write_func_t = function (str:zend_pchar; str_length:size_t):longint;cdecl;
+ zend_write_t = zend_write_func_t;
+
+ zend_error_handling_t = (EH_NORMAL = 0,EH_SUPPRESS,EH_THROW);
+
+ zend_error_handling = record
+ handling : zend_error_handling_t;
+ exception : P_zend_class_entry;
+ user_handler : zval;
+ end;
+
+
+
+
+
+
+ _znode_op = record
+ case longint of
+ 0 : ( constant : cardinal );
+ 1 : ( _var : cardinal );
+ 2 : ( num : cardinal );
+ 3 : ( opline_num : cardinal );
+ 4 : ( jmp_offset : cardinal );
+ 5 : ( zv : Pzval );
+ end;
+ znode_op = _znode_op;
+
+ _znode = record
+ op_type : zend_uchar;
+ flag : zend_uchar;
+ u : record
+ case longint of
+ 0 : ( op : znode_op );
+ 1 : ( constant : zval );
+ end;
+ end;
+ znode = _znode;
+
+ _zend_ast_znode = record
+ kind : zend_ast_kind;
+ attr : zend_ast_attr;
+ lineno : Cardinal;
+ node : znode;
+ end;
+ zend_ast_znode = _zend_ast_znode;
+
+ _zend_declarables = record
+ ticks : zend_long;
+ end;
+ zend_declarables = _zend_declarables;
+
+ _zend_oparray_context = record
+ opcodes_size : Cardinal;
+ vars_size : longint;
+ literals_size : longint;
+ current_brk_cont : longint;
+ backpatch_count : longint;
+ in_finally : longint;
+ fast_call_var : Cardinal;
+ labels : PHashTable;
+ end;
+ zend_oparray_context = _zend_oparray_context;
+
+ _zend_file_context = record
+ declarables : zend_declarables;
+ implementing_class : znode;
+ current_namespace : P_zend_string;
+ in_namespace : zend_bool;
+ has_bracketed_namespaces : zend_bool;
+ imports : PHashTable;
+ imports_function : PHashTable;
+ imports_const : PHashTable;
+ end;
+ zend_file_context = _zend_file_context;
+
+ _zend_parser_stack_elem = record
+ case longint of
+ 0 : ( ast : P_zend_ast );
+ 1 : ( str : P_zend_string );
+ 2 : ( num : zend_ulong );
+ end;
+ zend_parser_stack_elem = _zend_parser_stack_elem;
+
+
+ _zend_execute_data = record
+ opline : P_zend_op;
+ call :P_zend_execute_data;
+ return_value :Pzval;
+ func : P_zend_function;
+ This : zval;
+ called_scope : P_zend_class_entry;
+ prev_execute_data :P_zend_execute_data;
+ symbol_table :P_zend_array;
+ run_time_cache : ^pointer;
+ literals : Pzval;
+ end;
+ zend_execute_data = _zend_execute_data;
+
+ user_opcode_handler_t = function (execute_data:p_zend_execute_data):longint;cdecl;
+
+ _zend_op = record
+ handler : pointer;
+ op1 : znode_op;
+ op2 : znode_op;
+ result : znode_op;
+ extended_value : Cardinal;
+ lineno : Cardinal;
+ opcode : zend_uchar;
+ op1_type : zend_uchar;
+ op2_type : zend_uchar;
+ result_type : zend_uchar;
+ end;
+ zend_op = _zend_op ;
+
+
+ _zend_brk_cont_element = record
+ start : longint;
+ cont : longint;
+ brk : longint;
+ parent : longint;
+ end;
+ zend_brk_cont_element = _zend_brk_cont_element;
+
+ _zend_label = record
+ brk_cont : longint;
+ opline_num : Cardinal;
+ end;
+ zend_label = _zend_label;
+
+ _zend_try_catch_element = record
+ try_op : Cardinal;
+ catch_op : Cardinal;
+ finally_op : Cardinal;
+ finally_end : Cardinal;
+ end;
+ zend_try_catch_element = _zend_try_catch_element;
+
+ _zend_property_info = record
+ offset : Cardinal;
+ flags : Cardinal;
+ name : P_zend_string;
+ doc_comment : P_zend_string;
+ ce : P_zend_class_entry;
+ end;
+ zend_property_info = _zend_property_info;
+
+ _zend_internal_arg_info = record
+ name : zend_pchar;
+ class_name : zend_pchar;
+ type_hint : zend_uchar;
+ pass_by_reference : zend_uchar;
+ allow_null : zend_bool;
+ is_variadic : zend_bool;
+ end;
+ zend_internal_arg_info = _zend_internal_arg_info;
+
+ _zend_arg_info = record
+ name : P_zend_string;
+ class_name : P_zend_string;
+ type_hint : zend_uchar;
+ pass_by_reference : zend_uchar;
+ allow_null : zend_bool;
+ is_variadic : zend_bool;
+ end;
+ zend_arg_info = _zend_arg_info;
+
+ _zend_internal_function_info = record
+ required_num_args : zend_uintptr_t;
+ class_name : zend_pchar;
+ type_hint : zend_uchar;
+ return_reference : zend_bool;
+ allow_null : zend_bool;
+ _is_variadic : zend_bool;
+ end;
+ zend_internal_function_info = _zend_internal_function_info;
+
+ _zend_op_array = record
+ _type : zend_uchar;
+ arg_flags : array[0..2] of zend_uchar;
+ fn_flags : Cardinal;
+ function_name : P_zend_string;
+ scope : P_zend_class_entry;
+ prototype : P_zend_function;
+ num_args : Cardinal;
+ required_num_args : Cardinal;
+ arg_info : Pzend_arg_info;
+ refcount : ^Cardinal;
+ this_var : Cardinal;
+ last : Cardinal;
+ opcodes : P_zend_op;
+ last_var : longint;
+ T : Cardinal;
+ vars : ^P_zend_string;
+ last_brk_cont : longint;
+ last_try_catch : longint;
+ brk_cont_array : Pzend_brk_cont_element;
+ try_catch_array : Pzend_try_catch_element;
+ static_variables : PHashTable;
+ filename : P_zend_string;
+ line_start : Cardinal;
+ line_end : Cardinal;
+ doc_comment : P_zend_string;
+ early_binding : Cardinal;
+ last_literal : longint;
+ literals : Pzval;
+ cache_size : longint;
+ run_time_cache : ^pointer;
+ reserved : array[0..3] of pointer;
+ end;
+ zend_op_array = _zend_op_array;
+
+
+ _zend_internal_function = record
+ _type : zend_uchar;
+ arg_flags : array[0..2] of zend_uchar;
+ fn_flags : Cardinal;
+ function_name : P_zend_string;
+ scope : P_zend_class_entry;
+ prototype : P_zend_function;
+ num_args : Cardinal;
+ required_num_args : Cardinal;
+ arg_info : Pzend_internal_arg_info;
+ handler : procedure (execute_data:p_zend_execute_data; return_value:pzval);cdecl;
+ module : P_zend_module_entry;
+ reserved : array[0..3] of pointer;
+ end;
+ tzend_internal_function = _zend_internal_function;
+
+
+
+
+ _zend_function = record
+ case longint of
+ 0 : ( _type : zend_uchar );
+ 1 : ( common : record
+ _type : zend_uchar;
+ arg_flags : array[0..2] of zend_uchar;
+ fn_flags : Cardinal;
+ function_name : P_zend_string;
+ scope : P_zend_class_entry;
+ prototype : P_zend_function;
+ num_args : Cardinal;
+ required_num_args : Cardinal;
+ arg_info : Pzend_arg_info;
+ end );
+ 2 : ( op_array : zend_op_array );
+ 3 : ( internal_function : tzend_internal_function );
+ end;
+
+ zend_function = _zend_function;
+
+
+
+
+ _zend_call_kind = (ZEND_CALL_NESTED_FUNCTION,ZEND_CALL_NESTED_CODE,
+ ZEND_CALL_TOP_FUNCTION,ZEND_CALL_TOP_CODE
+ );
+ zend_call_kind = _zend_call_kind;
+
+
+
+
+
+
+
+ unary_op_type = function (a:pzval; b:pzval):longint;cdecl;
+
+ binary_op_type = function (a:pzval; b:pzval; c:pzval):longint;cdecl;
+ zend_auto_global_callback = function (name:p_zend_string):zend_bool;cdecl;
+
+
+ _zend_auto_global = record
+ name : P_zend_string;
+ auto_global_callback : zend_auto_global_callback;
+ jit : zend_bool;
+ armed : zend_bool;
+ end;
+ zend_auto_global = _zend_auto_global;
+
+
+
+
+
+
+
+
+
+
+
+
+
+ HashPosition = cardinal;
+
+ _HashTableIterator = record
+ ht : PHashTable;
+ pos : HashPosition;
+ end;
+ HashTableIterator = _HashTableIterator;
+
+ _zend_object = record
+ gc : zend_refcounted_h;
+ handle : cardinal;
+ ce : P_zend_class_entry;
+ handlers : P_zend_object_handlers;
+ properties : PHashTable;
+ properties_table : array[0..0] of zval;
+ end;
+ zend_object = _zend_object;
+
+ _zend_resource = record
+ gc : zend_refcounted_h;
+ handle : longint;
+ _type : longint;
+ ptr : pointer;
+ end;
+ zend_resource = _zend_resource;
+
+ _zend_reference = record
+ gc : zend_refcounted_h;
+ val : zval;
+ end;
+ zend_reference = _zend_reference;
+
+ _zend_ast_ref = record
+ gc : zend_refcounted_h;
+ ast : P_zend_ast;
+ end;
+ zend_ast_ref = _zend_ast_ref;
+
+
+ zend_object_read_property_t = function (_object:pzval; member:pzval; _type:longint; cache_slot:ppointer; rv:pzval):Pzval;cdecl;
+
+ zend_object_read_dimension_t = function (_object:pzval; offset:pzval; _type:longint; rv:pzval):Pzval;cdecl;
+
+ zend_object_write_property_t = procedure (_object:pzval; member:pzval; value:pzval; cache_slot:ppointer);cdecl;
+
+ zend_object_write_dimension_t = procedure (_object:Pzval; offset:Pzval; value:pzval);cdecl;
+
+ zend_object_get_property_ptr_ptr_t = function (_object:Pzval; member:Pzval; _type:longint; cache_slot:pointer):Pzval;cdecl;
+
+ zend_object_set_t = procedure (_object:Pzval; value:pzval);cdecl;
+
+ zend_object_get_t = function (_object:Pzval; rv:pzval):Pzval;cdecl;
+
+ zend_object_has_property_t = function (_object:Pzval; member:Pzval; has_set_exists:longint; cache_slot:pointer):longint;cdecl;
+
+
+ zend_object_has_dimension_t = function (_object:Pzval; member:Pzval; check_empty:longint):longint;cdecl;
+
+
+ zend_object_unset_property_t = procedure (_object:Pzval; member:Pzval; cache_slot:pointer);cdecl;
+
+
+ zend_object_unset_dimension_t = procedure (_object:Pzval; offset:pzval);cdecl;
+
+
+ zend_object_get_properties_t = function (_object:pzval):PHashTable;cdecl;
+
+
+ zend_object_get_debug_info_t = function (_object:Pzval; is_temp:plongint):PHashTable;cdecl;
+
+
+
+
+ zend_object_call_method_t = function (method:P_zend_string; _object:P_zend_object; execute_data:P_zend_execute_data; return_value:pzval):longint;cdecl;
+
+ zend_object_get_method_t = function (_object:PP_zend_object; method:P_zend_string; key:pzval):P_zend_function;cdecl;
+
+ zend_object_get_constructor_t = function (_object:pzend_object):P_zend_function;cdecl;
+
+
+ zend_object_dtor_obj_t = procedure (_object:pzend_object);cdecl;
+
+ zend_object_free_obj_t = procedure (_object:pzend_object);cdecl;
+
+ zend_object_clone_obj_t = function (_object:pzval):P_zend_object;cdecl;
+
+ zend_object_get_class_name_t = function (_object:pzend_object):P_zend_string;cdecl;
+
+ zend_object_compare_t = function (object1:Pzval; object2:pzval):longint;cdecl;
+
+ zend_object_compare_zvals_t = function (resul:Pzval; op1:Pzval; op2:pzval):longint;cdecl;
+
+
+ zend_object_cast_t = function (readobj:Pzval; retval:Pzval; _type:longint):longint;cdecl;
+
+
+ zend_object_count_elements_t = function (_object:Pzval; count:pzend_long):longint;cdecl;
+
+ zend_object_get_closure_t = function (obj:Pzval; ce_ptr:PP_zend_class_entry; fptr_ptr:PP_zend_function; obj_ptr:pP_zend_object):longint;cdecl;
+
+ zend_object_get_gc_t = function (_object:Pzval; table:PPzval; n:plongint):PHashTable;cdecl;
+
+ zend_object_do_operation_t = function (opcode:zend_uchar; result:Pzval; op1:Pzval; op2:pzval):longint;cdecl;
+
+
+ _zend_stack = record
+ size : longint;
+ top : longint;
+ max : longint;
+ elements : pointer;
+ end;
+ zend_stack = _zend_stack;
+
+
+ _zend_object_handlers = record
+ offset : longint;
+ free_obj : zend_object_free_obj_t;
+ dtor_obj : zend_object_dtor_obj_t;
+ clone_obj : zend_object_clone_obj_t;
+ read_property : zend_object_read_property_t;
+ write_property : zend_object_write_property_t;
+ read_dimension : zend_object_read_dimension_t;
+ write_dimension : zend_object_write_dimension_t;
+ get_property_ptr_ptr : zend_object_get_property_ptr_ptr_t;
+ get : zend_object_get_t;
+ _set : zend_object_set_t;
+ has_property : zend_object_has_property_t;
+ unset_property : zend_object_unset_property_t;
+ has_dimension : zend_object_has_dimension_t;
+ unset_dimension : zend_object_unset_dimension_t;
+ get_properties : zend_object_get_properties_t;
+ get_method : zend_object_get_method_t;
+ call_method : zend_object_call_method_t;
+ get_constructor : zend_object_get_constructor_t;
+ get_class_name : zend_object_get_class_name_t;
+ compare_objects : zend_object_compare_t;
+ cast_object : zend_object_cast_t;
+ count_elements : zend_object_count_elements_t;
+ get_debug_info : zend_object_get_debug_info_t;
+ get_closure : zend_object_get_closure_t;
+ get_gc : zend_object_get_gc_t;
+ do_operation : zend_object_do_operation_t;
+ compare : zend_object_compare_zvals_t;
+ end;
+
+
+
+
+
+
+ _zend_object_iterator = record
+ std : zend_object;
+ data : zval;
+ funcs : Pzend_object_iterator_funcs;
+ index : zend_ulong;
+ end;
+
+
+ zend_object_iterator = _zend_object_iterator;
+ _zend_object_iterator_funcs = record
+ dtor : procedure (iter:pzend_object_iterator);cdecl;
+ valid : function (iter:pzend_object_iterator):longint;cdecl;
+ get_current_data : function (iter:pzend_object_iterator):Pzval;cdecl;
+ get_current_key : procedure (iter:P_zend_object_iterator; key:pzval);cdecl;
+ move_forward : procedure (iter:pzend_object_iterator);cdecl;
+ rewind : procedure (iter:pzend_object_iterator);cdecl;
+ invalidate_current : procedure (iter:pzend_object_iterator);cdecl;
+ end;
+ zend_object_iterator_funcs = _zend_object_iterator_funcs;
+
+
+
+ _zend_ini_parser_param = record
+ ini_parser_cb : zend_ini_parser_cb_t;
+ arg : pointer;
+ end;
+ zend_ini_parser_param = _zend_ini_parser_param;
+
+
+ _zend_module_entry = record
+ size : word;
+ zend_api : dword;
+ zend_debug : byte;
+ zts : byte;
+ ini_entry : P_zend_ini_entry;
+ deps : P_zend_module_dep;
+ name : zend_pchar;
+ functions : P_zend_function_entry;
+ module_startup_func : function (_type:longint; module_number:longint):longint;cdecl;
+ module_shutdown_func : function (_type:longint; module_number:longint):longint;cdecl;
+ request_startup_func : function (_type:longint; module_number:longint):longint;cdecl;
+ request_shutdown_func : function (_type:longint; module_number:longint):longint;cdecl;
+ info_func : procedure (zend_module:p_zend_module_entry);cdecl;
+ version : zend_pchar;
+ globals_size : size_t;
+ globals_ptr : pointer;
+ globals_ctor : procedure (global:pointer);cdecl;
+ globals_dtor : procedure (global:pointer);cdecl;
+ post_deactivate_func : function :longint;cdecl;
+ module_started : longint;
+ _type : byte;
+ handle : pointer;
+ module_number : longint;
+ build_id : zend_pchar;
+ end;
+ zend_module_entry = _zend_module_entry;
+
+
+
+
+
+ _zend_module_dep = record
+ name : zend_pchar;
+ rel : zend_pchar;
+ version : zend_pchar;
+ _type : byte;
+ end;
+
+ zend_module_dep = _zend_module_dep;
+
+ _zend_function_entry = record
+ fname : zend_pchar;
+ handler : pointer;
+ //handler: procedure (execute_data:P_zend_execute_data; return_value:Pointer);cdecl;
+ arg_info : P_zend_internal_arg_info;
+ num_args : Cardinal;
+ flags : Cardinal;
+ end;
+ zend_function_entry = _zend_function_entry;
+
+ _php_stream_context = record
+ notifier : P_php_stream_notifier;
+ options : zval;
+ res : P_zend_resource;
+ end;
+ php_stream_context = _php_stream_context ;
+ php_stream_notification_func = procedure (context:P_php_stream_context; notifycode:longint; severity:longint; xmsg:zend_pchar; xcode:longint;
+ bytes_sofar:size_t; bytes_max:size_t; ptr:pointer);cdecl;
+
+
+ _php_stream_notifier = record
+ func : php_stream_notification_func;
+ dtor : procedure (notifier:p_php_stream_notifier);
+ ptr : zval;
+ mask : longint;
+ progress : size_t;
+ progress_max : size_t;
+ end;
+
+
+
+
+
+
+
+
+
+ _php_stream_bucket = record
+ next : P_php_stream_bucket;
+ prev : P_php_stream_bucket;
+ brigade : P_php_stream_bucket_brigade;
+ buf : zend_pchar;
+ buflen : size_t;
+ own_buf : longint;
+ is_persistent : longint;
+ refcount : longint;
+ end;
+
+ _php_stream_bucket_brigade = record
+ head : P_php_stream_bucket;
+ tail : P_php_stream_bucket;
+ end;
+
+ php_stream_bucket = _php_stream_bucket ;
+ php_stream_bucket_brigade = _php_stream_bucket_brigade ;
+
+ php_stream_filter_status_t = (PSFS_ERR_FATAL,PSFS_FEED_ME,PSFS_PASS_ON
+ );
+
+
+ _php_stream_filter_chain = record
+ head : P_php_stream_filter;
+ tail : P_php_stream_filter;
+ stream : P_php_stream;
+ end;
+ php_stream_filter_chain = _php_stream_filter_chain;
+ _php_stream = record
+ ops : Pphp_stream_ops;
+ _abstract : pointer;
+ readfilters : php_stream_filter_chain;
+ writefilters : php_stream_filter_chain;
+ wrapper : P_php_stream_wrapper;
+ wrapperthis : pointer;
+ wrapperdata : zval;
+ fgetss_state : longint;
+ is_persistent : longint;
+ mode : array[0..15] of char;
+ res : P_zend_resource;
+ in_free : longint;
+ fclose_stdiocast : longint;
+ stdiocast : POINTER;
+ __exposed : longint;
+ orig_path : zend_pchar;
+ ctx : P_zend_resource;
+ flags : longint;
+ eof : longint;
+ position : zend_off_t;
+ readbuf : Pbyte;
+ readbuflen : size_t;
+ readpos : zend_off_t;
+ writepos : zend_off_t;
+ chunk_size : size_t;
+ open_filename : zend_pchar;
+ open_lineno : uint;
+ enclosing_stream : P_php_stream;
+ end;
+
+ php_stream = _php_stream ;
+ _php_stream_filter = record
+ fops : Pphp_stream_filter_ops;
+ _abstract : zval;
+ next : P_php_stream_filter;
+ prev : P_php_stream_filter;
+ is_persistent : longint;
+ chain : Pphp_stream_filter_chain;
+ buffer : php_stream_bucket_brigade;
+ res : P_zend_resource;
+ end;
+ php_stream_filter = _php_stream_filter ;
+ _php_stream_filter_ops = record
+ filter : function (stream:P_php_stream; thisfilter:P_php_stream_filter; buckets_in:P_php_stream_bucket_brigade; buckets_out:P_php_stream_bucket_brigade; bytes_consumed:Psize_t;
+ flags:longint):php_stream_filter_status_t;cdecl;
+ dtor : procedure (thisfilter:p_php_stream_filter);cdecl;
+ _label : zend_pchar;
+ end;
+ php_stream_filter_ops = _php_stream_filter_ops;
+
+
+
+
+
+ _php_stream_filter_factory = record
+ create_filter : function (filtername:zend_pchar; filterparams:Pzval; persistent:longint):P_php_stream_filter;cdecl;
+ end;
+ php_stream_filter_factory = _php_stream_filter_factory;
+
+
+
+
+
+
+ _php_stream_statbuf = record
+ sb : zend_stat_t;
+ end;
+ php_stream_statbuf = _php_stream_statbuf;
+
+ _php_stream_dirent = record
+ d_name : array[0..(256)-1] of char;
+ end;
+ php_stream_dirent = _php_stream_dirent;
+
+
+
+ _php_stream_ops = record
+ write : function (stream:P_php_stream; buf:zend_pchar; count:size_t):size_t;cdecl;
+ read : function (stream:P_php_stream; buf:zend_pchar; count:size_t):size_t;cdecl;
+ close : function (stream:P_php_stream; close_handle:longint):longint;cdecl;
+ flush : function (stream:p_php_stream):longint;cdecl;
+ _label : zend_pchar;
+ seek : function (stream:P_php_stream; offset:zend_off_t; whence:longint; newoffset:pzend_off_t):longint;cdecl;
+ cast : function (stream:P_php_stream; castas:longint; ret:ppointer):longint;cdecl;
+ stat : function (stream:P_php_stream; ssb:pphp_stream_statbuf):longint;cdecl;
+ set_option : function (stream:P_php_stream; option:longint; value:longint; ptrparam:pointer):longint;cdecl;
+ end;
+ php_stream_ops = _php_stream_ops;
+
+ _php_stream_wrapper = record
+ wops : Pphp_stream_wrapper_ops;
+ _abstract : pointer;
+ is_url : longint;
+ end;
+ php_stream_wrapper = _php_stream_wrapper ;
+
+ _php_stream_wrapper_ops = record
+ stream_opener : function (wrapper:P_php_stream_wrapper; filename:zend_pchar; mode:zend_pchar; options:longint; opened_path:PP_zend_string; context:P_php_stream_context; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):P_php_stream;cdecl;
+ stream_closer : function (wrapper:P_php_stream_wrapper; stream:p_php_stream):longint;cdecl;
+ stream_stat : function (wrapper:P_php_stream_wrapper; stream:P_php_stream; ssb:pphp_stream_statbuf):longint;cdecl;
+ url_stat : function (wrapper:P_php_stream_wrapper; url:zend_pchar; flags:longint; ssb:Pphp_stream_statbuf; context:pphp_stream_context):longint;cdecl;
+ dir_opener : function (wrapper:P_php_stream_wrapper; filename:zend_pchar; mode:zend_pchar; options:longint; opened_path:PP_zend_string; context:P_php_stream_context; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):P_php_stream;cdecl;
+ _label : zend_pchar;
+ unlink : function (wrapper:P_php_stream_wrapper; url:zend_pchar; options:longint; context:pphp_stream_context):longint;cdecl;
+ rename : function (wrapper:P_php_stream_wrapper; url_from:zend_pchar; url_to:zend_pchar; options:longint; context:pphp_stream_context):longint;cdecl;
+ stream_mkdir : function (wrapper:P_php_stream_wrapper; url:zend_pchar; mode:longint; options:longint; context:pphp_stream_context):longint;cdecl;
+ stream_rmdir : function (wrapper:P_php_stream_wrapper; url:zend_pchar; options:longint; context:Pphp_stream_context):longint;cdecl;
+ stream_metadata : function (wrapper:P_php_stream_wrapper; url:zend_pchar; options:longint; value:Ppointer; context:Pphp_stream_context):longint;cdecl;
+ end;
+ php_stream_wrapper_ops = _php_stream_wrapper_ops;
+
+
+
+
+
+
+
+ sapi_header_struct = record
+ header : zend_pchar;
+ header_len : size_t;
+ end;
+
+
+
+
+ _zend_llist_element = record
+ next : P_zend_llist_element;
+ prev : P_zend_llist_element;
+ data : array[0..0] of char;
+ end;
+ zend_llist_element = _zend_llist_element;
+
+
+ llist_dtor_func_t = procedure (_para1:pointer);cdecl;
+
+ llist_compare_func_t = function (_para1:PP_zend_llist_element; _para2:PP_zend_llist_element):longint;cdecl;
+
+ llist_apply_with_args_func_t = procedure (data:Ppointer; num_args:longint; args:va_list);cdecl;
+
+ llist_apply_with_arg_func_t = procedure (data:Ppointer; arg:Ppointer);cdecl;
+
+ llist_apply_func_t = procedure (_para1:pointer);cdecl;
+
+ _zend_llist = record
+ head : Pzend_llist_element;
+ tail : Pzend_llist_element;
+ count : size_t;
+ size : size_t;
+ dtor : llist_dtor_func_t;
+ persistent : byte;
+ traverse_ptr : Pzend_llist_element;
+ end;
+ zend_llist = _zend_llist;
+
+ zend_llist_position = Pzend_llist_element;
+
+
+ sapi_headers_struct = record
+ headers : zend_llist;
+ http_response_code : longint;
+ send_default_content_type : byte;
+ mimetype : zend_pchar;
+ http_status_line : zend_pchar;
+ end;
+
+ _sapi_post_entry = record
+ content_type : zend_pchar;
+ content_type_len : uint;
+ post_reader : procedure ;cdecl;
+ post_handler : procedure (content_type_dup:zend_pchar; arg:Ppointer);cdecl;
+ end;
+ sapi_post_entry = _sapi_post_entry;
+
+
+
+ sapi_request_info = record
+ request_method : zend_pchar;
+ query_string : zend_pchar;
+ cookie_data : zend_pchar;
+ content_length : zend_long;
+ path_translated : zend_pchar;
+ request_uri : zend_pchar;
+ request_body : P_php_stream;
+ content_type : zend_pchar;
+ headers_only : zend_bool;
+ no_headers : zend_bool;
+ headers_read : zend_bool;
+ post_entry : P_sapi_post_entry;
+ content_type_dup : zend_pchar;
+ auth_user : zend_pchar;
+ auth_password : zend_pchar;
+ auth_digest : zend_pchar;
+ argv0 : zend_pchar;
+ current_user : zend_pchar;
+ current_user_length : longint;
+ argc : longint;
+ argv : ^zend_pchar;
+ proto_num : longint;
+ end;
+
+
+ _sapi_globals_struct = record
+ server_context : pointer;
+ request_info : sapi_request_info;
+ sapi_headers : sapi_headers_struct;
+ read_post_bytes : FixedUInt ;
+ post_read : byte;
+ headers_sent : byte;
+ global_stat : zend_stat_t;
+ default_mimetype : zend_pchar;
+ default_charset : zend_pchar;
+ rfc1867_uploaded_files : PHashTable;
+ post_max_size : zend_long;
+ options : longint;
+ sapi_started : zend_bool;
+ global_request_time : double;
+ known_post_content_types : HashTable;
+ callback_func : zval;
+ fci_cache : zend_fcall_info_cache;
+ end;
+ sapi_globals_struct = _sapi_globals_struct;
+
+ sapi_header_line = record
+ line : zend_pchar;
+ line_len : size_t;
+ response_code : zend_long;
+ end;
+
+
+
+
+
+ sapi_header_op_enum = (SAPI_HEADER_REPLACE,SAPI_HEADER_ADD_,SAPI_HEADER_DELETE,
+ SAPI_HEADER_DELETE_ALL,SAPI_HEADER_SET_STATUS
+ );
+
+
+ _sapi_module_struct = record
+ name : zend_pchar;
+ pretty_name : zend_pchar;
+ startup : function (sapi_module:P_sapi_module_struct):longint;cdecl;
+ shutdown : function (sapi_module:P_sapi_module_struct):longint;cdecl;
+ activate : function :longint;cdecl;
+ deactivate : function :longint;cdecl;
+ ub_write : function (str:zend_pchar; str_length:size_t):size_t;cdecl;
+ flush : procedure (server_context:Ppointer);cdecl;
+ get_stat : function :P_zend_stat_t;cdecl;
+ getenv : function (name:zend_pchar; name_len:size_t):zend_pchar;cdecl;
+ sapi_error : procedure (_type:longint; error_msg:zend_pchar);cdecl varargs;
+ header_handler : function (sapi_header:Psapi_header_struct; op:sapi_header_op_enum; sapi_headers:Psapi_headers_struct):longint;cdecl;
+ send_headers : function (sapi_headers:Psapi_headers_struct):longint;cdecl;
+ send_header : procedure (sapi_header:Psapi_header_struct; server_context:Ppointer);cdecl;
+ read_post : function (buffer:zend_pchar; count_bytes:size_t):size_t;cdecl;
+ read_cookies : function :zend_pchar;cdecl;
+ register_server_variables : procedure (track_vars_array:Pzval);cdecl;
+ log_message : procedure (message:zend_pchar);cdecl;
+ get_request_time : function :double;cdecl;
+ terminate_process : procedure ;cdecl;
+ php_ini_path_override : zend_pchar;
+ block_interruptions : procedure ;cdecl;
+ unblock_interruptions : procedure ;cdecl;
+ default_post_reader : procedure ;cdecl;
+ treat_data : procedure (arg:longint; str:zend_pchar; destArray:Pzval);cdecl;
+ executable_location : zend_pchar;
+ php_ini_ignore : longint;
+ php_ini_ignore_cwd : longint;
+ get_fd : function (fd:Plongint):longint;cdecl;
+ force_http_10 : function :longint;cdecl;
+ get_target_uid : function (_para1:Puid_t):longint;cdecl;
+ get_target_gid : function (_para1:Pgid_t):longint;cdecl;
+ input_filter : function (arg:longint; _var:zend_pchar; val:PPchar; val_len:size_t; new_val_len:Psize_t):dword;cdecl;
+ ini_defaults : procedure (configuration_hash:PHashTable);cdecl;
+ phpinfo_as_text : longint;
+ ini_entries : zend_pchar;
+ additional_functions : Pzend_function_entry;
+ input_filter_init : function :dword;cdecl;
+ end;
+ sapi_module_struct = _sapi_module_struct;
+
+
+ Ptsrm_intptr_t = ^tsrm_intptr_t;
+ Ptsrm_uintptr_t = ^tsrm_uintptr_t;
+ Pts_rsrc_id = ^ts_rsrc_id;
+
+ tsrm_intptr_t = intptr;
+ tsrm_uintptr_t = uintptr_t;
+
+
+ ts_rsrc_id = longint;
+
+ Pbeos_ben = ^beos_ben;
+ beos_ben = record
+ sem : integer;
+ ben : longint;
+ end;
+
+ ts_allocate_ctor = procedure (_para1:pointer);cdecl;
+
+ ts_allocate_dtor = procedure (_para1:pointer);cdecl;
+
+ tsrm_thread_begin_func_t = procedure (thread_id:DWORD);cdecl;
+
+ tsrm_thread_end_func_t = procedure (thread_id:DWORD);cdecl;
+
+
+
+ zend_ini_entry = _zend_ini_entry ;
+
+
+
+ _zend_arena = record
+ ptr : zend_pchar;
+ _end : zend_pchar;
+ prev : P_zend_arena;
+ end;
+ zend_arena = _zend_arena;
+ Pzend_compiler_globals = ^_zend_compiler_globals;
+ _zend_compiler_globals = record
+ loop_var_stack : zend_stack;
+ active_class_entry : P_zend_class_entry;
+ compiled_filename : P_zend_string;
+ zend_lineno : longint;
+ active_op_array : P_zend_op_array;
+ function_table : PHashTable;
+ class_table : PHashTable;
+ filenames_table : HashTable;
+ auto_globals : PHashTable;
+ parse_error : zend_bool;
+ in_compilation : zend_bool;
+ short_tags : zend_bool;
+ unclean_shutdown : zend_bool;
+ ini_parser_unbuffered_errors : zend_bool;
+ open_files : zend_llist;
+ ini_parser_param : P_zend_ini_parser_param;
+ start_lineno : uint32_t;
+ increment_lineno : zend_bool;
+ doc_comment : P_zend_string;
+ compiler_options : uint32_t;
+ const_filenames : HashTable;
+ context : zend_oparray_context;
+ file_context : zend_file_context;
+ arena : P_zend_arena;
+ empty_string : P_zend_string;
+ one_char_string : array[0..255] of P_zend_string;
+ interned_strings : HashTable;
+ script_encoding_list : PPzend_encoding;
+ script_encoding_list_size : size_t;
+ multibyte : zend_bool;
+ detect_unicode : zend_bool;
+ encoding_declared : zend_bool;
+ ast : P_zend_ast;
+ ast_arena : P_zend_arena;
+ delayed_oplines_stack : pointer;
+ static_members_table : ^Pzval;
+ last_static_member : longint;
+ end;
+
+
+ _zend_objects_store = record
+ object_buckets : ^P_zend_object;
+ top : uint32_t;
+ size : uint32_t;
+ free_list_head : longint;
+ end;
+ zend_objects_store = _zend_objects_store;
+
+ Pzend_executor_globals = ^_zend_executor_globals;
+ _zend_executor_globals = record
+ uninitialized_zval : zval;
+ error_zval : zval;
+ symtable_cache : array[0..(32)-1] of P_zend_array;
+ symtable_cache_limit : ^P_zend_array;
+ symtable_cache_ptr : ^P_zend_array;
+ symbol_table : zend_array;
+ included_files : HashTable;
+ bailout : pointer;
+ error_reporting : longint;
+ exit_status : longint;
+ function_table : PHashTable;
+ class_table : PHashTable;
+ zend_constants : PHashTable;
+ vm_stack_top : Pzval;
+ vm_stack_end : Pzval;
+ vm_stack : _zend_vm_stack;
+ current_execute_data : P_zend_execute_data;
+ scope : P_zend_class_entry;
+ precision : zend_long;
+ ticks_count : longint;
+ in_autoload : PHashTable;
+ autoload_func : P_zend_function;
+ full_tables_cleanup : zend_bool;
+ no_extensions : zend_bool;
+ timed_out : zend_bool;
+ windows_version_info : OSVERSIONINFOEX;
+ regular_list : HashTable;
+ persistent_list : HashTable;
+ user_error_handler_error_reporting : longint;
+ user_error_handler : zval;
+ user_exception_handler : zval;
+ user_error_handlers_error_reporting : zend_stack;
+ user_error_handlers : zend_stack;
+ user_exception_handlers : zend_stack;
+ error_handling : zend_error_handling_t;
+ exception_class : P_zend_class_entry;
+ timeout_seconds : zend_long;
+ lambda_count : longint;
+ ini_directives : PHashTable;
+ modified_ini_directives : PHashTable;
+ error_reporting_ini_entry : P_zend_ini_entry;
+ objects_store : zend_objects_store;
+ exception : P_zend_object;
+ prev_exception : P_zend_object;
+ opline_before_exception : P_zend_op;
+ exception_op : array[0..2] of zend_op;
+ current_module : P_zend_module_entry;
+ active : zend_bool;
+ valid_symbol_table : zend_bool;
+ assertions : zend_long;
+ ht_iterators_count : uint32_t;
+ ht_iterators_used : uint32_t;
+ ht_iterators : PHashTableIterator;
+ ht_iterators_slots : array[0..15] of HashTableIterator;
+ // saved_fpu_cw_ptr : pointer;
+ saved_fpu_cw : LONGINT;
+ trampoline : zend_function;
+ call_trampoline_op : zend_op;
+ reserved : array[0..(4)-1] of pointer;
+ end;
+
+ _zend_ini_scanner_globals = record
+ yy_in : Pzend_file_handle;
+ yy_out : Pzend_file_handle;
+ yy_leng : dword;
+ yy_start : Pbyte;
+ yy_text : Pbyte;
+ yy_cursor : Pbyte;
+ yy_marker : Pbyte;
+ yy_limit : Pbyte;
+ yy_state : longint;
+ state_stack : zend_stack;
+ filename : zend_pchar;
+ lineno : longint;
+ scanner_mode : longint;
+ end;
+
+ _zend_ptr_stack = record
+ top : longint;
+ max : longint;
+ elements : ^pointer;
+ top_element : ^pointer;
+ persistent : zend_bool;
+ end;
+ zend_ptr_stack = _zend_ptr_stack;
+
+
+
+
+ zend_encoding_filter = function (str:LPBYTE; str_length:Psize_t; buf:Pbyte; length:size_t):size_t;cdecl;
+
+ Pzend_encoding_fetcher = ^zend_encoding_fetcher;
+ zend_encoding_fetcher = function (encoding_name:zend_pchar):Pzend_encoding;cdecl;
+
+ Pzend_encoding_name_getter = ^zend_encoding_name_getter;
+ zend_encoding_name_getter = function (encoding:Pzend_encoding):zend_pchar;cdecl;
+
+ zend_encoding_lexer_compatibility_checker = function (encoding:Pzend_encoding):longint;cdecl;
+
+ zend_encoding_detector = function (_string:Pbyte; length:size_t; list:PPzend_encoding; list_size:size_t):Pzend_encoding;cdecl;
+
+ zend_encoding_converter = function (_to:LPBYTE; to_length:Psize_t; from:Pbyte; from_length:size_t; encoding_to:Pzend_encoding;
+ encoding_from:Pzend_encoding):size_t;cdecl;
+
+ zend_encoding_list_parser = function (encoding_list:zend_pchar; encoding_list_len:size_t; return_list:PPPzend_encoding; return_size:Psize_t; persistent:longint):longint;cdecl;
+
+ zend_encoding_internal_encoding_getter = function :Pzend_encoding;cdecl;
+
+ zend_encoding_internal_encoding_setter = function (encoding:Pzend_encoding):longint;cdecl;
+
+
+ _zend_multibyte_functions = record
+ provider_name : zend_pchar;
+ encoding_fetcher : zend_encoding_fetcher;
+ encoding_name_getter : zend_encoding_name_getter;
+ lexer_compatibility_checker : zend_encoding_lexer_compatibility_checker;
+ encoding_detector : zend_encoding_detector;
+ encoding_converter : zend_encoding_converter;
+ encoding_list_parser : zend_encoding_list_parser;
+ internal_encoding_getter : zend_encoding_internal_encoding_getter;
+ internal_encoding_setter : zend_encoding_internal_encoding_setter;
+ end;
+ zend_multibyte_functions = _zend_multibyte_functions;
+
+ _zend_leak_info = record
+ addr : pointer;
+ size : size_t;
+ filename : zend_pchar;
+ orig_filename : zend_pchar;
+ lineno : uint;
+ orig_lineno : uint;
+ end;
+ zend_leak_info = _zend_leak_info;
+
+
+
+ _zend_mm_debug_info = record
+ size : size_t;
+ filename : zend_pchar;
+ orig_filename : zend_pchar;
+ lineno : uint;
+ orig_lineno : uint;
+ end;
+ zend_mm_debug_info = _zend_mm_debug_info;
+
+ _zend_mm_heap = record
+ use_custom_heap : longint;
+ storage : P_zend_mm_storage;
+ size : size_t;
+ peak : size_t;
+ free_slot : array[0..(30)-1] of P_zend_mm_free_slot;
+ real_size : size_t;
+ real_peak : size_t;
+ limit : size_t;
+ overflow : longint;
+ huge_list : P_zend_mm_huge_list;
+ main_chunk : P_zend_mm_chunk;
+ cached_chunks : P_zend_mm_chunk;
+ chunks_count : longint;
+ peak_chunks_count : longint;
+ cached_chunks_count : longint;
+ avg_chunks_count : double;
+ custom_heap : record
+ case longint of
+ 0 : ( std : record
+ _malloc : function (_para1:size_t):pointer;cdecl;
+ _free : procedure (_para1:pointer);cdecl;
+ _realloc : function (_para1:pointer; _para2:size_t):pointer;cdecl;
+ end );
+ 1 : ( debug : record
+ _malloc : function (g:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer;cdecl;
+ _free : procedure (g:Ppointer; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint);cdecl;
+ _realloc : function (g:Ppointer; gg:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar;
+ __zend_orig_lineno:uint):pointer;cdecl;
+ end );
+ end;
+ end;
+
+
+ _zend_mm_chunk = record
+ heap : P_zend_mm_heap;
+ next : P_zend_mm_chunk;
+ prev : P_zend_mm_chunk;
+ free_pages : longint;
+ free_tail : longint;
+ num : longint;
+ reserve : array[0..(64 - (sizeof(POINTER) * 3 + sizeof(integer) * 3))] of char;
+ heap_slot : _zend_mm_heap;
+ free_map : pointer;
+ map : Pointer;
+ end;
+
+ _zend_mm_page = record
+ bytes : array[0..(4 * 1024)-1] of char;
+ end;
+
+ _zend_mm_bin = record
+ bytes : array[0..(4 * 1024*8)-1] of char;
+ end;
+
+ _zend_mm_free_slot = record
+ next_free_slot : P_zend_mm_free_slot;
+ end;
+
+
+ _zend_mm_huge_list = record
+ ptr : pointer;
+ size : size_t;
+ next : P_zend_mm_huge_list;
+ dbg : zend_mm_debug_info;
+ end;
+
+
+
+ zend_mm_chunk_alloc_t = function (storage:PPointer; size:size_t; alignment:size_t):pointer;cdecl;
+
+ zend_mm_chunk_free_t = procedure (storage:PPointer; chunk:Ppointer; size:size_t);cdecl;
+
+ zend_mm_chunk_truncate_t = function (storage:PPointer; chunk:Ppointer; old_size:size_t; new_size:size_t):longint;cdecl;
+
+ zend_mm_chunk_extend_t = function (storage:PPointer; chunk:Ppointer; old_size:size_t; new_size:size_t):longint;cdecl;
+
+
+
+ zend_mm_heap =_zend_mm_heap ;
+ _zend_mm_handlers = record
+ chunk_alloc : zend_mm_chunk_alloc_t;
+ chunk_free : zend_mm_chunk_free_t;
+ chunk_truncate : zend_mm_chunk_truncate_t;
+ chunk_extend : zend_mm_chunk_extend_t;
+ end;
+ zend_mm_handlers = _zend_mm_handlers;
+ _zend_mm_storage = record
+ handlers : zend_mm_handlers;
+ data : pointer;
+ end;
+ zend_mm_storage = _zend_mm_storage ;
+
+
+ _zend_closure = record
+ std : zend_object;
+ func : zend_function;
+ this_ptr : zval;
+ called_scope : Pzend_class_entry;
+ orig_internal_handler : procedure (var execute_data:zend_execute_data; var return_value:zval);cdecl;
+ end;
+ zend_closure = _zend_closure;
+
+
+
+ _zend_php_scanner_globals = record
+ yy_in : Pzend_file_handle;
+ yy_out : Pzend_file_handle;
+ yy_leng : dword;
+ yy_start : Pbyte;
+ yy_text : Pbyte;
+ yy_cursor : Pbyte;
+ yy_marker : Pbyte;
+ yy_limit : Pbyte;
+ yy_state : longint;
+ state_stack : zend_stack;
+ heredoc_label_stack : zend_ptr_stack;
+ script_org : Pbyte;
+ script_org_size : size_t;
+ script_filtered : Pbyte;
+ script_filtered_size : size_t;
+ input_filter : zend_encoding_filter;
+ output_filter : zend_encoding_filter;
+ script_encoding : Pzend_encoding;
+ scanned_string_len : longint;
+ on_event : procedure (event:zend_php_scanner_event; token:longint; line:longint);cdecl;
+ end;
+
+ Pzend_hash_key = ^Tzend_hash_key;
+ Tzend_hash_key = record
+ h : zend_ulong;
+ key : Pzend_string;
+ end;
+
+ Tsmart_str = record
+ s:Pzend_string;
+ a:size_t;
+ end;
+
+
+
+
+
+ Tmerge_checker_func_t = function (target_ht:PHashTable; source_data:Pzval; hash_key:Pzend_hash_key; pParam:Ppointer):zend_bool;cdecl;
+ Tapply_func_t = function (pDest:Pzval):longint;cdecl;
+ Tapply_func_arg_t = function (pDest:Pzval; argument:Ppointer):longint;cdecl;
+ Tapply_func_args_t = function (pDest:Pzval; num_args:longint; args:va_list; hash_key:Pzend_hash_key):longint;cdecl;
+
+
+
+
+
+IEJORGJIERGE = procedure (ini_entry:P_zend_ini_entry; _type:longint);
+EWKGERGJ945YG45 = procedure (_para1:size_t);
+OERGJOERJGIERGHRE = procedure (_para1:size_t);
+
+ERG4JG09E84GJ8945H45H = procedure (_para1:pointer; _para2:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint);
+EWFG439EGRG45 = procedure (_para1:pointer);
+G5J90E4GK495Y4 = procedure (_para1:pointer);
+ f584hj4i5hth = procedure (_para1:pointer);
+ KD45T5H65HTHRTH = function (element:Ppointer; arg:Ppointer):longint;
+ IEJG9458U9845Y45 = function (element:Ppointer):longint;
+ ERGERG43T4T545YH546 = function (element1:Ppointer; element2:Ppointer):longint;
+ RGEKG34I9TI3434 = function (data:Ppointer):longint;
+var
+smart_str_erealloc:procedure(str:psmart_str; len:size_t);cdecl;
+smart_str_realloc:procedure(str:psmart_str; len:size_t); cdecl;
+tsrm_set_new_thread_begin_handler:function(new_thread_begin_handler:tsrm_thread_begin_func_t):pointer; cdecl;
+tsrm_set_new_thread_end_handler:function(new_thread_end_handler:tsrm_thread_end_func_t):pointer; cdecl;
+tsrm_new_interpreter_context:function:pointer; cdecl;
+tsrm_set_interpreter_context:function(new_ctx:Ppointer):pointer; cdecl;
+tsrm_free_interpreter_context:procedure(context:Ppointer); cdecl;
+tsrm_get_ls_cache:function:pointer; cdecl;
+tsrm_error_set:procedure(level:longint; debug_filename:zend_pchar); cdecl;
+tsrm_thread_id:function:DWORD; cdecl;
+tsrm_mutex_alloc:function:pointer; cdecl;
+tsrm_mutex_free:procedure(mutexp:Ppointer); cdecl;
+tsrm_mutex_lock:function(mutexp:Ppointer):longint; cdecl;
+tsrm_mutex_unlock:function(mutexp:Ppointer):longint; cdecl;
+tsrm_startup:function(expected_threads:longint; expected_resources:longint; debug_level:longint; debug_filename:zend_pchar):longint; cdecl;
+tsrm_shutdown:procedure; cdecl;
+ts_allocate_id:function(rsrc_id:Pts_rsrc_id; size:size_t; ctor:ts_allocate_ctor; dtor:ts_allocate_dtor):ts_rsrc_id; cdecl;
+ts_resource_ex:function(id:ts_rsrc_id; th_id:pointer):pointer; cdecl;
+ts_free_thread:procedure; cdecl;
+ts_free_id:procedure(id:ts_rsrc_id); cdecl;
+php_request_startup:function:longint; cdecl;
+php_request_shutdown:procedure( dummy:pointer); cdecl;
+php_request_shutdown_for_exec:procedure(dummy:Ppointer); cdecl;
+php_module_startup:function( sf:p_sapi_module_struct; additional_modules:p_zend_module_entry; num_additional_modules:uint):longint; cdecl;
+php_module_shutdown:procedure; cdecl;
+php_module_shutdown_for_exec:procedure; cdecl;
+php_module_shutdown_wrapper:function(sapi_globals:Psapi_module_struct):longint; cdecl;
+php_request_startup_for_hook:function:longint; cdecl;
+php_request_shutdown_for_hook:procedure(dummy:Ppointer); cdecl;
+php_register_extensions:function(ptr:PP_zend_module_entry; count:longint):longint; cdecl;
+php_execute_script:function( primary_file:p_zend_file_handle):longint; cdecl;
+php_execute_simple_script:function(primary_file:Pzend_file_handle; ret:Pzval):longint; cdecl;
+php_handle_special_queries:function:longint; cdecl;
+php_lint_script:function(_file:Pzend_file_handle):longint; cdecl;
+php_handle_aborted_connection:procedure; cdecl;
+php_handle_auth_data:function(auth:zend_pchar):longint; cdecl;
+php_html_puts:procedure(str:zend_pchar; siz:size_t); cdecl;
+php_stream_open_for_zend_ex:function(filename:zend_pchar; handle:Pzend_file_handle; mode:longint):longint; cdecl;
+
+
+zend_strndup:function(s:zend_pchar; length:size_t):zend_pchar; cdecl;
+_emalloc:function(size:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer; cdecl;
+_safe_emalloc:function(nmemb:size_t; size:size_t; offset:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer; cdecl;
+_safe_malloc:function(nmemb:size_t; size:size_t; offset:size_t):pointer; cdecl;
+_efree:procedure(ptr:Ppointer; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint); cdecl;
+_ecalloc:function(nmemb:size_t; size:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer; cdecl;
+_erealloc:function(ptr:Ppointer; size:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer; cdecl;
+_erealloc2:function(ptr:Ppointer; size:size_t; copy_size:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer; cdecl;
+_safe_erealloc:function(ptr:Ppointer; nmemb:size_t; size:size_t; offset:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer; cdecl;
+_safe_realloc:function(ptr:Ppointer; nmemb:size_t; size:size_t; offset:size_t):pointer; cdecl;
+_estrdup:function(s:zend_pchar; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):zend_pchar; cdecl;
+_estrndup:function(s:zend_pchar; length:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):zend_pchar; cdecl;
+_zend_mem_block_size:function(ptr:Ppointer; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):size_t; cdecl;
+_emalloc_large:function(size:size_t):pointer; cdecl;
+_emalloc_huge:function(size:size_t):pointer; cdecl;
+_efree_large:procedure(_para1:pointer; size:size_t); cdecl;
+_efree_huge:procedure(_para1:pointer; size:size_t); cdecl;
+__zend_malloc:function(len:size_t):pointer; cdecl;
+__zend_calloc:function(nmemb:size_t; len:size_t):pointer; cdecl;
+__zend_realloc:function(p:Ppointer; len:size_t):pointer; cdecl;
+zend_set_memory_limit:function(memory_limit:size_t):longint; cdecl;
+start_memory_manager:procedure; cdecl;
+shutdown_memory_manager:procedure(silent:longint; full_shutdown:longint); cdecl;
+is_zend_mm:function:longint; cdecl;
+zend_memory_usage:function(real_usage:longint):size_t; cdecl;
+zend_memory_peak_usage:function(real_usage:longint):size_t; cdecl;
+zend_mm_startup:function:P_zend_mm_heap; cdecl;
+zend_mm_shutdown:procedure(heap:P_zend_mm_heap; full_shutdown:longint; silent:longint); cdecl;
+_zend_mm_alloc:function(heap:P_zend_mm_heap; size:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer; cdecl;
+_zend_mm_free:procedure(heap:P_zend_mm_heap; p:Ppointer; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint); cdecl;
+_zend_mm_realloc:function(heap:P_zend_mm_heap; p:Ppointer; size:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer; cdecl;
+_zend_mm_realloc2:function(heap:P_zend_mm_heap; p:Ppointer; size:size_t; copy_size:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):pointer; cdecl;
+_zend_mm_block_size:function(heap:P_zend_mm_heap; p:Ppointer; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):size_t; cdecl;
+zend_mm_set_heap:function(new_heap:Pzend_mm_heap):P_zend_mm_heap; cdecl;
+zend_mm_get_heap:function:P_zend_mm_heap; cdecl;
+zend_mm_gc:function(heap:Pzend_mm_heap):size_t; cdecl;
+zend_mm_is_custom_heap:function(new_heap:Pzend_mm_heap):longint; cdecl;
+
+zend_mm_get_storage:function(heap:Pzend_mm_heap):P_zend_mm_storage; cdecl;
+zend_mm_startup_ex:function(handlers:Pzend_mm_handlers; data:Ppointer; data_size:size_t):P_zend_mm_heap; cdecl;
+
+
+ zend_stack_init:function(stack:Pzend_stack; size:longint):longint;
+ zend_stack_push:function(stack:Pzend_stack; element:Ppointer):longint;
+ zend_stack_top:function(stack:Pzend_stack):pointer;
+ zend_stack_del_top:function(stack:Pzend_stack):longint;
+ zend_stack_int_top:function(stack:Pzend_stack):longint;
+ zend_stack_is_empty:function(stack:Pzend_stack):longint;
+ zend_stack_destroy:function(stack:Pzend_stack):longint;
+ zend_stack_base:function(stack:Pzend_stack):pointer;
+ zend_stack_count:function(stack:Pzend_stack):longint;
+ zend_stack_apply:procedure(stack:Pzend_stack; _type:longint; apply_function:IEJG9458U9845Y45);
+ zend_stack_apply_with_argument:procedure(stack:Pzend_stack; _type:longint; apply_function:KD45T5H65HTHRTH; arg:Ppointer);
+ zend_stack_clean:procedure(stack:Pzend_stack; func:f584hj4i5hth; free_elements:zend_bool);
+
+ zend_std_get_static_method:function(ce:P_zend_class_entry; function_name_strval:P_zend_string; key:Pzval):P_zend_function; cdecl;
+ zend_std_get_static_property:function(ce:P_zend_class_entry; property_name:P_zend_string; silent:zend_bool):Pzval; cdecl;
+ zend_std_unset_static_property:function(ce:P_zend_class_entry; property_name:P_zend_string):zend_bool; cdecl;
+ zend_std_get_constructor:function(_object:Pzend_object):P_zend_function; cdecl;
+ zend_get_property_info:function(ce:P_zend_class_entry; member:P_zend_string; silent:longint):P_zend_property_info; cdecl;
+ zend_std_get_properties:function(_object:Pzval):PHashTable; cdecl;
+ zend_std_get_debug_info:function(_object:Pzval; is_temp:Plongint):PHashTable; cdecl;
+ zend_std_cast_object_tostring:function(readobj:Pzval; writeobj:Pzval; _type:longint):longint; cdecl;
+ zend_std_write_property:procedure(_object:Pzval; member:Pzval; value:Pzval; cache_slot:Ppointer); cdecl;
+ rebuild_object_properties:procedure(zobj:Pzend_object); cdecl;
+ zend_check_private:function(fbc:P_zend_function; ce:P_zend_class_entry; function_name:Pzend_string):longint; cdecl;
+ zend_check_protected:function(ce:P_zend_class_entry; scope:Pzend_class_entry):longint; cdecl;
+ zend_check_property_access:function(zobj:P_zend_object; prop_info_name:P_zend_string):longint; cdecl;
+ zend_get_call_trampoline_func:function(ce:P_zend_class_entry; method_name:P_zend_string; is_static:longint):P_zend_function; cdecl;
+ zend_ast_create_znode:function(node:Pznode):P_zend_ast; cdecl;
+ lex_scan:function(zendlval:Pzval):longint; cdecl;
+ zend_set_compiled_filename:function(new_compiled_filename:P_zend_string):P_zend_string; cdecl;
+ zend_restore_compiled_filename:procedure(original_compiled_filename:P_zend_string); cdecl;
+ zend_get_compiled_filename:function:P_zend_string; cdecl;
+ zend_get_compiled_lineno:function:longint; cdecl;
+ zend_get_scanned_file_offset:function:size_t; cdecl;
+ zend_get_compiled_variable_name:function(op_array:P_zend_op_array; _var:Cardinal):P_zend_string; cdecl;
+ get_unary_op:function(opcode:longint):unary_op_type; cdecl;
+ get_binary_op:function(opcode:longint):binary_op_type; cdecl;
+ do_bind_function:function(op_array:P_zend_op_array; opline:P_zend_op; function_table:PHashTable; compile_time:zend_bool):longint; cdecl;
+ do_bind_class:function(op_array:P_zend_op_array; opline:P_zend_op; class_table:PHashTable; compile_time:zend_bool):P_zend_class_entry; cdecl;
+ do_bind_inherited_class:function(op_array:P_zend_op_array; opline:P_zend_op; class_table:PHashTable; parent_ce:P_zend_class_entry; compile_time:zend_bool):P_zend_class_entry; cdecl;
+ zend_do_delayed_early_binding:procedure(op_array:Pzend_op_array); cdecl;
+ function_add_ref:procedure(_function:Pzend_function); cdecl;
+ compile_file:function(file_handle:Pzend_file_handle; _type:longint):P_zend_op_array; cdecl;
+ compile_string:function(source_string:Pzval; filename:zend_pchar):P_zend_op_array; cdecl;
+ compile_filename:function(_type:longint; filename:Pzval):P_zend_op_array; cdecl;
+ zend_try_exception_handler:procedure; cdecl;
+ zend_execute_scripts:function(_type:longint; retval:Pzval; file_count:longint):longint; cdecl varargs;
+ open_file_for_scanning:function(file_handle:Pzend_file_handle):longint; cdecl;
+ init_op_array:procedure(op_array:P_zend_op_array; _type:zend_uchar; initial_ops_size:longint); cdecl;
+ destroy_op_array:procedure(op_array:Pzend_op_array); cdecl;
+ zend_destroy_file_handle:procedure(file_handle:Pzend_file_handle); cdecl;
+ zend_cleanup_user_class_data:procedure(ce:Pzend_class_entry); cdecl;
+ zend_cleanup_internal_class_data:procedure(ce:Pzend_class_entry); cdecl;
+ zend_cleanup_internal_classes:procedure; cdecl;
+ zend_cleanup_op_array_data:procedure(op_array:Pzend_op_array); cdecl;
+ clean_non_persistent_function_full:function(zv:Pzval):longint; cdecl;
+ clean_non_persistent_class_full:function(zv:Pzval):longint; cdecl;
+ destroy_zend_function:procedure(_function:Pzend_function); cdecl;
+ zend_function_dtor:procedure(zv:Pzval); cdecl;
+ destroy_zend_class:procedure(zv:Pzval); cdecl;
+ zend_mangle_property_name:function(src1:zend_pchar; src1_length:size_t; src2:zend_pchar; src2_length:size_t; internal:longint):P_zend_string; cdecl;
+ zend_unmangle_property_name_ex:function(name:Pzend_string; class_name:PPchar; prop_name:PPchar; prop_len:Psize_t):longint; cdecl;
+ pass_two:function(op_array:Pzend_op_array):longint; cdecl;
+ zend_is_compiling:function:zend_bool; cdecl;
+ zend_make_compiled_string_description:function(name:zend_pchar):zend_pchar; cdecl;
+ zend_initialize_class_data:procedure(ce:Pzend_class_entry; nullify_handlers:zend_bool); cdecl;
+ zend_get_call_op:function(init_op:zend_uchar; fbc:Pzend_function):zend_uchar; cdecl;
+ zend_register_auto_global:function(name:Pzend_string; jit:zend_bool; auto_global_callback:zend_auto_global_callback):longint; cdecl;
+ zend_activate_auto_globals:procedure; cdecl;
+ zend_is_auto_global:function(name:Pzend_string):zend_bool; cdecl;
+ zend_is_auto_global_str:function(name:zend_pchar; len:size_t):zend_bool; cdecl;
+ zend_dirname:function(path:zend_pchar; len:size_t):size_t; cdecl;
+ zend_set_function_arg_flags:procedure(func:Pzend_function); cdecl;
+ zend_assert_valid_class_name:procedure(const_name:Pzend_string); cdecl;
+ zend_ast_create_zval_ex:function(zv:Pzval; attr:zend_ast_attr):P_zend_ast; cdecl;
+ zend_ast_create_ex:function(kind:zend_ast_kind; attr:zend_ast_attr):P_zend_ast; cdecl varargs;
+ zend_ast_create:function(kind:zend_ast_kind):P_zend_ast; cdecl varargs;
+ zend_ast_create_decl:function(kind:zend_ast_kind; flags:Cardinal; start_lineno:Cardinal; doc_comment:Pzend_string; name:Pzend_string; child0:Pzend_ast; child1:Pzend_ast; child2:Pzend_ast; child3:Pzend_ast):P_zend_ast; cdecl;
+ zend_ast_create_list:function(init_children:Cardinal; kind:zend_ast_kind):P_zend_ast; cdecl varargs;
+ zend_ast_list_add:function(list:Pzend_ast; op:Pzend_ast):P_zend_ast; cdecl;
+ zend_ast_evaluate:function(result:Pzval; ast:Pzend_ast; scope:Pzend_class_entry):longint; cdecl;
+ zend_ast_export:function(prefix:zend_pchar; ast:Pzend_ast; suffix:zend_pchar):P_zend_string; cdecl;
+ zend_ast_copy:function(ast:Pzend_ast):P_zend_ast; cdecl;
+ zend_ast_destroy:procedure(ast:Pzend_ast); cdecl;
+ zend_ast_destroy_and_free:procedure(ast:Pzend_ast); cdecl;
+ zend_ast_apply:procedure(ast:Pzend_ast; fn:zend_ast_apply_func); cdecl;
+ zend_stream_open:function(filename:zend_pchar; handle:Pzend_file_handle):longint; cdecl;
+ zend_stream_fixup:function(file_handle:Pzend_file_handle; buf:PPchar; len:Psize_t):longint; cdecl;
+ zend_file_handle_dtor:procedure(fh:Pzend_file_handle); cdecl;
+ zend_compare_file_handles:function(fh1:Pzend_file_handle; fh2:Pzend_file_handle):longint; cdecl;
+ zend_startup:function(utility_functions:Pzend_utility_functions; extensions:PPchar):longint; cdecl;
+ zend_shutdown:procedure; cdecl;
+ zend_register_standard_ini_entries:procedure; cdecl;
+ zend_post_startup:procedure; cdecl;
+ zend_set_utility_values:procedure(utility_values:Pzend_utility_values); cdecl;
+ _zend_bailout:procedure(filename:zend_pchar; lineno:uint); cdecl;
+ get_zend_version:function:zend_pchar; cdecl;
+ zend_make_printable_zval:function(expr:Pzval; expr_copy:Pzval):longint; cdecl;
+ zend_print_zval:function(expr:Pzval; indent:longint):size_t; cdecl;
+ zend_print_zval_ex:function(write_func:zend_write_func_t; expr:Pzval; indent:longint):size_t; cdecl;
+ zend_print_zval_r:procedure(expr:Pzval; indent:longint); cdecl;
+ zend_print_flat_zval_r:procedure(expr:Pzval); cdecl;
+ zend_print_zval_r_ex:procedure(write_func:zend_write_func_t; expr:Pzval; indent:longint); cdecl;
+ zend_output_debug_string:procedure(trigger_break:zend_bool; format:zend_pchar); cdecl varargs;
+ zend_activate:procedure; cdecl;
+ zend_deactivate:procedure; cdecl;
+ zend_call_destructors:procedure; cdecl;
+ zend_activate_modules:procedure; cdecl;
+ zend_deactivate_modules:procedure; cdecl;
+ zend_post_deactivate_modules:procedure; cdecl;
+ free_estring:procedure(str_p:PPchar); cdecl;
+ zend_error:procedure(_type:longint; format:zend_pchar); cdecl varargs;
+ zend_throw_error:procedure(exception_ce:Pzend_class_entry; format:zend_pchar); cdecl varargs;
+ zend_type_error:procedure(format:zend_pchar); cdecl varargs;
+ zend_internal_type_error:procedure(throw_exception:zend_bool; format:zend_pchar); cdecl varargs;
+ zenderror:procedure(error:zend_pchar); cdecl;
+ zend_message_dispatcher:procedure(message:zend_long; data:Ppointer); cdecl;
+ zend_get_configuration_directive:function(name:Pzend_string):Pzval; cdecl;
+ zend_next_free_module:function:longint cdecl;
+ zend_get_parameters:function(ht:longint; param_count:longint):longint; cdecl varargs;
+ zend_get_parameters_ex:function(param_count:longint):longint; cdecl varargs;
+ ZvalGetArgs: function(Count: Integer; Args: ppzval): Integer;cdecl varargs;
+ _zend_get_parameters_array_ex:function(param_count:longint; argument_array:Pzval):longint; cdecl;
+ zend_copy_parameters_array:function(param_count:longint; argument_array:Pzval):longint; cdecl;
+ zend_parse_parameters:function(num_args:longint; type_spec:zend_pchar):longint; cdecl varargs;
+ zend_parse_parameters_ex:function(flags:longint; num_args:longint; type_spec:zend_pchar):longint; cdecl varargs;
+ zend_parse_parameters_throw:function(num_args:longint; type_spec:zend_pchar):longint; cdecl varargs;
+ zend_zval_type_name:function(arg:Pzval):zend_pchar; cdecl;
+ zend_parse_method_parameters:function(num_args:longint; this_ptr:Pzval; type_spec:zend_pchar):longint; cdecl varargs;
+ zend_parse_method_parameters_ex:function(flags:longint; num_args:longint; this_ptr:Pzval; type_spec:zend_pchar):longint; cdecl varargs;
+ zend_parse_parameter:function(flags:longint; arg_num:longint; arg:Pzval; spec:zend_pchar):longint; cdecl varargs;
+ zend_register_functions:function(scope:Pzend_class_entry; functions:Pzend_function_entry; function_table:PHashTable; _type:longint):longint; cdecl;
+ zend_unregister_functions:procedure(functions:Pzend_function_entry; count:longint; function_table:PHashTable); cdecl;
+ zend_startup_module:function(module_entry:Pzend_module_entry):longint; cdecl;
+ zend_register_internal_module:function(module_entry:Pzend_module_entry):P_zend_module_entry; cdecl;
+ zend_register_module_ex:function(module:Pzend_module_entry):P_zend_module_entry; cdecl;
+ zend_startup_module_ex:function(module:Pzend_module_entry):longint; cdecl;
+ zend_startup_modules:function:longint cdecl;
+ zend_check_magic_method_implementation:procedure(ce:Pzend_class_entry; fptr:Pzend_function; error_type:longint); cdecl;
+ zend_register_internal_class:function(class_entry:Pzend_class_entry):P_zend_class_entry; cdecl;
+ zend_register_internal_class_ex:function(class_entry:Pzend_class_entry; parent_ce:Pzend_class_entry):P_zend_class_entry; cdecl;
+ zend_register_internal_interface:function(orig_class_entry:Pzend_class_entry):P_zend_class_entry; cdecl;
+ zend_class_implements:procedure(class_entry:Pzend_class_entry; num_interfaces:longint); cdecl varargs;
+ zend_register_class_alias_ex:function(name:zend_pchar; name_len:size_t; ce:Pzend_class_entry):longint; cdecl;
+ zend_disable_function:function(function_name:zend_pchar; function_name_length:size_t):longint; cdecl;
+ zend_disable_class:function(class_name:zend_pchar; class_name_length:size_t):longint; cdecl;
+ zend_is_callable_ex:function(callable:Pzval; _object:Pzend_object; check_flags:uint; callable_name:PP_zend_string; fcc:Pzend_fcall_info_cache; error:PPchar):zend_bool; cdecl;
+ zend_is_callable:function(callable:Pzval; check_flags:uint; callable_name:PP_zend_string):zend_bool; cdecl;
+ zend_make_callable:function(callable:Pzval; callable_name:PP_zend_string):zend_bool; cdecl;
+ zend_get_module_version:function(module_name:zend_pchar):zend_pchar; cdecl;
+ zend_get_module_started:function(module_name:zend_pchar):longint; cdecl;
+ zend_declare_property_ex:function(ce:Pzend_class_entry; name:Pzend_string; _property:Pzval; access_type:longint; doc_comment:Pzend_string):longint; cdecl;
+ zend_declare_property:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; _property:Pzval; access_type:longint):longint; cdecl;
+ zend_declare_property_null:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; access_type:longint):longint; cdecl;
+ zend_declare_property_bool:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_long; access_type:longint):longint; cdecl;
+ zend_declare_property_long:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_long; access_type:longint):longint; cdecl;
+ zend_declare_property_double:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:double; access_type:longint):longint; cdecl;
+ zend_declare_property_string:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_pchar; access_type:longint):longint; cdecl;
+ zend_declare_property_stringl:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_pchar; value_len:size_t; access_type:longint):longint; cdecl;
+ zend_declare_class_constant:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:Pzval):longint; cdecl;
+ zend_declare_class_constant_null:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t):longint; cdecl;
+ zend_declare_class_constant_long:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_long):longint; cdecl;
+ zend_declare_class_constant_bool:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_bool):longint; cdecl;
+ zend_declare_class_constant_double:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:double):longint; cdecl;
+ zend_declare_class_constant_stringl:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_pchar; value_length:size_t):longint; cdecl;
+ zend_declare_class_constant_string:function(ce:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_pchar):longint; cdecl;
+ zend_update_class_constants:function(class_type:Pzend_class_entry):longint; cdecl;
+ zend_update_property_ex:procedure(scope:Pzend_class_entry; _object:Pzval; name:Pzend_string; value:Pzval); cdecl;
+ zend_update_property:procedure(scope:Pzend_class_entry; _object:Pzval; name:zend_pchar; name_length:size_t; value:Pzval); cdecl;
+ zend_update_property_null:procedure(scope:Pzend_class_entry; _object:Pzval; name:zend_pchar; name_length:size_t); cdecl;
+ zend_update_property_bool:procedure(scope:Pzend_class_entry; _object:Pzval; name:zend_pchar; name_length:size_t; value:zend_long); cdecl;
+ zend_update_property_long:procedure(scope:Pzend_class_entry; _object:Pzval; name:zend_pchar; name_length:size_t; value:zend_long); cdecl;
+ zend_update_property_double:procedure(scope:Pzend_class_entry; _object:Pzval; name:zend_pchar; name_length:size_t; value:double); cdecl;
+ zend_update_property_str:procedure(scope:Pzend_class_entry; _object:Pzval; name:zend_pchar; name_length:size_t; value:Pzend_string); cdecl;
+ zend_update_property_string:procedure(scope:Pzend_class_entry; _object:Pzval; name:zend_pchar; name_length:size_t; value:zend_pchar); cdecl;
+ zend_update_property_stringl:procedure(scope:Pzend_class_entry; _object:Pzval; name:zend_pchar; name_length:size_t; value:zend_pchar; value_length:size_t); cdecl;
+ zend_update_static_property:function(scope:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:Pzval):longint; cdecl;
+ zend_update_static_property_null:function(scope:Pzend_class_entry; name:zend_pchar; name_length:size_t):longint; cdecl;
+ zend_update_static_property_bool:function(scope:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_long):longint; cdecl;
+ zend_update_static_property_long:function(scope:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_long):longint; cdecl;
+ zend_update_static_property_double:function(scope:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:double):longint; cdecl;
+ zend_update_static_property_string:function(scope:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_pchar):longint; cdecl;
+ zend_update_static_property_stringl:function(scope:Pzend_class_entry; name:zend_pchar; name_length:size_t; value:zend_pchar; value_length:size_t):longint; cdecl;
+ zend_read_property:function(scope:Pzend_class_entry; _object:Pzval; name:zend_pchar; name_length:size_t; silent:zend_bool; rv:Pzval):Pzval; cdecl;
+ zend_read_static_property:function(scope:Pzend_class_entry; name:zend_pchar; name_length:size_t; silent:zend_bool):Pzval; cdecl;
+ zend_get_type_by_const:function(_type:longint):zend_pchar; cdecl;
+ _array_init:function(arg:Pzval; size:Cardinal):longint; cdecl;
+ _object_init:function(arg:Pzval; __zend_filename:zend_pchar; __zend_lineno:uint):longint; cdecl;
+ _object_init_ex:function(arg:Pzval; ce:Pzend_class_entry; __zend_filename:zend_pchar; __zend_lineno:uint):longint; cdecl;
+ _object_and_properties_init:function(arg:Pzval; ce:Pzend_class_entry; properties:PHashTable; __zend_filename:zend_pchar; __zend_lineno:uint):longint; cdecl;
+ object_properties_init:procedure(_object:Pzend_object; class_type:Pzend_class_entry); cdecl;
+ object_properties_init_ex:procedure(_object:Pzend_object; properties:PHashTable); cdecl;
+ object_properties_load:procedure(_object:Pzend_object; properties:PHashTable); cdecl;
+ zend_merge_properties:procedure(obj:Pzval; properties:PHashTable); cdecl;
+ add_assoc_long_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; n:zend_long):longint; cdecl;
+ add_assoc_null_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t):longint; cdecl;
+ add_assoc_bool_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; b:longint):longint; cdecl;
+ add_assoc_resource_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; r:Pzend_resource):longint; cdecl;
+ add_assoc_double_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; d:double):longint; cdecl;
+ add_assoc_str_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; str:Pzend_string):longint; cdecl;
+ add_assoc_string_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; str:zend_pchar):longint; cdecl;
+ add_assoc_stringl_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; str:zend_pchar; length:size_t):longint; cdecl;
+ add_assoc_zval_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; value:Pzval):longint; cdecl;
+ add_index_long:function(arg:Pzval; idx:zend_ulong; n:zend_long):longint; cdecl;
+ add_index_null:function(arg:Pzval; idx:zend_ulong):longint; cdecl;
+ add_index_bool:function(arg:Pzval; idx:zend_ulong; b:longint):longint; cdecl;
+ add_index_resource:function(arg:Pzval; idx:zend_ulong; r:Pzend_resource):longint; cdecl;
+ add_index_double:function(arg:Pzval; idx:zend_ulong; d:double):longint; cdecl;
+ add_index_str:function(arg:Pzval; idx:zend_ulong; str:Pzend_string):longint; cdecl;
+ add_index_string:function(arg:Pzval; idx:zend_ulong; str:zend_pchar):longint; cdecl;
+ add_index_stringl:function(arg:Pzval; idx:zend_ulong; str:zend_pchar; length:size_t):longint; cdecl;
+ add_index_zval:function(arg:Pzval; index:zend_ulong; value:Pzval):longint; cdecl;
+ add_next_index_long:function(arg:Pzval; n:zend_long):longint; cdecl;
+ add_next_index_null:function(arg:Pzval):longint; cdecl;
+ add_next_index_bool:function(arg:Pzval; b:longint):longint; cdecl;
+ add_next_index_resource:function(arg:Pzval; r:Pzend_resource):longint; cdecl;
+ add_next_index_double:function(arg:Pzval; d:double):longint; cdecl;
+ add_next_index_str:function(arg:Pzval; str:Pzend_string):longint; cdecl;
+ add_next_index_string:function(arg:Pzval; str:zend_pchar):longint; cdecl;
+ add_next_index_stringl:function(arg:Pzval; str:zend_pchar; length:size_t):longint; cdecl;
+ add_next_index_zval:function(arg:Pzval; value:Pzval):longint; cdecl;
+ add_get_assoc_string_ex:function(arg:Pzval; key:zend_pchar; key_len:uint; str:zend_pchar):Pzval; cdecl;
+ add_get_assoc_stringl_ex:function(arg:Pzval; key:zend_pchar; key_len:uint; str:zend_pchar; length:size_t):Pzval; cdecl;
+ add_get_index_long:function(arg:Pzval; idx:zend_ulong; l:zend_long):Pzval; cdecl;
+ add_get_index_double:function(arg:Pzval; idx:zend_ulong; d:double):Pzval; cdecl;
+ add_get_index_str:function(arg:Pzval; index:zend_ulong; str:Pzend_string):Pzval; cdecl;
+ add_get_index_string:function(arg:Pzval; idx:zend_ulong; str:zend_pchar):Pzval; cdecl;
+ add_get_index_stringl:function(arg:Pzval; idx:zend_ulong; str:zend_pchar; length:size_t):Pzval; cdecl;
+ array_set_zval_key:function(ht:PHashTable; key:Pzval; value:Pzval):longint; cdecl;
+ add_property_long_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; l:zend_long):longint; cdecl;
+ add_property_null_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t):longint; cdecl;
+ add_property_bool_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; b:zend_long):longint; cdecl;
+ add_property_resource_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; r:Pzend_resource):longint; cdecl;
+ add_property_double_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; d:double):longint; cdecl;
+ add_property_str_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; str:Pzend_string):longint; cdecl;
+ add_property_string_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; str:zend_pchar):longint; cdecl;
+ add_property_stringl_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; str:zend_pchar; length:size_t):longint; cdecl;
+ add_property_zval_ex:function(arg:Pzval; key:zend_pchar; key_len:size_t; value:Pzval):longint; cdecl;
+ call_user_function:function(function_table:PHashTable; _object:Pzval; function_name:Pzval; retval_ptr:Pzval; param_count:Cardinal; params:Pzval):longint; cdecl;
+ call_user_function_ex:function(function_table:PHashTable; _object:Pzval; function_name:Pzval; retval_ptr:Pzval; param_count:Cardinal; params:Pzval; no_separation:longint; symbol_table:Pzend_array):longint; cdecl;
+ zend_fcall_info_init:function(callable:Pzval; check_flags:uint; fci:Pzend_fcall_info; fcc:Pzend_fcall_info_cache; callable_name:PP_zend_string; error:PPchar):longint; cdecl;
+ zend_fcall_info_args_clear:procedure(fci:Pzend_fcall_info; free_mem:longint); cdecl;
+ zend_fcall_info_args_save:procedure(fci:Pzend_fcall_info; param_count:Plongint; params:PPzval); cdecl;
+ zend_fcall_info_args_restore:procedure(fci:Pzend_fcall_info; param_count:longint; params:Pzval); cdecl;
+ zend_fcall_info_args:function(fci:Pzend_fcall_info; args:Pzval):longint; cdecl;
+ zend_fcall_info_args_ex:function(fci:Pzend_fcall_info; func:Pzend_function; args:Pzval):longint; cdecl;
+ zend_fcall_info_argp:function(fci:Pzend_fcall_info; argc:longint; argv:Pzval):longint; cdecl;
+ zend_fcall_info_argv:function(fci:Pzend_fcall_info; argc:longint; argv:pPChar):longint; cdecl;
+ zend_fcall_info_argn:function(fci:Pzend_fcall_info; argc:longint):longint; cdecl varargs;
+ zend_fcall_info_call:function(fci:Pzend_fcall_info; fcc:Pzend_fcall_info_cache; retval:Pzval; args:Pzval):longint; cdecl;
+ zend_call_function:function(fci:Pzend_fcall_info; fci_cache:Pzend_fcall_info_cache):longint; cdecl;
+ zend_set_hash_symbol:function(symbol:Pzval; name:zend_pchar; name_length:longint; is_ref:zend_bool; num_symbol_tables:longint; args:array of const):longint; cdecl;
+ zend_delete_global_variable:function(name:Pzend_string):longint; cdecl;
+ zend_rebuild_symbol_table:function:P_zend_array cdecl;
+ zend_attach_symbol_table:procedure(execute_data:P_zend_execute_data); cdecl;
+ zend_detach_symbol_table:procedure(execute_data:P_zend_execute_data); cdecl;
+ zend_set_local_var:function(name:Pzend_string; value:Pzval; force:longint):longint; cdecl;
+ zend_set_local_var_str:function(name:zend_pchar; len:size_t; value:Pzval; force:longint):longint; cdecl;
+ zend_find_alias_name:function(ce:Pzend_class_entry; name:Pzend_string):P_zend_string; cdecl;
+ zend_resolve_method_name:function(ce:Pzend_class_entry; f:Pzend_function):P_zend_string; cdecl;
+ zend_get_object_type:function(ce:Pzend_class_entry):zend_pchar; cdecl;
+ zend_wrong_paramers_count_error:procedure(num_args:longint; min_num_args:longint; max_num_args:longint); cdecl;
+ zend_wrong_paramer_type_error:procedure(num:longint; expected_type:Ppointer; arg:Pzval); cdecl;
+ zend_wrong_paramer_class_error:procedure(num:longint; name:zend_pchar; arg:Pzval); cdecl;
+ zend_wrong_callback_error:procedure(severity:longint; num:longint; error:zend_pchar); cdecl;
+ zend_parse_arg_class:function(arg:Pzval; pce:PP_zend_class_entry; num:longint; check_null:longint):longint; cdecl;
+ zend_parse_arg_bool_slow:function(arg:Pzval; dest:Pzend_bool):longint; cdecl;
+ zend_parse_arg_bool_weak:function(arg:Pzval; dest:Pzend_bool):longint; cdecl;
+ zend_parse_arg_long_slow:function(arg:Pzval; dest:Pzend_long):longint; cdecl;
+ zend_parse_arg_long_weak:function(arg:Pzval; dest:Pzend_long):longint; cdecl;
+ zend_parse_arg_long_cap_slow:function(arg:Pzval; dest:Pzend_long):longint; cdecl;
+ zend_parse_arg_long_cap_weak:function(arg:Pzval; dest:Pzend_long):longint; cdecl;
+ zend_parse_arg_double_slow:function(arg:Pzval; dest:Pdouble):longint; cdecl;
+ zend_parse_arg_double_weak:function(arg:Pzval; dest:Pdouble):longint; cdecl;
+ zend_parse_arg_str_slow:function(arg:Pzval; dest:PP_zend_string):longint; cdecl;
+ zend_parse_arg_str_weak:function(arg:Pzval; dest:PP_zend_string):longint; cdecl;
+ module_destructor:procedure(module:Pzend_module_entry); cdecl;
+ module_registry_request_startup:function(module:Pzend_module_entry):longint; cdecl;
+ module_registry_unload_temp:function(module:Pzend_module_entry):longint; cdecl;
+
+
+ sapi_startup:procedure( sf:p_sapi_module_struct); cdecl;
+ sapi_shutdown:procedure; cdecl;
+ sapi_activate:procedure; cdecl;
+ sapi_deactivate:procedure; cdecl;
+ sapi_initialize_empty_request:procedure; cdecl;
+ sapi_header_op:function(op:sapi_header_op_enum; arg:Ppointer):longint; cdecl;
+ sapi_add_header_ex:function(header_line:zend_pchar; header_line_len:size_t; duplicate:zend_bool; replace:zend_bool):longint; cdecl;
+ sapi_send_headers:function:longint; cdecl;
+ sapi_free_header:procedure(sapi_header:Psapi_header_struct); cdecl;
+ sapi_handle_post:procedure(arg:Ppointer); cdecl;
+ sapi_read_post_block:function(buffer:zend_pchar; buflen:size_t):size_t; cdecl;
+ sapi_register_post_entries:function(post_entry:Psapi_post_entry):longint; cdecl;
+ sapi_register_post_entry:function(post_entry:Psapi_post_entry):longint; cdecl;
+ sapi_unregister_post_entry:procedure(post_entry:Psapi_post_entry); cdecl;
+ sapi_register_default_post_reader:pointer;
+ sapi_register_treat_data:function(treat_data:pointer):longint;
+ sapi_register_input_filter:function(input_filter:pointer; input_filter_init:pointer):longint;
+ sapi_flush:function:longint; cdecl;
+ sapi_get_stat:function:P_zend_stat_t; cdecl;
+ sapi_getenv:function(name:zend_pchar; name_len:size_t):zend_pchar; cdecl;
+ sapi_get_default_content_type:function:zend_pchar; cdecl;
+ sapi_get_default_content_type_header:procedure(default_header:Psapi_header_struct); cdecl;
+ sapi_apply_default_charset:function(mimetype:PPchar; len:size_t):size_t; cdecl;
+ sapi_activate_headers_only:procedure; cdecl;
+ sapi_get_fd:function(fd:Plongint):longint; cdecl;
+ sapi_force_http_10:function:longint; cdecl;
+ sapi_get_target_uid:function(_para1:Puid_t):longint; cdecl;
+ sapi_get_target_gid:function(_para1:Pgid_t):longint; cdecl;
+ sapi_get_request_time:function:double; cdecl;
+ sapi_terminate_process:procedure; cdecl;
+_php_stream_alloc:function(ops:Pphp_stream_ops; _abstract:Ppointer; persistent_id:zend_pchar; mode:zend_pchar; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):P_php_stream; cdecl;
+_php_stream_tell:function(stream:Pphp_stream):zend_off_t; cdecl;
+_php_stream_read:function(stream:Pphp_stream; buf:zend_pchar; count:size_t):size_t; cdecl;
+_php_stream_write:function(stream:Pphp_stream; buf:zend_pchar; count:size_t):size_t; cdecl;
+_php_stream_fill_read_buffer:procedure(stream:Pphp_stream; size:size_t); cdecl;
+_php_stream_printf:function(stream:Pphp_stream; fmt:zend_pchar):size_t; cdecl varargs;
+_php_stream_eof:function(stream:Pphp_stream):longint; cdecl;
+_php_stream_seek:function(stream:Pphp_stream; offset:zend_off_t; whence:longint):longint; cdecl;
+_php_stream_free:function(stream:Pphp_stream; close_options:longint):longint; cdecl;
+php_stream_encloses:function(enclosing:Pphp_stream; enclosed:Pphp_stream):P_php_stream; cdecl;
+_php_stream_free_enclosed:function(stream_enclosed:Pphp_stream; close_options:longint):longint; cdecl;
+php_stream_from_persistent_id:function(persistent_id:zend_pchar; stream:PP_php_stream):longint; cdecl;
+php_file_le_stream:function:longint; cdecl;
+php_file_le_pstream:function:longint; cdecl;
+php_file_le_stream_filter:function:longint; cdecl;
+_php_stream_getc:function(stream:Pphp_stream):longint; cdecl;
+_php_stream_putc:function(stream:Pphp_stream; c:longint):longint; cdecl;
+_php_stream_flush:function(stream:Pphp_stream; closing:longint):longint; cdecl;
+_php_stream_get_line:function(stream:Pphp_stream; buf:zend_pchar; maxlen:size_t; returned_len:Psize_t):zend_pchar; cdecl;
+_php_stream_get_url_stream_wrappers_hash:function:PHashTable; cdecl;
+php_stream_get_url_stream_wrappers_hash_global:function:PHashTable; cdecl;
+_php_get_stream_filters_hash:function:PHashTable; cdecl;
+php_get_stream_filters_hash_global:function:PHashTable; cdecl;
+_php_stream_truncate_set_size:function(stream:Pphp_stream; newsize:size_t):longint; cdecl;
+_php_stream_make_seekable:function(origstream:Pphp_stream; newstream:PP_php_stream; flags:longint; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):longint; cdecl;
+_php_stream_copy_to_stream:function(src:Pphp_stream; dest:Pphp_stream; maxlen:size_t; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):size_t; cdecl;
+_php_stream_copy_to_mem:function(src:Pphp_stream; maxlen:size_t; persistent:longint; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):P_zend_string; cdecl;
+_php_stream_copy_to_stream_ex:function(src:Pphp_stream; dest:Pphp_stream; maxlen:size_t; len:Psize_t; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):longint; cdecl;
+_php_stream_passthru:function(src:Pphp_stream; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):size_t; cdecl;
+_php_stream_cast:function(stream:Pphp_stream; castas:longint; ret:Ppointer; show_err:longint):longint; cdecl;
+php_register_url_stream_wrapper:function(protocol:zend_pchar; wrapper:Pphp_stream_wrapper):longint; cdecl;
+php_unregister_url_stream_wrapper:function(protocol:zend_pchar):longint; cdecl;
+php_register_url_stream_wrapper_volatile:function(protocol:zend_pchar; wrapper:Pphp_stream_wrapper):longint; cdecl;
+php_unregister_url_stream_wrapper_volatile:function(protocol:zend_pchar):longint; cdecl;
+_php_stream_open_wrapper_ex:function(path:zend_pchar; mode:zend_pchar; options:longint; opened_path:PP_zend_string; context:Pphp_stream_context; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):P_php_stream; cdecl;
+php_stream_locate_url_wrapper:function(path:zend_pchar; path_for_open:PPchar; options:longint):P_php_stream_wrapper; cdecl;
+php_stream_locate_eol:function(stream:Pphp_stream; buf:Pzend_string):zend_pchar; cdecl;
+php_stream_get_record:function(stream:Pphp_stream; maxlen:size_t; delim:zend_pchar; delim_len:size_t):P_zend_string; cdecl;
+php_stream_wrapper_log_error:procedure(wrapper:Pphp_stream_wrapper; options:longint; fmt:zend_pchar); cdecl varargs;
+_php_stream_puts:function(stream:Pphp_stream; buf:zend_pchar):longint; cdecl;
+_php_stream_stat:function(stream:Pphp_stream; ssb:Pphp_stream_statbuf):longint; cdecl;
+_php_stream_stat_path:function(path:zend_pchar; flags:longint; ssb:Pphp_stream_statbuf; context:Pphp_stream_context):longint; cdecl;
+_php_stream_mkdir:function(path:zend_pchar; mode:longint; options:longint; context:Pphp_stream_context):longint; cdecl;
+_php_stream_rmdir:function(path:zend_pchar; options:longint; context:Pphp_stream_context):longint; cdecl;
+_php_stream_opendir:function(path:zend_pchar; options:longint; context:Pphp_stream_context; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):P_php_stream; cdecl;
+_php_stream_readdir:function(dirstream:Pphp_stream; ent:Pphp_stream_dirent):Pphp_stream_dirent; cdecl;
+php_stream_dirent_alphasort:function(a:PP_zend_string; b:PP_zend_string):longint; cdecl;
+php_stream_dirent_alphasortr:function(a:PP_zend_string; b:PP_zend_string):longint; cdecl;
+ _php_stream_scandir:function(dirname:zend_pchar; namelist:PPP_zend_string; flags:longint; context:Pphp_stream_context; compare:pointer):longint;
+_php_stream_set_option:function(stream:Pphp_stream; option:longint; value:longint; ptrparam:Ppointer):longint; cdecl;
+php_stream_context_free:procedure(context:Pphp_stream_context); cdecl;
+php_stream_context_alloc:function:P_php_stream_context; cdecl;
+php_stream_context_get_option:function(context:Pphp_stream_context; wrappername:zend_pchar; optionname:zend_pchar):Pzval; cdecl;
+php_stream_context_set_option:function(context:Pphp_stream_context; wrappername:zend_pchar; optionname:zend_pchar; optionvalue:Pzval):longint; cdecl;
+php_stream_notification_alloc:function:P_php_stream_notifier; cdecl;
+php_stream_notification_free:procedure(notifier:P_php_stream_notifier); cdecl;
+php_stream_notification_notify:procedure(context:Pphp_stream_context; notifycode:longint; severity:longint; xmsg:zend_pchar; xcode:longint;
+bytes_sofar:size_t; bytes_max:size_t; ptr:Ppointer);
+php_stream_context_set:function(stream:Pphp_stream; context:Pphp_stream_context):P_php_stream_context; cdecl;
+zend_llist_init:procedure(l:Pzend_llist; size:size_t; dtor:llist_dtor_func_t; persistent:byte); cdecl;
+zend_llist_add_element:procedure(l:Pzend_llist; element:Ppointer); cdecl;
+zend_llist_prepend_element:procedure(l:Pzend_llist; element:Ppointer); cdecl;
+zend_llist_del_element:procedure(l:Pzend_llist; element:Ppointer; compare:ERGERG43T4T545YH546);
+zend_llist_destroy:procedure(l:Pzend_llist); cdecl;
+zend_llist_clean:procedure(l:Pzend_llist); cdecl;
+zend_llist_remove_tail:procedure(l:Pzend_llist); cdecl;
+zend_llist_copy:procedure(dst:Pzend_llist; src:Pzend_llist); cdecl;
+zend_llist_apply:procedure(l:Pzend_llist; func:llist_apply_func_t); cdecl;
+zend_llist_apply_with_del:procedure(l:Pzend_llist; func:RGEKG34I9TI3434); cdecl;
+zend_llist_apply_with_argument:procedure(l:Pzend_llist; func:llist_apply_with_arg_func_t; arg:Ppointer); cdecl;
+zend_llist_apply_with_arguments:procedure(l:Pzend_llist; func:llist_apply_with_args_func_t; num_args:longint); cdecl varargs;
+zend_llist_count:function(l:Pzend_llist):size_t; cdecl;
+zend_llist_sort:procedure(l:Pzend_llist; comp_func:llist_compare_func_t); cdecl;
+zend_llist_get_first_ex:function(l:Pzend_llist; pos:Pzend_llist_position):pointer; cdecl;
+zend_llist_get_last_ex:function(l:Pzend_llist; pos:Pzend_llist_position):pointer; cdecl;
+zend_llist_get_next_ex:function(l:Pzend_llist; pos:Pzend_llist_position):pointer; cdecl;
+zend_llist_get_prev_ex:function(l:Pzend_llist; pos:Pzend_llist_position):pointer; cdecl;
+php_stream_filter_register_factory:function(filterpattern:zend_pchar; factory:Pphp_stream_filter_factory):longint; cdecl;
+php_stream_filter_unregister_factory:function(filterpattern:zend_pchar):longint; cdecl;
+php_stream_filter_register_factory_volatile:function(filterpattern:zend_pchar; factory:Pphp_stream_filter_factory):longint; cdecl;
+php_stream_filter_create:function(filtername:zend_pchar; filterparams:Pzval; persistent:longint):P_php_stream_filter; cdecl;
+_php_stream_filter_prepend:procedure(chain:Pphp_stream_filter_chain; filter:Pphp_stream_filter); cdecl;
+php_stream_filter_prepend_ex:function(chain:Pphp_stream_filter_chain; filter:Pphp_stream_filter):longint; cdecl;
+_php_stream_filter_append:procedure(chain:Pphp_stream_filter_chain; filter:Pphp_stream_filter); cdecl;
+php_stream_filter_append_ex:function(chain:Pphp_stream_filter_chain; filter:Pphp_stream_filter):longint; cdecl;
+_php_stream_filter_flush:function(filter:Pphp_stream_filter; finish:longint):longint; cdecl;
+php_stream_filter_remove:function(filter:Pphp_stream_filter; call_dtor:longint):P_php_stream_filter; cdecl;
+php_stream_filter_free:procedure(filter:Pphp_stream_filter); cdecl;
+_php_stream_filter_alloc:function(fops:Pphp_stream_filter_ops; _abstract:Ppointer; persistent:longint; __php_stream_call_depth:longint; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint):P_php_stream_filter; cdecl;
+php_stream_bucket_new:function(stream:Pphp_stream; buf:zend_pchar; buflen:size_t; own_buf:longint; buf_persistent:longint):P_php_stream_bucket; cdecl;
+php_stream_bucket_split:function(_in:Pphp_stream_bucket; left:PP_php_stream_bucket; right:PP_php_stream_bucket; length:size_t):longint; cdecl;
+php_stream_bucket_delref:procedure(bucket:Pphp_stream_bucket); cdecl;
+php_stream_bucket_prepend:procedure(brigade:Pphp_stream_bucket_brigade; bucket:Pphp_stream_bucket); cdecl;
+php_stream_bucket_append:procedure(brigade:Pphp_stream_bucket_brigade; bucket:Pphp_stream_bucket); cdecl;
+php_stream_bucket_unlink:procedure(bucket:Pphp_stream_bucket); cdecl;
+php_stream_bucket_make_writeable:function(bucket:Pphp_stream_bucket):P_php_stream_bucket; cdecl;
+zend_init_execute_data:procedure(execute_data:Pzend_execute_data; op_array:Pzend_op_array; return_value:Pzval); cdecl;
+zend_create_generator_execute_data:function(call:Pzend_execute_data; op_array:Pzend_op_array; return_value:Pzval):P_zend_execute_data; cdecl;
+zend_execute:procedure(op_array:Pzend_op_array; return_value:Pzval); cdecl;
+execute_ex:procedure(execute_data:Pzend_execute_data); cdecl;
+execute_internal:procedure(execute_data:Pzend_execute_data; return_value:Pzval); cdecl;
+zend_lookup_class:function(name:Pzend_string):P_zend_class_entry; cdecl;
+zend_lookup_class_ex:function(name:Pzend_string; key:Pzval; use_autoload:longint):P_zend_class_entry; cdecl;
+zend_get_called_scope:function(ex:Pzend_execute_data):P_zend_class_entry; cdecl;
+zend_get_this_object:function(ex:Pzend_execute_data):P_zend_object; cdecl;
+zend_eval_string:function(str:zend_pchar; retval_ptr:Pzval; string_name:zend_pchar):longint; cdecl;
+zend_eval_stringl:function(str:zend_pchar; str_len:size_t; retval_ptr:Pzval; string_name:zend_pchar):longint; cdecl;
+zend_eval_string_ex:function(str:zend_pchar; retval_ptr:pzval; string_name:zend_pchar; handle_exceptions:longint):longint; cdecl;
+zend_eval_stringl_ex:function(str:zend_pchar; str_len:size_t; retval_ptr:Pzval; string_name:zend_pchar; handle_exceptions:longint):longint; cdecl;
+zval_update_constant:function(pp:Pzval; inline_change:zend_bool):longint; cdecl;
+zval_update_constant_ex:function(pp:Pzval; inline_change:zend_bool; scope:Pzend_class_entry):longint; cdecl;
+zend_vm_stack_init:procedure; cdecl;
+zend_vm_stack_destroy:procedure; cdecl;
+zend_vm_stack_extend:function(size:size_t):pointer; cdecl;
+get_active_class_name:function(space:PPchar):zend_pchar; cdecl;
+get_active_function_name:function:zend_pchar; cdecl;
+zend_get_executed_filename:function:zend_pchar; cdecl;
+zend_get_executed_filename_ex:function:P_zend_string; cdecl;
+zend_get_executed_lineno:function:uint; cdecl;
+zend_is_executing:function:zend_bool; cdecl;
+zend_set_timeout:procedure(seconds:zend_long; reset_signals:longint); cdecl;
+zend_unset_timeout:procedure; cdecl;
+zend_timeout:procedure(dummy:longint); cdecl;
+zend_fetch_class:function(class_name:Pzend_string; fetch_type:longint):P_zend_class_entry; cdecl;
+zend_fetch_class_by_name:function(class_name:Pzend_string; key:Pzval; fetch_type:longint):P_zend_class_entry; cdecl;
+zend_fetch_dimension_by_zval:procedure(result:Pzval; container:Pzval; dim:Pzval); cdecl;
+zend_fetch_dimension_by_zval_is:procedure(result:Pzval; container:Pzval; dim:Pzval; dim_type:longint); cdecl;
+EX_VAR:function(execute_data_ptr:Pzend_execute_data; _var:uint32_t):Pzval; cdecl;
+zend_set_user_opcode_handler:function(opcode:zend_uchar; handler:user_opcode_handler_t):longint; cdecl;
+zend_get_user_opcode_handler:function(opcode:zend_uchar):user_opcode_handler_t; cdecl;
+zend_get_zval_ptr:function(op_type:longint; node:Pznode_op; execute_data:Pzend_execute_data; should_free:Pzend_free_op; _type:longint):Pzval; cdecl;
+zend_clean_and_cache_symbol_table:procedure(symbol_table:Pzend_array); cdecl;
+zend_objects_store_init:procedure(objects:Pzend_objects_store; init_size:uint32_t); cdecl;
+zend_objects_store_call_destructors:procedure(objects:Pzend_objects_store); cdecl;
+zend_objects_store_mark_destructed:procedure(objects:Pzend_objects_store); cdecl;
+zend_objects_store_destroy:procedure(objects:Pzend_objects_store); cdecl;
+zend_objects_store_put:procedure(_object:Pzend_object); cdecl;
+zend_objects_store_del:procedure(_object:Pzend_object); cdecl;
+zend_objects_store_free:procedure(_object:Pzend_object); cdecl;
+zend_object_store_set_object:procedure(zobject:Pzval; _object:Pzend_object); cdecl;
+zend_object_store_ctor_failed:procedure(_object:Pzend_object); cdecl;
+zend_objects_store_free_object_storage:procedure(objects:Pzend_objects_store); cdecl;
+zend_get_std_object_handlers:function:P_zend_object_handlers; cdecl;
+
+zend_ptr_stack_init:procedure(stack:Pzend_ptr_stack); cdecl;
+zend_ptr_stack_init_ex:procedure(stack:Pzend_ptr_stack; persistent:zend_bool); cdecl;
+zend_ptr_stack_n_push:procedure(stack:Pzend_ptr_stack; count:longint; args:array of const); cdecl;
+zend_ptr_stack_n_pop:procedure(stack:Pzend_ptr_stack; count:longint; args:array of const); cdecl;
+zend_ptr_stack_destroy:procedure(stack:Pzend_ptr_stack); cdecl;
+zend_ptr_stack_apply:procedure(stack:Pzend_ptr_stack; func:EWFG439EGRG45); cdecl;
+zend_ptr_stack_clean:procedure(stack:Pzend_ptr_stack; func:G5J90E4GK495Y4; free_elements:zend_bool); cdecl;
+zend_ptr_stack_num_elements:function(stack:Pzend_ptr_stack):longint; cdecl;
+zend_ini_startup:function:longint; cdecl;
+zend_ini_shutdown:function:longint; cdecl;
+zend_ini_global_shutdown:function:longint; cdecl;
+zend_ini_deactivate:function:longint; cdecl;
+zend_ini_dtor:procedure(ini_directives:PHashTable); cdecl;
+zend_copy_ini_directives:function:longint; cdecl;
+zend_ini_sort_entries:procedure; cdecl;
+zend_register_ini_entries:function(ini_entry:Pzend_ini_entry_def; module_number:longint):longint; cdecl;
+zend_unregister_ini_entries:procedure(module_number:longint); cdecl;
+zend_ini_refresh_caches:procedure(stage:longint); cdecl;
+zend_alter_ini_entry:function( name:zend_string; new_value:Pzend_string; modify_type:longint; stage:longint):longint; cdecl;
+zend_alter_ini_entry_ex:function(name:Pzend_string; new_value:Pzend_string; modify_type:longint; stage:longint; force_change:longint):longint; cdecl;
+zend_alter_ini_entry_chars:function(name:Pzend_string; value:Pchar; value_length:size_t; modify_type:longint; stage:longint):longint; cdecl;
+zend_alter_ini_entry_chars_ex:function(name:Pzend_string; value:Pchar; value_length:size_t; modify_type:longint; stage:longint; force_change:longint):longint; cdecl;
+zend_restore_ini_entry:function(name:Pzend_string; stage:longint):longint; cdecl;
+display_ini_entries:procedure(module:Pzend_module_entry); cdecl;
+zend_ini_long:function(name:Pchar; name_length:uint; orig:longint):zend_long; cdecl;
+zend_ini_double:function(name:Pchar; name_length:uint; orig:longint):double; cdecl;
+zend_ini_string:function(name:Pchar; name_length:uint; orig:longint):Pchar; cdecl;
+zend_ini_string_ex:function(name:Pchar; name_length:uint; orig:longint; exists:Pzend_bool):Pchar; cdecl;
+zend_ini_register_displayer:function(name:Pchar; name_length:uint; displayer:IEJORGJIERGE):longint; cdecl;
+zend_parse_ini_file:function(fh:Pzend_file_handle; unbuffered_errors:zend_bool; scanner_mode:longint; ini_parser_cb:zend_ini_parser_cb_t; arg:Ppointer):longint; cdecl;
+zend_parse_ini_string:function(str:Pchar; unbuffered_errors:zend_bool; scanner_mode:longint; ini_parser_cb:zend_ini_parser_cb_t; arg:Ppointer):longint; cdecl;
+
+
+
+_zend_hash_init:procedure(ht:PHashTable; nSize:uint32_t; pDestructor:dtor_func_t; persistent:zend_bool; __zend_filename:Pchar; __zend_lineno:uint); cdecl;
+_zend_hash_init_ex:procedure(ht:PHashTable; nSize:uint32_t; pDestructor:dtor_func_t; persistent:zend_bool; bApplyProtection:zend_bool; __zend_filename:Pchar; __zend_lineno:uint); cdecl;
+zend_hash_destroy:procedure(ht:PHashTable); cdecl;
+zend_hash_clean:procedure(ht:PHashTable); cdecl;
+zend_hash_real_init:procedure(ht:PHashTable; _packed:zend_bool); cdecl;
+zend_hash_packed_to_hash:procedure(ht:PHashTable); cdecl;
+zend_hash_to_packed:procedure(ht:PHashTable); cdecl;
+zend_hash_extend:procedure(ht:PHashTable; nSize:uint32_t; _packed:zend_bool); cdecl;
+_zend_hash_add_or_update:function(ht:PHashTable; key:Pzend_string; pData:Pzval; flag:uint32_t; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_update:function(ht:PHashTable; key:Pzend_string; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_update_ind:function(ht:PHashTable; key:Cardinal; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_add:function(ht:PHashTable; key:Pzend_string; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_add_new:function(ht:PHashTable; key:Pzend_string; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_str_add_or_update:function(ht:PHashTable; key:Pchar; len:size_t; pData:Pzval; flag:uint32_t; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_str_update:function(ht:PHashTable; key:Pchar; len:size_t; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_str_update_ind:function(ht:PHashTable; key:Pchar; len:size_t; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_str_add:function(ht:PHashTable; key:Pchar; len:size_t; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_str_add_new:function(ht:PHashTable; key:Pchar; len:size_t; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_index_add_or_update:function(ht:PHashTable; h:zend_ulong; pData:Pzval; flag:uint32_t):Pzval; cdecl;
+_zend_hash_index_add:function(ht:PHashTable; h:zend_ulong; pData:Pzval):Pzval; cdecl;
+_zend_hash_index_add_new:function(ht:PHashTable; h:zend_ulong; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_index_update:function(ht:PHashTable; h:zend_ulong; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_next_index_insert:function(ht:PHashTable; pData:Pzval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+_zend_hash_next_index_insert_new:function(ht:PHashTable; pData:zval; __zend_filename:Pchar; __zend_lineno:uint):Pzval; cdecl;
+zend_hash_index_add_empty_element:function(ht:PHashTable; h:zend_ulong):Pzval; cdecl;
+zend_hash_add_empty_element:function(ht:PHashTable; key:Pzend_string):Pzval; cdecl;
+zend_hash_str_add_empty_element:function(ht:PHashTable; key:Pchar; len:size_t):Pzval; cdecl;
+zend_hash_graceful_destroy:procedure(ht:PHashTable); cdecl;
+zend_hash_graceful_reverse_destroy:procedure(ht:PHashTable); cdecl;
+zend_hash_apply:procedure(ht:PHashTable; apply_func:Tapply_func_t); cdecl;
+zend_hash_apply_with_argument:procedure(ht:PHashTable; apply_func:Tapply_func_arg_t; para3:pointer); cdecl;
+zend_hash_apply_with_arguments:procedure(ht:PHashTable; apply_func:Tapply_func_args_t; para3:longint; args:array of const); cdecl;
+zend_hash_reverse_apply:procedure(ht:PHashTable; apply_func:Tapply_func_t); cdecl;
+zend_hash_del:function(ht:PHashTable; key:Pzend_string):longint; cdecl;
+zend_hash_del_ind:function(ht:PHashTable; key:Pzend_string):longint; cdecl;
+zend_hash_str_del:function(ht:PHashTable; key:Pchar; len:size_t):longint; cdecl;
+zend_hash_str_del_ind:function(ht:PHashTable; key:Pchar; len:size_t):longint; cdecl;
+zend_hash_index_del:function(ht:PHashTable; h:zend_ulong):longint; cdecl;
+zend_hash_del_bucket:procedure(ht:PHashTable; p:PBucket); cdecl;
+zend_hash_find:function(ht:PHashTable; key:Pzend_string):Pzval; cdecl;
+zend_hash_str_find:function(ht:PHashTable; key:Pchar; len:size_t):Pzval; cdecl;
+
+zend_hash_index_findZval:function( ht:pzval; h:zend_ulong):Pzval; cdecl;
+zend_symtable_findTest:function( ht:pzval; key:pzend_string):Pzval; cdecl;
+zend_hash_index_existsZval:function( ht:pzval; h:zend_ulong):zend_bool; cdecl;
+
+
+zend_hash_index_find:function(ht:PHashTable; h:zend_ulong):Pzval; cdecl;
+
+zend_hash_exists:function(ht:PHashTable; key:Pzend_string):zend_bool; cdecl;
+zend_hash_str_exists:function(ht:PHashTable; str:Pchar; len:size_t):zend_bool; cdecl;
+zend_hash_index_exists:function(ht:PHashTable; h:zend_ulong):zend_bool; cdecl;
+zend_hash_has_more_elements_ex:function(ht,pos : longint) : longint; cdecl;
+zend_hash_move_forward_ex:function(ht:PHashTable; pos:PHashPosition):longint; cdecl;
+zend_hash_move_backwards_ex:function(ht:PHashTable; pos:PHashPosition):longint; cdecl;
+zend_hash_get_current_key_ex:function(ht:PHashTable; str_index:PPzend_string; num_index:P_zend_ulong; pos:PHashPosition):longint; cdecl;
+zend_hash_get_current_key_zval_ex:procedure(ht:PHashTable; key:Pzval; pos:PHashPosition); cdecl;
+zend_hash_get_current_key_type_ex:function(ht:PHashTable; pos:PHashPosition):longint; cdecl;
+zend_hash_get_current_data_ex:function(ht:PHashTable; pos:PHashPosition):Pzval; cdecl;
+zend_hash_internal_pointer_reset_ex:procedure(ht:PHashTable; pos:PHashPosition); cdecl;
+zend_hash_internal_pointer_end_ex:procedure(ht:PHashTable; pos:PHashPosition); cdecl;
+zend_hash_copy:procedure(target:PHashTable; source:PHashTable; pCopyConstructor:copy_ctor_func_t; tmp: pointer; size: uint); cdecl;
+_zend_hash_merge:procedure(target:PHashTable; source:PHashTable; pCopyConstructor:copy_ctor_func_t; size:uint; overwrite:zend_bool); cdecl;
+zend_hash_merge_ex:procedure(target:PHashTable; source:PHashTable; pCopyConstructor:copy_ctor_func_t; pMergeSource:Tmerge_checker_func_t; pParam:Ppointer); cdecl;
+zend_hash_bucket_swap:procedure(p:PBucket; q:PBucket); cdecl;
+zend_hash_bucket_renum_swap:procedure(p:PBucket; q:PBucket); cdecl;
+zend_hash_bucket_packed_swap:procedure(p:PBucket; q:PBucket); cdecl;
+zend_hash_compare:function(ht1:PHashTable; ht2:PHashTable; compar:compare_func_t; ordered:zend_bool):longint; cdecl;
+zend_hash_sort_ex:function(ht:PHashTable; sort_func:sort_func_t; compare_func:compare_func_t; renumber:zend_bool; TSRMLS_DC: pointer):longint; cdecl;
+zend_hash_minmax:function(ht:PHashTable; compar:compare_func_t; flag:uint32_t):Pzval; cdecl;
+zend_hash_rehash:function(ht:PHashTable):longint; cdecl;
+zend_array_count:function(ht:PHashTable):uint32_t; cdecl;
+zend_array_dup:function(source:PHashTable):PHashTable; cdecl;
+zend_array_destroy:procedure(ht:PHashTable); cdecl;
+zend_symtable_clean:procedure(ht:PHashTable); cdecl;
+_zend_handle_numeric_str_ex:function(key:Pchar; length:size_t; idx:P_zend_ulong):longint; cdecl;
+zend_hash_iterator_add:function(ht:PHashTable; pos:HashPosition):uint32_t; cdecl;
+zend_hash_iterator_pos:function(idx:uint32_t; ht:PHashTable):HashPosition; cdecl;
+zend_hash_iterator_pos_ex:function(idx:uint32_t; _array:Pzval):HashPosition; cdecl;
+zend_hash_iterator_del:procedure(idx:uint32_t); cdecl;
+zend_hash_iterators_lower_pos:function(ht:PHashTable; start:HashPosition):HashPosition; cdecl;
+_zend_hash_iterators_update:procedure(ht:PHashTable; from:HashPosition; _to:HashPosition); cdecl;
+
+//tsrm_error:function(level:longint; format:zend_pchar; args:array of const):longint; cdecl;
+//zend_mm_set_custom_handlers(heap:Pzend_mm_heap; _malloc:PEWKGERGJ945YG45; _free:procedure (_para1:pointer); var _realloc:procedure :procedure(_para1:pointer; _para2:size_t)); cdecl;
+//zend_mm_get_custom_handlers(heap:Pzend_mm_heap; _malloc:PPOERGJOERJGIERGHRE; _free:Pprocedure (_para1:pointer); var _realloc:Pprocedure :procedure(_para1:pointer; _para2:size_t)); cdecl;
+//zend_mm_set_custom_debug_handlers(heap:Pzend_mm_heap; var _malloc:procedure (_para1:size_t; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint); _free:procedure :procedure(_para1:pointer; __zend_filename:zend_pchar; __zend_lineno:uint; __zend_orig_filename:zend_pchar; __zend_orig_lineno:uint); _realloc:PERG4JG09E84GJ8945H45H); cdecl;
+//zend_object_create_proxy:function(_object:Pzval; member:Pzval):P_zend_object; cdecl;
+zend_check_internal_arg_type:procedure(zf:P_zend_function; arg_num:uint32_t; arg:Pzval); cdecl;
+//zend_check_arg_type:function(zf:Pzend_function; arg_num:uint32_t; arg:Pzval; default_value:Pzval; cache_slot:Ppointer):longint; cdecl;
+//zend_check_missing_arg:procedure(execute_data:Pzend_execute_data; arg_num:uint32_t; cache_slot:Ppointer); cdecl;
+
+
+add_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+sub_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+mul_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+pow_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+div_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+mod_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+boolean_xor_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+boolean_not_function:function(result:Pzval; op1:Pzval):longint; cdecl;
+bitwise_not_function:function(result:Pzval; op1:Pzval):longint; cdecl;
+bitwise_or_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+bitwise_and_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+bitwise_xor_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+shift_left_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+shift_right_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+concat_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+zend_is_identical:function(op1:Pzval; op2:Pzval):longint; cdecl;
+is_equal_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+is_identical_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+is_not_identical_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+is_not_equal_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+is_smaller_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+is_smaller_or_equal_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+instanceof_function_ex:function(instance_ce:Pzend_class_entry; ce:Pzend_class_entry; interfaces_only:zend_bool):zend_bool; cdecl;
+instanceof_function:function(instance_ce:Pzend_class_entry; ce:Pzend_class_entry):zend_bool; cdecl;
+_is_numeric_string_ex:function(str:Pchar; length:size_t; lval:Pzend_long; dval:Pdouble; allow_errors:longint; oflow_info:Plongint):zend_uchar; cdecl;
+zend_memnstr_ex:function(haystack:Pchar; needle:Pchar; needle_len:size_t; _end:Pchar):Pchar; cdecl;
+zend_memnrstr_ex:function(haystack:Pchar; needle:Pchar; needle_len:size_t; _end:Pchar):Pchar; cdecl;
+zend_dval_to_lval_slow:function(d:double):zend_long; cdecl;
+is_numeric_str_function:function(str:Pzend_string; lval:Pzend_long; dval:Pdouble):zend_uchar; cdecl;
+increment_function:function(op1:Pzval):longint; cdecl;
+decrement_function:function(op2:Pzval):longint; cdecl;
+convert_scalar_to_number:procedure(op:Pzval); cdecl;
+_convert_to_cstring:procedure(op:Pzval; __zend_filename:Pchar; __zend_lineno:uint); cdecl;
+_convert_to_string:procedure(op:Pzval; __zend_filename:Pchar; __zend_lineno:uint); cdecl;
+convert_to_long:procedure(op:Pzval); cdecl;
+convert_to_double:procedure(op:Pzval); cdecl;
+convert_to_long_base:procedure(op:Pzval; base:longint); cdecl;
+convert_to_null:procedure(op:Pzval); cdecl;
+convert_to_boolean:procedure(op:Pzval); cdecl;
+convert_to_array:procedure(op:Pzval); cdecl;
+convert_to_object:procedure(op:Pzval); cdecl;
+multi_convert_to_long_ex:procedure(argc:longint; args:array of const); cdecl;
+multi_convert_to_double_ex:procedure(argc:longint; args:array of const); cdecl;
+multi_convert_to_string_ex:procedure(argc:longint; args:array of const); cdecl;
+_zval_get_long_func:function(op:Pzval):zend_long; cdecl;
+_zval_get_double_func:function(op:Pzval):double; cdecl;
+_zval_get_string_func:function(op:Pzval):Pzend_string; cdecl;
+zend_is_true:function(op:Pzval):longint; cdecl;
+zend_object_is_true:function(op:Pzval):longint; cdecl;
+compare_function:function(result:Pzval; op1:Pzval; op2:Pzval):longint; cdecl;
+numeric_compare_function:function(op1:Pzval; op2:Pzval):longint; cdecl;
+string_compare_function_ex:function(op1:Pzval; op2:Pzval; case_insensitive:zend_bool):longint; cdecl;
+string_compare_function:function(op1:Pzval; op2:Pzval):longint; cdecl;
+string_case_compare_function:function(op1:Pzval; op2:Pzval):longint; cdecl;
+string_locale_compare_function:function(op1:Pzval; op2:Pzval):longint; cdecl;
+zend_str_tolower:procedure(str:Pchar; length:size_t); cdecl;
+zend_str_tolower_copy:function(dest:Pchar; source:Pchar; length:size_t):Pchar; cdecl;
+zend_str_tolower_dup:function(source:Pchar; length:size_t):Pchar; cdecl;
+zend_str_tolower_dup_ex:function(source:Pchar; length:size_t):Pchar; cdecl;
+zend_string_tolower:function(str:Pzend_string):Pzend_string; cdecl;
+zend_binary_zval_strcmp:function(s1:Pzval; s2:Pzval):longint; cdecl;
+zend_binary_zval_strncmp:function(s1:Pzval; s2:Pzval; s3:Pzval):longint; cdecl;
+zend_binary_zval_strcasecmp:function(s1:Pzval; s2:Pzval):longint; cdecl;
+zend_binary_zval_strncasecmp:function(s1:Pzval; s2:Pzval; s3:Pzval):longint; cdecl;
+zend_binary_strcmp:function(s1:Pchar; len1:size_t; s2:Pchar; len2:size_t):longint; cdecl;
+zend_binary_strncmp:function(s1:Pchar; len1:size_t; s2:Pchar; len2:size_t; length:size_t):longint; cdecl;
+zend_binary_strcasecmp:function(s1:Pchar; len1:size_t; s2:Pchar; len2:size_t):longint; cdecl;
+zend_binary_strncasecmp:function(s1:Pchar; len1:size_t; s2:Pchar; len2:size_t; length:size_t):longint; cdecl;
+zend_binary_strcasecmp_l:function(s1:Pchar; len1:size_t; s2:Pchar; len2:size_t):longint; cdecl;
+zend_binary_strncasecmp_l:function(s1:Pchar; len1:size_t; s2:Pchar; len2:size_t; length:size_t):longint; cdecl;
+zendi_smart_strcmp:function(s1:Pzend_string; s2:Pzend_string):zend_long; cdecl;
+zend_compare_symbol_tables:function(ht1:PHashTable; ht2:PHashTable):longint; cdecl;
+zend_compare_arrays:function(a1:Pzval; a2:Pzval):longint; cdecl;
+zend_compare_objects:function(o1:Pzval; o2:Pzval):longint; cdecl;
+zend_atoi:function(str:Pchar; str_len:longint):longint; cdecl;
+zend_atol:function(str:Pchar; str_len:longint):zend_long; cdecl;
+zend_locale_sprintf_double:procedure(op:Pzval; __zend_filename:Pchar; __zend_lineno:uint); cdecl;
+zend_update_current_locale:procedure; cdecl;
+zend_long_to_str:function(num:zend_long):Pzend_string; cdecl;
+
+ZvalGetPChar:function(z:pzval):zend_pchar; cdecl;
+
+read_property22:function(elem:pzval; name:zend_pchar; flags:Integer):pzval; cdecl;
+isset_property:function(_object:pzval; property_name:zend_pchar):Integer; cdecl;
+
+
+
+lookup_class_ce:function(ce:pzend_class_entry; property_name:zend_pchar; property_length:SIZE_T):pzend_class_entry; cdecl;
+class_exists:function(class_name:zend_pchar):Integer; cdecl;
+class_exists2:function(class_name:zend_pchar):Integer; cdecl;
+update_property_zval:function(_object:pzval; property_name:zend_pchar; value:pzval):integer; cdecl;
+__create_php_object:function(classname:pzend_string; return_value:pzval; __params:pzval; argc:Integer):pzend_class_entry; cdecl;
+
+
+
+__call_function:procedure(func:pzval; argv:pzval; argc:integer);cdecl;
+safe_emalloc2:function(nmemb:size_t; size:size_t; offset:size_t):Pointer;cdecl;
+
+ZvalEmalloc:function(nmemb:size_t):pzval;cdecl;
+
+pZVAL_NEW_REF:procedure(arg1, arg2:pointer);cdecl;
+
+NewPzval:function(z:pzval):pzval;cdecl;
+
+CreateCll:function(result:pzval; class_name:zend_pchar; Self:integer):pzval;cdecl;
+
+PHPInitSetValue:procedure(name, new_value:zend_pchar; modify_type, stage:integer);cdecl;
+
+implementation
+
+
+end.
diff --git a/Source/packages/php4delphi Delphi 10 Seattle.groupproj.local b/Source/packages/php4delphi Delphi 10 Seattle.groupproj.local
deleted file mode 100644
index 744d98c..0000000
--- a/Source/packages/php4delphi Delphi 10 Seattle.groupproj.local
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
- 1899.12.30 00:00:00.000.717,C:\Users\Andrew\Documents\GitHub\php4delphi\ProjectGroup1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj
- 1899.12.30 00:00:00.000.086,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj
- 1899.12.30 00:00:00.000.120,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10.1 Berlin.groupproj
- 1899.12.30 00:00:00.000.047,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10 Seattle.groupproj
-
-
-
-
-
diff --git a/Source/packages/php4delphi Delphi 10.1 Berlin.groupproj.local b/Source/packages/php4delphi Delphi 10.1 Berlin.groupproj.local
deleted file mode 100644
index 9b88d43..0000000
--- a/Source/packages/php4delphi Delphi 10.1 Berlin.groupproj.local
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- 1899.12.30 00:00:00.000.086,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj
- 1899.12.30 00:00:00.000.717,C:\Users\Andrew\Documents\GitHub\php4delphi\ProjectGroup1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj
- 1899.12.30 00:00:00.000.047,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10 Seattle.groupproj
-
-
-
-
-
diff --git a/Source/packages/php4delphi Delphi 10.2 Tokyo.groupproj.local b/Source/packages/php4delphi Delphi 10.2 Tokyo.groupproj.local
deleted file mode 100644
index 35948ce..0000000
--- a/Source/packages/php4delphi Delphi 10.2 Tokyo.groupproj.local
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- 1899.12.30 00:00:00.000.086,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj
- 1899.12.30 00:00:00.000.717,C:\Users\Andrew\Documents\GitHub\php4delphi\ProjectGroup1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj
- 1899.12.30 00:00:00.000.047,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10 Seattle.groupproj
- 2019.03.04 22:31:53.120,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:03.207,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj
-
-
-
-
-
diff --git a/Source/packages/php4delphi Delphi 10.3 Rio.groupproj b/Source/packages/php4delphi Delphi 10.3 Rio.groupproj
new file mode 100644
index 0000000..ba7a357
--- /dev/null
+++ b/Source/packages/php4delphi Delphi 10.3 Rio.groupproj
@@ -0,0 +1,48 @@
+
+
+ {D3946CCE-C89C-4195-8C9B-ACC8FEE61B03}
+
+
+
+
+
+
+
+
+
+
+ Default.Personality.12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/packages/php4delphi Delphi 10.tvsconfig b/Source/packages/php4delphi Delphi 10.tvsconfig
new file mode 100644
index 0000000..d430780
--- /dev/null
+++ b/Source/packages/php4delphi Delphi 10.tvsconfig
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/Source/packages/php4delphi Delphi 2010.groupproj.local b/Source/packages/php4delphi Delphi 2010.groupproj.local
deleted file mode 100644
index ce4c03c..0000000
--- a/Source/packages/php4delphi Delphi 2010.groupproj.local
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
- 1899.12.30 00:00:00.000.047,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10 Seattle.groupproj
- 1899.12.30 00:00:00.000.086,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj
- 1899.12.30 00:00:00.000.717,C:\Users\Andrew\Documents\GitHub\php4delphi\ProjectGroup1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj
- 2019.03.04 22:31:53.120,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:03.207,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:09.673,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.2 Tokyo.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj
- 2019.03.04 22:32:17.131,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.2 Tokyo.groupproj
- 2019.03.04 22:32:22.720,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE2.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE1.groupproj
- 2019.03.04 22:32:29.457,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE3.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE2.groupproj
- 2019.03.04 22:32:34.993,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE4.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE3.groupproj
- 2019.03.04 22:32:41.465,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE5.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE4.groupproj
- 2019.03.04 22:32:46.928,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE6.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE5.groupproj
- 2019.03.04 22:32:52.359,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE7.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE6.groupproj
- 2019.03.04 22:32:58.134,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE8.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE7.groupproj
- 2019.03.04 22:33:22.418,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 2011.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE8.groupproj
-
-
-
-
-
diff --git a/Source/packages/php4delphi Delphi 2011.groupproj.local b/Source/packages/php4delphi Delphi 2011.groupproj.local
deleted file mode 100644
index c2c593f..0000000
--- a/Source/packages/php4delphi Delphi 2011.groupproj.local
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
- 1899.12.30 00:00:00.000.047,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10 Seattle.groupproj
- 1899.12.30 00:00:00.000.717,C:\Users\Andrew\Documents\GitHub\php4delphi\ProjectGroup1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj
- 1899.12.30 00:00:00.000.086,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj
- 2019.03.04 22:31:53.120,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:03.207,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:09.673,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.2 Tokyo.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj
- 2019.03.04 22:32:17.131,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.2 Tokyo.groupproj
- 2019.03.04 22:32:22.720,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE2.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE1.groupproj
- 2019.03.04 22:32:29.457,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE3.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE2.groupproj
- 2019.03.04 22:32:34.993,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE4.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE3.groupproj
- 2019.03.04 22:32:41.465,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE5.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE4.groupproj
- 2019.03.04 22:32:46.928,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE6.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE5.groupproj
- 2019.03.04 22:32:52.359,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE7.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE6.groupproj
- 2019.03.04 22:32:58.134,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE8.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE7.groupproj
-
-
-
-
-
diff --git a/Source/packages/php4delphi Delphi 5.bpg b/Source/packages/php4delphi Delphi 5.bpg
new file mode 100644
index 0000000..aa42dc7
--- /dev/null
+++ b/Source/packages/php4delphi Delphi 5.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = php4DelphiR5.bpl php4DelphiD5.bpl
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+php4DelphiR5.bpl: ..\php4DelphiR5.dpk
+ $(DCC)
+
+php4DelphiD5.bpl: ..\php4DelphiD5.dpk
+ $(DCC)
+
+
diff --git a/Source/packages/php4delphi Delphi 7.bpg b/Source/packages/php4delphi Delphi 7.bpg
new file mode 100644
index 0000000..dce47b4
--- /dev/null
+++ b/Source/packages/php4delphi Delphi 7.bpg
@@ -0,0 +1,23 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = php4DelphiR7.bpl php4DelphiD7.bpl
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+php4DelphiR7.bpl: ..\php4DelphiR7.dpk
+ $(DCC)
+
+php4DelphiD7.bpl: ..\php4DelphiD7.dpk
+ $(DCC)
+
+
diff --git a/Source/packages/php4delphi Delphi XE1.groupproj.local b/Source/packages/php4delphi Delphi XE1.groupproj.local
deleted file mode 100644
index 730de94..0000000
--- a/Source/packages/php4delphi Delphi XE1.groupproj.local
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
- 1899.12.30 00:00:00.000.086,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj
- 1899.12.30 00:00:00.000.717,C:\Users\Andrew\Documents\GitHub\php4delphi\ProjectGroup1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj
- 1899.12.30 00:00:00.000.047,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10 Seattle.groupproj
- 2019.03.04 22:31:53.120,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:03.207,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:09.673,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.2 Tokyo.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj
-
-
-
-
-
diff --git a/Source/packages/php4delphi Delphi XE2.groupproj.local b/Source/packages/php4delphi Delphi XE2.groupproj.local
deleted file mode 100644
index c62f4a8..0000000
--- a/Source/packages/php4delphi Delphi XE2.groupproj.local
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- 1899.12.30 00:00:00.000.086,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj
- 1899.12.30 00:00:00.000.047,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10 Seattle.groupproj
- 1899.12.30 00:00:00.000.717,C:\Users\Andrew\Documents\GitHub\php4delphi\ProjectGroup1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj
- 2019.03.04 22:31:53.120,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:03.207,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:09.673,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.2 Tokyo.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj
- 2019.03.04 22:32:17.131,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.2 Tokyo.groupproj
-
-
-
-
-
diff --git a/Source/packages/php4delphi Delphi XE3.groupproj.local b/Source/packages/php4delphi Delphi XE3.groupproj.local
deleted file mode 100644
index 5380455..0000000
--- a/Source/packages/php4delphi Delphi XE3.groupproj.local
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
- 1899.12.30 00:00:00.000.086,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj
- 1899.12.30 00:00:00.000.047,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10 Seattle.groupproj
- 1899.12.30 00:00:00.000.717,C:\Users\Andrew\Documents\GitHub\php4delphi\ProjectGroup1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj
- 2019.03.04 22:31:53.120,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:03.207,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:09.673,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.2 Tokyo.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj
- 2019.03.04 22:32:17.131,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.2 Tokyo.groupproj
- 2019.03.04 22:32:22.720,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE2.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE1.groupproj
-
-
-
-
-
diff --git a/Source/packages/php4delphi Delphi XE4.groupproj.local b/Source/packages/php4delphi Delphi XE4.groupproj.local
deleted file mode 100644
index a7c375a..0000000
--- a/Source/packages/php4delphi Delphi XE4.groupproj.local
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- 1899.12.30 00:00:00.000.086,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj
- 1899.12.30 00:00:00.000.047,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10 Seattle.groupproj
- 1899.12.30 00:00:00.000.717,C:\Users\Andrew\Documents\GitHub\php4delphi\ProjectGroup1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj
- 2019.03.04 22:31:53.120,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:03.207,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:09.673,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.2 Tokyo.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj
- 2019.03.04 22:32:17.131,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.2 Tokyo.groupproj
- 2019.03.04 22:32:22.720,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE2.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE1.groupproj
- 2019.03.04 22:32:29.457,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE3.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE2.groupproj
-
-
-
-
-
diff --git a/Source/packages/php4delphi Delphi XE5.groupproj.local b/Source/packages/php4delphi Delphi XE5.groupproj.local
deleted file mode 100644
index 47e6273..0000000
--- a/Source/packages/php4delphi Delphi XE5.groupproj.local
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- 1899.12.30 00:00:00.000.086,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj
- 1899.12.30 00:00:00.000.047,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10 Seattle.groupproj
- 1899.12.30 00:00:00.000.717,C:\Users\Andrew\Documents\GitHub\php4delphi\ProjectGroup1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj
- 2019.03.04 22:31:53.120,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:03.207,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:09.673,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.2 Tokyo.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj
- 2019.03.04 22:32:17.131,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.2 Tokyo.groupproj
- 2019.03.04 22:32:22.720,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE2.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE1.groupproj
- 2019.03.04 22:32:29.457,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE3.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE2.groupproj
- 2019.03.04 22:32:34.993,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE4.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE3.groupproj
-
-
-
-
-
diff --git a/Source/packages/php4delphi Delphi XE6.groupproj.local b/Source/packages/php4delphi Delphi XE6.groupproj.local
deleted file mode 100644
index 2c6ab26..0000000
--- a/Source/packages/php4delphi Delphi XE6.groupproj.local
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
- 1899.12.30 00:00:00.000.717,C:\Users\Andrew\Documents\GitHub\php4delphi\ProjectGroup1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj
- 1899.12.30 00:00:00.000.086,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj
- 1899.12.30 00:00:00.000.047,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10 Seattle.groupproj
- 2019.03.04 22:31:53.120,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:03.207,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:09.673,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.2 Tokyo.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj
- 2019.03.04 22:32:17.131,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.2 Tokyo.groupproj
- 2019.03.04 22:32:22.720,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE2.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE1.groupproj
- 2019.03.04 22:32:29.457,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE3.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE2.groupproj
- 2019.03.04 22:32:34.993,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE4.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE3.groupproj
- 2019.03.04 22:32:41.465,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE5.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE4.groupproj
-
-
-
-
-
diff --git a/Source/packages/php4delphi Delphi XE7.groupproj.local b/Source/packages/php4delphi Delphi XE7.groupproj.local
deleted file mode 100644
index 9691c31..0000000
--- a/Source/packages/php4delphi Delphi XE7.groupproj.local
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
- 1899.12.30 00:00:00.000.086,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj
- 1899.12.30 00:00:00.000.717,C:\Users\Andrew\Documents\GitHub\php4delphi\ProjectGroup1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj
- 1899.12.30 00:00:00.000.047,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10 Seattle.groupproj
- 2019.03.04 22:31:53.120,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:03.207,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:09.673,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.2 Tokyo.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj
- 2019.03.04 22:32:17.131,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.2 Tokyo.groupproj
- 2019.03.04 22:32:22.720,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE2.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE1.groupproj
- 2019.03.04 22:32:29.457,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE3.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE2.groupproj
- 2019.03.04 22:32:34.993,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE4.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE3.groupproj
- 2019.03.04 22:32:41.465,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE5.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE4.groupproj
- 2019.03.04 22:32:46.928,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE6.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE5.groupproj
-
-
-
-
-
diff --git a/Source/packages/php4delphi Delphi XE8.groupproj.local b/Source/packages/php4delphi Delphi XE8.groupproj.local
deleted file mode 100644
index fded362..0000000
--- a/Source/packages/php4delphi Delphi XE8.groupproj.local
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- 1899.12.30 00:00:00.000.047,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10 Seattle.groupproj
- 1899.12.30 00:00:00.000.717,C:\Users\Andrew\Documents\GitHub\php4delphi\ProjectGroup1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj
- 1899.12.30 00:00:00.000.086,C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi2010.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi 10 Seattle.groupproj
- 2019.03.04 22:31:53.120,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:03.207,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.1 Berlin.groupproj
- 2019.03.04 22:32:09.673,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.2 Tokyo.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10 Seattle.groupproj
- 2019.03.04 22:32:17.131,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE1.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi 10.2 Tokyo.groupproj
- 2019.03.04 22:32:22.720,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE2.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE1.groupproj
- 2019.03.04 22:32:29.457,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE3.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE2.groupproj
- 2019.03.04 22:32:34.993,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE4.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE3.groupproj
- 2019.03.04 22:32:41.465,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE5.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE4.groupproj
- 2019.03.04 22:32:46.928,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE6.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE5.groupproj
- 2019.03.04 22:32:52.359,C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE7.groupproj=C:\Users\Andrew\Documents\GitHub\php4delphi\packages\php4delphi Delphi XE6.groupproj
-
-
-
-
-
diff --git a/Source/php4App.dll b/Source/php4App.dll
deleted file mode 100644
index d25d474..0000000
Binary files a/Source/php4App.dll and /dev/null differ
diff --git a/Source/php4App.dproj.local b/Source/php4App.dproj.local
deleted file mode 100644
index b3811b7..0000000
--- a/Source/php4App.dproj.local
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/Source/php4App.identcache b/Source/php4App.identcache
deleted file mode 100644
index 303be08..0000000
Binary files a/Source/php4App.identcache and /dev/null differ
diff --git a/Source/php4App.stat b/Source/php4App.stat
deleted file mode 100644
index fd9c33f..0000000
--- a/Source/php4App.stat
+++ /dev/null
@@ -1,10 +0,0 @@
-[Stats]
-EditorSecs=3
-DesignerSecs=1
-InspectorSecs=1
-CompileSecs=724
-OtherSecs=68
-StartTime=21.09.2018 13:22:04
-RealKeys=0
-EffectiveKeys=0
-DebugSecs=1
diff --git a/Source/php4AppIntf.pas b/Source/php4AppIntf.pas
index ffb1b2b..ea6d31f 100644
Binary files a/Source/php4AppIntf.pas and b/Source/php4AppIntf.pas differ
diff --git a/Source/php4AppUnit.pas b/Source/php4AppUnit.pas
index 71e903b..5e6feee 100644
--- a/Source/php4AppUnit.pas
+++ b/Source/php4AppUnit.pas
@@ -35,9 +35,7 @@ TPHPInfoBlock = class
private
FBuffer : zend_ustr;
FVarList : TStringList;
- {$IFDEF PHP5}
FVirtualStream : TMemoryStream;
- {$ENDIF}
procedure SetVarList(AValue : TStringList);
public
constructor Create; virtual;
@@ -190,26 +188,23 @@ procedure PrepareStartup;
php_delphi_module.module_shutdown_func := nil;
php_delphi_module.info_func := @php_info_delphi;
php_delphi_module.version := '7.4';
- {$IFDEF PHP4}
- php_delphi_module.global_startup_func := nil;
- {$ENDIF}
php_delphi_module.request_shutdown_func := nil;
- {$IFDEF PHP5}
+
{$IFNDEF PHP520}
php_delphi_module.global_id := 0;
{$ENDIF}
- {$ENDIF}
+
php_delphi_module.module_started := 0;
php_delphi_module._type := 0;
php_delphi_module.handle := nil;
php_delphi_module.module_number := 0;
{$IFDEF PHP530}
- {$IFNDEF COMPILER_VC9}
- php_delphi_module.build_id := strdup(zend_pchar(ZEND_MODULE_BUILD_ID));
- {$ELSE}
- php_delphi_module.build_id := DupStr(zend_pchar(ZEND_MODULE_BUILD_ID));
- {$ENDIF}
+ {$IFNDEF COMPILER_VC9}
+ php_delphi_module.build_id := strdup(zend_pchar(ZEND_MODULE_BUILD_ID));
+ {$ELSE}
+ php_delphi_module.build_id := DupStr(zend_pchar(ZEND_MODULE_BUILD_ID));
+ {$ENDIF}
{$ENDIF}
end;
@@ -222,24 +217,9 @@ procedure PrepareResult(RequestID : integer; TSRMLS_D : pointer);
data: ^ppzval;
cnt : integer;
InfoBlock : TPHPInfoBlock;
- {$IFDEF PHP5}
- EG : pzend_executor_globals;
- {$ENDIF}
-
begin
InfoBlock := TPHPInfoBlock(RequestID);
-
- {$IFDEF PHP4}
- ht := GetSymbolsTable
- {$ELSE}
- begin
- EG := GetExecutorGlobals;
- if Assigned(EG) then
- ht := @EG.symbol_table
- else
- ht := nil;
- end ;
- {$ENDIF}
+ ht := GetSymbolsTable;
if Assigned(ht) then
begin
@@ -250,7 +230,7 @@ procedure PrepareResult(RequestID : integer; TSRMLS_D : pointer);
if zend_hash_find(ht, zend_pchar(InfoBlock.VarList.Names[cnt]),
strlen(zend_pchar(InfoBlock.VarList.Names[cnt])) + 1, data) = SUCCESS then
case data^^^._type of
- IS_STRING : InfoBlock.VarList.Values[InfoBlock.VarList.Names[cnt]] := data^^^.value.str.val;
+ IS_STRING : InfoBlock.VarList.Values[InfoBlock.VarList.Names[cnt]] := Z_STRVAL(data^^);
IS_LONG,
IS_RESOURCE,
IS_BOOL : InfoBlock.VarList.Values[InfoBlock.VarList.Names[cnt]] := IntToStr(data^^^.value.lval);
@@ -285,8 +265,7 @@ function ExecutePHP(RequestID : integer; FileName : zend_pchar) : integer; stdca
file_handle.opened_path := nil;
file_handle.free_filename := 0;
file_handle.handle.fp := nil;
-
- PG(TSRMLS_D)^.register_globals := true;
+ GetPHPGlobals(TSRMLS_D)^.register_globals := true;
gl := GetSAPIGlobals;
TPHPInfoBlock(RequestID).FBuffer := '';
gl^.server_context := pointer(RequestID);
@@ -295,9 +274,8 @@ function ExecutePHP(RequestID : integer; FileName : zend_pchar) : integer; stdca
php_request_startup(TSRMLS_D);
result := php_execute_script(@file_handle, TSRMLS_D);
- {$IFDEF PHP5}
zend_destroy_file_handle(@file_handle, TSRMLS_D);
- {$ENDIF}
+
PrepareResult(RequestID, TSRMLS_D);
php_request_shutdown(nil);
except
@@ -477,7 +455,7 @@ function ExecuteCode(RequestID : integer; ACode : zend_pchar) : integer; stdcall
TSRMLS_D := ts_resource_ex(0, nil);
- PG(TSRMLS_D)^.register_globals := true;
+ GetPHPGlobals(TSRMLS_D)^.register_globals := true;
gl := GetSAPIGlobals;
TPHPInfoBlock(RequestID).FBuffer := '';
gl^.server_context := pointer(RequestID);
@@ -645,19 +623,15 @@ constructor TPHPInfoBlock.Create;
inherited Create;
FBuffer := '';
FVarList := TStringList.Create;
- {$IFDEF PHP5}
FVirtualStream := TMemoryStream.Create;
- {$ENDIF}
end;
destructor TPHPInfoBlock.Destroy;
begin
FBuffer := '';
FVarList.Free;
- {$IFDEF PHP5}
if FVirtualStream <> nil then
FreeAndNil(FVirtualStream);
- {$ENDIF}
inherited;
end;
@@ -733,7 +707,9 @@ procedure StopEngine;
try
delphi_sapi_module.shutdown(@delphi_sapi_module);
sapi_shutdown;
+ {$IF not Defined(PHP550) and not Defined(PHP560)}
tsrm_shutdown();
+ {$ifend}
except
end;
end;
diff --git a/Source/php4Applications/PHP 4.4.6/php4App.dll b/Source/php4Applications/PHP 4.4.6/php4App.dll
deleted file mode 100644
index 9ed7aae..0000000
Binary files a/Source/php4Applications/PHP 4.4.6/php4App.dll and /dev/null differ
diff --git a/Source/php4Applications/PHP 5.2.11/php4App.dll b/Source/php4Applications/PHP 5.2.11/php4App.dll
deleted file mode 100644
index f5445b0..0000000
Binary files a/Source/php4Applications/PHP 5.2.11/php4App.dll and /dev/null differ
diff --git a/Source/php4Applications/PHP 5.3.0/php4App.dll b/Source/php4Applications/PHP 5.3.0/php4App.dll
deleted file mode 100644
index 2efba3b..0000000
Binary files a/Source/php4Applications/PHP 5.3.0/php4App.dll and /dev/null differ
diff --git a/Source/php4Applications/PHP4/php4App.dll b/Source/php4Applications/PHP4/php4App.dll
deleted file mode 100644
index 62a5982..0000000
Binary files a/Source/php4Applications/PHP4/php4App.dll and /dev/null differ
diff --git a/Source/php4Applications/PHP511/php4App.dll b/Source/php4Applications/PHP511/php4App.dll
deleted file mode 100644
index d02c891..0000000
Binary files a/Source/php4Applications/PHP511/php4App.dll and /dev/null differ
diff --git a/Source/php4Applications/PHP512/php4App.dll b/Source/php4Applications/PHP512/php4App.dll
deleted file mode 100644
index aa4ea5b..0000000
Binary files a/Source/php4Applications/PHP512/php4App.dll and /dev/null differ
diff --git a/Source/php4DelphiD2005.dpk b/Source/php4DelphiD2005.dpk
index c306478..9df15fd 100644
--- a/Source/php4DelphiD2005.dpk
+++ b/Source/php4DelphiD2005.dpk
@@ -30,7 +30,7 @@ package php4DelphiD2005;
{$DESIGNONLY}
{$IMPLICITBUILD OFF}
-rrequires
+requires
rtl,
vcl,
designide,
@@ -38,11 +38,11 @@ rrequires
vclx,
php4DelphiR2005;
-ocontains
+contains
PHPProjectWizard in 'PHPProjectWizard.pas',
php4DelphiReg in 'php4DelphiReg.pas',
php4DelphiWeb in 'php4DelphiWeb.pas',
phpWeb in 'phpWeb.pas',
phpAbout in 'phpAbout.pas' {dlgAbout};
-d.
+end.
diff --git a/Source/php4DelphiD2005.dproj.local b/Source/php4DelphiD2005.dproj.local
deleted file mode 100644
index b3811b7..0000000
--- a/Source/php4DelphiD2005.dproj.local
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/Source/php4DelphiD2005.stat b/Source/php4DelphiD2005.stat
deleted file mode 100644
index 9ec5214..0000000
--- a/Source/php4DelphiD2005.stat
+++ /dev/null
@@ -1,10 +0,0 @@
-[Stats]
-EditorSecs=1
-DesignerSecs=1
-InspectorSecs=1
-CompileSecs=1
-OtherSecs=3
-StartTime=21.09.2018 3:07:29
-RealKeys=0
-EffectiveKeys=0
-DebugSecs=1
diff --git a/Source/php4DelphiD2007.dpk b/Source/php4DelphiD2007.dpk
index 1810861..c112701 100644
--- a/Source/php4DelphiD2007.dpk
+++ b/Source/php4DelphiD2007.dpk
@@ -30,7 +30,7 @@ package php4DelphiD2007;
{$DESIGNONLY}
{$IMPLICITBUILD OFF}
-rrequires
+requires
rtl,
vcl,
designide,
@@ -38,11 +38,11 @@ rrequires
vclx,
php4DelphiR2007;
-ocontains
+contains
PHPProjectWizard in 'PHPProjectWizard.pas',
php4DelphiReg in 'php4DelphiReg.pas',
php4DelphiWeb in 'php4DelphiWeb.pas',
phpWeb in 'phpWeb.pas',
phpAbout in 'phpAbout.pas' {dlgAbout};
-d.
+end.
diff --git a/Source/php4DelphiD2007.dproj.local b/Source/php4DelphiD2007.dproj.local
deleted file mode 100644
index b3811b7..0000000
--- a/Source/php4DelphiD2007.dproj.local
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/Source/php4DelphiD2007.stat b/Source/php4DelphiD2007.stat
deleted file mode 100644
index 6bfe8ad..0000000
--- a/Source/php4DelphiD2007.stat
+++ /dev/null
@@ -1,10 +0,0 @@
-[Stats]
-EditorSecs=1
-DesignerSecs=1
-InspectorSecs=1
-CompileSecs=1
-OtherSecs=3
-StartTime=21.09.2018 3:07:40
-RealKeys=0
-EffectiveKeys=0
-DebugSecs=1
diff --git a/Source/php4DelphiD2009.dpk b/Source/php4DelphiD2009.dpk
index d9f82a3..3627877 100644
--- a/Source/php4DelphiD2009.dpk
+++ b/Source/php4DelphiD2009.dpk
@@ -1,7 +1,6 @@
package php4DelphiD2009;
{$R *.res}
-{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
@@ -12,24 +11,22 @@ package php4DelphiD2009;
{$LOCALSYMBOLS ON}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
-{$OPTIMIZATION OFF}
+{$OPTIMIZATION ON}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
-{$REFERENCEINFO ON}
+{$REFERENCEINFO OFF}
{$SAFEDIVIDE OFF}
-{$STACKFRAMES ON}
+{$STACKFRAMES OFF}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 1}
{$IMAGEBASE $400000}
-{$DEFINE DEBUG}
-{$ENDIF IMPLICITBUILDING}
{$DESCRIPTION 'php4Delphi (design-time)'}
{$DESIGNONLY}
{$IMPLICITBUILD OFF}
-rrequires
+requires
rtl,
vcl,
designide,
@@ -37,11 +34,11 @@ rrequires
vclx,
php4DelphiR2009;
-ocontains
+contains
PHPProjectWizard in 'PHPProjectWizard.pas',
php4DelphiReg in 'php4DelphiReg.pas',
php4DelphiWeb in 'php4DelphiWeb.pas',
phpWeb in 'phpWeb.pas',
phpAbout in 'phpAbout.pas' {dlgAbout};
-d.
+end.
diff --git a/Source/php4DelphiD2009.dproj b/Source/php4DelphiD2009.dproj
index 440917d..f096ad0 100644
--- a/Source/php4DelphiD2009.dproj
+++ b/Source/php4DelphiD2009.dproj
@@ -1,123 +1,131 @@
-
-
- {65B66BBA-1F79-4212-AC10-21298E0BC3B0}
- php4DelphiD2009.dpk
- True
- Debug
- 1
- Package
- VCL
- 18.2
- Win32
-
-
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- 00400000
- false
- 1
- Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
- 1058
- true
- php4DelphiD2009
- false
- false
- false
- true
- true
- php4Delphi (design-time)
- false
- true
- CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
-
-
- android-support-v4.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services.dex.jar
- package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
- Debug
-
-
- true
- php4DelphiD2009_Icon.ico
- 1033
- Debug
- CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName)
- Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
-
-
- php4DelphiD2009_Icon.ico
-
-
- RELEASE;$(DCC_Define)
- false
- 0
- 0
-
-
- DEBUG;$(DCC_Define)
- true
- false
-
-
-
- MainSource
-
-
- Cfg_2
- Base
-
-
- Base
-
-
- Cfg_1
- Base
-
-
-
- Delphi.Personality.12
- Package
-
-
-
- php4DelphiD2009.dpk
-
-
-
- False
- False
- False
- True
- False
-
-
- 12
-
-
-
-
+
+
+ {65B66BBA-1F79-4212-AC10-21298E0BC3B0}
+ php4DelphiD2009.dpk
+ True
+ Debug
+ 1
+ Package
+ VCL
+ 18.2
+ Win32
+ DCC32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 0
+ ..\..\..\..\Public\Documents\RAD Studio\6.0\Bpl\php4DelphiD2009.bpl
+ 00400000
+ false
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ 1058
+ true
+ php4DelphiD2009
+ false
+ false
+ false
+ true
+ true
+ php4Delphi (design-time)
+ false
+ true
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+
+
+ RELEASE;$(DCC_Define)
+ false
+ 0
+ 0
+
+
+ DEBUG;$(DCC_Define)
+ true
+ false
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiD2009.dpk
+
+
+ False
+ True
+ False
+
+
+ False
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ False
+ False
+ False
+ True
+ False
+
+
+ 12
+
+
diff --git a/Source/php4DelphiD2009.dproj.local b/Source/php4DelphiD2009.dproj.local
deleted file mode 100644
index b3811b7..0000000
--- a/Source/php4DelphiD2009.dproj.local
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/Source/php4DelphiD2009.stat b/Source/php4DelphiD2009.stat
deleted file mode 100644
index 7cf7048..0000000
--- a/Source/php4DelphiD2009.stat
+++ /dev/null
@@ -1,10 +0,0 @@
-[Stats]
-EditorSecs=1
-DesignerSecs=1
-InspectorSecs=1
-CompileSecs=1
-OtherSecs=3
-StartTime=21.09.2018 13:22:02
-RealKeys=0
-EffectiveKeys=0
-DebugSecs=1
diff --git a/Source/php4DelphiD2010.dpk b/Source/php4DelphiD2010.dpk
index 6d19017..f322623 100644
--- a/Source/php4DelphiD2010.dpk
+++ b/Source/php4DelphiD2010.dpk
@@ -34,27 +34,15 @@ requires
vcl,
designide,
vclactnband,
- vclx;
+ vclx,
+ php4DelphiR2010;
contains
PHPProjectWizard in 'PHPProjectWizard.pas',
- { Components Requirements }
- DelphiFunctions in 'DelphiFunctions.pas',
- phpLibrary in 'phpLibrary.pas',
- PHPCommon in 'phpCommon.pas',
- phpFunctions in 'phpFunctions.pas',
- ZENDTypes in 'ZENDTypes.pas',
- phpClass in 'phpClass.pas',
- php4delphi in 'php4delphi.pas',
- phpModules in 'phpModules.pas',
- phpAPI in 'phpAPI.pas',
- ZENDAPI in 'ZENDAPI.pas',
- PHPTypes in 'PHPTypes.pas',
- { Components Requirements }
php4DelphiReg in 'php4DelphiReg.pas',
php4DelphiWeb in 'php4DelphiWeb.pas',
phpWeb in 'phpWeb.pas',
- phpAbout in 'phpAbout.pas' { dlgAbout };
+ phpAbout in 'phpAbout.pas' {dlgAbout};
end.
diff --git a/Source/php4DelphiD2010.dproj b/Source/php4DelphiD2010.dproj
index d0ed8de..e8ebf40 100644
--- a/Source/php4DelphiD2010.dproj
+++ b/Source/php4DelphiD2010.dproj
@@ -136,7 +136,16 @@
True
-
+
+
+ 0
+ .dll;.bpl
+
+
+ 1
+ .dylib
+
+
Contents\Resources
@@ -475,16 +484,7 @@
1
-
-
- 0
- .dll;.bpl
-
-
- 1
- .dylib
-
-
+
diff --git a/Source/php4DelphiD2010.dproj.local b/Source/php4DelphiD2010.dproj.local
deleted file mode 100644
index a169e93..0000000
--- a/Source/php4DelphiD2010.dproj.local
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
- 1899.12.30 00:00:00.000.520,D:\переустановил\Рабочий стол 08.07.4016\soulengine-5554e3db061d08b94f439be26ed071a74c30071c\php4delphi\php4DelphiD2010.dproj=D:\переустановил\Рабочий стол 08.07.4016\soulengine-5554e3db061d08b94f439be26ed071a74c30071c\php4delphi\php4DelphiD2010.dproj
-
-
diff --git a/Source/php4DelphiD2010.identcache b/Source/php4DelphiD2010.identcache
deleted file mode 100644
index cb3dd3f..0000000
Binary files a/Source/php4DelphiD2010.identcache and /dev/null differ
diff --git a/Source/php4DelphiD2010.stat b/Source/php4DelphiD2010.stat
deleted file mode 100644
index 1d4bad9..0000000
--- a/Source/php4DelphiD2010.stat
+++ /dev/null
@@ -1,10 +0,0 @@
-[Stats]
-EditorSecs=287
-DesignerSecs=1
-InspectorSecs=1
-CompileSecs=15416
-OtherSecs=107
-StartTime=04.03.2019 21:55:53
-RealKeys=0
-EffectiveKeys=0
-DebugSecs=1
diff --git a/Source/php4DelphiD5.dproj.local b/Source/php4DelphiD5.dproj.local
deleted file mode 100644
index b3811b7..0000000
--- a/Source/php4DelphiD5.dproj.local
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/Source/php4DelphiD5.stat b/Source/php4DelphiD5.stat
deleted file mode 100644
index 3137e8d..0000000
--- a/Source/php4DelphiD5.stat
+++ /dev/null
@@ -1,10 +0,0 @@
-[Stats]
-EditorSecs=80
-DesignerSecs=1
-InspectorSecs=1
-CompileSecs=8334
-OtherSecs=82
-StartTime=21.09.2018 3:07:20
-RealKeys=0
-EffectiveKeys=0
-DebugSecs=1
diff --git a/Source/php4DelphiD6.dpk b/Source/php4DelphiD6.dpk
index fb713db..a1312f7 100644
--- a/Source/php4DelphiD6.dpk
+++ b/Source/php4DelphiD6.dpk
@@ -30,16 +30,17 @@ package php4DelphiD6;
{$DESIGNONLY}
{$IMPLICITBUILD OFF}
-rrequires
+requires
rtl,
+ vcl,
designide,
php4DelphiR6;
-ocontains
+contains
PHPProjectWizard in 'PHPProjectWizard.pas',
php4DelphiReg in 'php4DelphiReg.pas',
phpWeb in 'phpWeb.pas',
php4DelphiWeb in 'php4DelphiWeb.pas',
phpAbout in 'phpAbout.pas' {dlgAbout};
-d.
+end.
diff --git a/Source/php4DelphiD6.dproj.local b/Source/php4DelphiD6.dproj.local
deleted file mode 100644
index b3811b7..0000000
--- a/Source/php4DelphiD6.dproj.local
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/Source/php4DelphiD6.stat b/Source/php4DelphiD6.stat
deleted file mode 100644
index 5f3a5ae..0000000
--- a/Source/php4DelphiD6.stat
+++ /dev/null
@@ -1,10 +0,0 @@
-[Stats]
-EditorSecs=2
-DesignerSecs=1
-InspectorSecs=1
-CompileSecs=1
-OtherSecs=3
-StartTime=21.09.2018 3:07:24
-RealKeys=0
-EffectiveKeys=0
-DebugSecs=1
diff --git a/Source/php4DelphiD7.cfg b/Source/php4DelphiD7.cfg
new file mode 100644
index 0000000..290f5ea
--- /dev/null
+++ b/Source/php4DelphiD7.cfg
@@ -0,0 +1,40 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O-
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
+-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
+-DDEBUG
+-Z
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/Source/php4DelphiD7.dof b/Source/php4DelphiD7.dof
new file mode 100644
index 0000000..bc67b09
--- /dev/null
+++ b/Source/php4DelphiD7.dof
@@ -0,0 +1,136 @@
+[FileVersion]
+Version=7.0
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=0
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=1
+SymbolLibrary=1
+SymbolPlatform=1
+UnitLibrary=1
+UnitPlatform=1
+UnitDeprecated=1
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=php4Delphi (design-time)
+[Directories]
+OutputDir=
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=
+Conditionals=DEBUG
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=
+HostApplication=
+Launcher=
+UseLauncher=0
+DebugCWD=
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+[Version Info]
+IncludeVerInfo=1
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1058
+CodePage=1251
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
diff --git a/Source/php4DelphiD7.dproj.local b/Source/php4DelphiD7.dproj.local
deleted file mode 100644
index b3811b7..0000000
--- a/Source/php4DelphiD7.dproj.local
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/Source/php4DelphiD7.stat b/Source/php4DelphiD7.stat
deleted file mode 100644
index 40ad9b8..0000000
--- a/Source/php4DelphiD7.stat
+++ /dev/null
@@ -1,10 +0,0 @@
-[Stats]
-EditorSecs=57
-DesignerSecs=1
-InspectorSecs=1
-CompileSecs=20209
-OtherSecs=85
-StartTime=21.09.2018 13:19:38
-RealKeys=0
-EffectiveKeys=0
-DebugSecs=1
diff --git a/Source/php4DelphiDRio.dpk b/Source/php4DelphiDRio.dpk
new file mode 100644
index 0000000..acefc0d
--- /dev/null
+++ b/Source/php4DelphiDRio.dpk
@@ -0,0 +1,48 @@
+package php4DelphiDRio;
+
+{$R *.res}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'php4Delphi (design-time)'}
+{$DESIGNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl,
+ designide,
+ vclactnband,
+ vclx,
+ php4DelphiR2010;
+
+contains
+ PHPProjectWizard in 'PHPProjectWizard.pas',
+ php4DelphiReg in 'php4DelphiReg.pas',
+ php4DelphiWeb in 'php4DelphiWeb.pas',
+ phpWeb in 'phpWeb.pas',
+ phpAbout in 'phpAbout.pas' {dlgAbout};
+
+end.
+
diff --git a/Source/php4DelphiDRio.dproj b/Source/php4DelphiDRio.dproj
new file mode 100644
index 0000000..248c41c
--- /dev/null
+++ b/Source/php4DelphiDRio.dproj
@@ -0,0 +1,799 @@
+
+
+ {34B23B2E-657F-42AF-9898-5D22792F862D}
+ php4DelphiDRio.dpk
+ True
+ Debug
+ 1
+ Package
+ VCL
+ 18.7
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Cfg_2
+ true
+ true
+
+
+ 1
+ php4Delphi (design-time)
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ php4DelphiDRio
+ true
+ 1049
+ false
+ true
+ true
+ false
+ false
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ 00400000
+ false
+ false
+ true
+
+
+ vcl;rtl;vclactnband;vclx;php4DelphiR2010;$(DCC_UsePackage)
+ php4DelphiD2010_Icon.ico
+ 1033
+ true
+ CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+
+
+ 0
+ false
+ RELEASE;$(DCC_Define)
+ 0
+
+
+ true
+ false
+ DEBUG;$(DCC_Define)
+
+
+ true
+ 1033
+ CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)
+ php4delphi;F:\переустановил\Рабочий стол 08.07.4016\soulengine-5554e3db061d08b94f439be26ed071a74c30071c;$(DCC_UnitSearchPath)
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiDRio.dpk
+
+
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
+ File C:\USERS\PUBLIC\DOCUMENTS\EMBARCADERO\STUDIO\18.0\bpl\dcllmdlegacy240.bpl not found
+
+
+
+ True
+
+
+
+
+ 1
+
+
+ 0
+
+
+
+
+ classes
+ 1
+
+
+
+
+ res\xml
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ library\lib\armeabi
+ 1
+
+
+
+
+ library\lib\mips
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+
+
+ res\values-v21
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ res\drawable-ldpi
+ 1
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+
+
+ res\drawable-small
+ 1
+
+
+
+
+ res\drawable-normal
+ 1
+
+
+
+
+ res\drawable-large
+ 1
+
+
+
+
+ res\drawable-xlarge
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+
+
+ 1
+ .framework
+
+
+ 1
+ .framework
+
+
+ 0
+
+
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 0
+ .dll;.bpl
+
+
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 0
+ .bpl
+
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+
+
+
+ Contents\Resources
+ 1
+
+
+ Contents\Resources
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+
+
+ 1
+
+
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 12
+
+
+
+
+
diff --git a/Source/php4DelphiR2005.dpk b/Source/php4DelphiR2005.dpk
index 4385116..bdd3e86 100644
--- a/Source/php4DelphiR2005.dpk
+++ b/Source/php4DelphiR2005.dpk
@@ -30,22 +30,20 @@ package php4DelphiR2005;
{$RUNONLY}
{$IMPLICITBUILD OFF}
-rrequires
+requires
rtl,
vcl;
-ocontains
+contains
ZENDAPI in 'ZENDAPI.pas',
DelphiFunctions in 'DelphiFunctions.pas',
php4delphi in 'php4delphi.pas',
PHPAPI in 'PHPAPI.pas',
phpModules in 'phpModules.pas',
PHPLibrary in 'PHPLibrary.pas',
- phpCustomLibrary in 'phpCustomLibrary.pas',
PHPFunctions in 'PHPFunctions.pas',
PHPTypes in 'PHPTypes.pas',
ZENDTypes in 'ZENDTypes.pas',
phpClass in 'phpClass.pas',
PHPCommon in 'PHPCommon.pas';
-
-d.
+end.
diff --git a/Source/php4DelphiR2005.dproj.local b/Source/php4DelphiR2005.dproj.local
deleted file mode 100644
index b3811b7..0000000
--- a/Source/php4DelphiR2005.dproj.local
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/Source/php4DelphiR2005.stat b/Source/php4DelphiR2005.stat
deleted file mode 100644
index 55185f1..0000000
--- a/Source/php4DelphiR2005.stat
+++ /dev/null
@@ -1,10 +0,0 @@
-[Stats]
-EditorSecs=1
-DesignerSecs=1
-InspectorSecs=1
-CompileSecs=1
-OtherSecs=1
-StartTime=21.09.2018 3:08:04
-RealKeys=0
-EffectiveKeys=0
-DebugSecs=1
diff --git a/Source/php4DelphiR2006.dpk b/Source/php4DelphiR2006.dpk
index 124371d..6bb00b2 100644
--- a/Source/php4DelphiR2006.dpk
+++ b/Source/php4DelphiR2006.dpk
@@ -30,22 +30,21 @@ package php4DelphiR2006;
{$RUNONLY}
{$IMPLICITBUILD OFF}
-rrequires
+requires
rtl,
vcl;
-ocontains
+contains
ZENDAPI in 'ZENDAPI.pas',
DelphiFunctions in 'DelphiFunctions.pas',
php4delphi in 'php4delphi.pas',
PHPAPI in 'PHPAPI.pas',
phpModules in 'phpModules.pas',
PHPLibrary in 'PHPLibrary.pas',
- phpCustomLibrary in 'phpCustomLibrary.pas',
PHPFunctions in 'PHPFunctions.pas',
PHPTypes in 'PHPTypes.pas',
ZENDTypes in 'ZENDTypes.pas',
phpClass in 'phpClass.pas',
PHPCommon in 'PHPCommon.pas';
-d.
+end.
diff --git a/Source/php4DelphiR2006.dproj.local b/Source/php4DelphiR2006.dproj.local
deleted file mode 100644
index b3811b7..0000000
--- a/Source/php4DelphiR2006.dproj.local
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/Source/php4DelphiR2006.stat b/Source/php4DelphiR2006.stat
deleted file mode 100644
index 3cba0bc..0000000
--- a/Source/php4DelphiR2006.stat
+++ /dev/null
@@ -1,10 +0,0 @@
-[Stats]
-EditorSecs=1
-DesignerSecs=1
-InspectorSecs=1
-CompileSecs=1
-OtherSecs=1
-StartTime=21.09.2018 3:08:05
-RealKeys=0
-EffectiveKeys=0
-DebugSecs=1
diff --git a/Source/php4DelphiR2007.dpk b/Source/php4DelphiR2007.dpk
index bd7459e..05939e5 100644
--- a/Source/php4DelphiR2007.dpk
+++ b/Source/php4DelphiR2007.dpk
@@ -30,22 +30,21 @@ package php4DelphiR2007;
{$RUNONLY}
{$IMPLICITBUILD OFF}
-rrequires
+requires
rtl,
vcl;
-ocontains
+contains
ZENDAPI in 'ZENDAPI.pas',
DelphiFunctions in 'DelphiFunctions.pas',
php4delphi in 'php4delphi.pas',
PHPAPI in 'PHPAPI.pas',
phpModules in 'phpModules.pas',
PHPLibrary in 'PHPLibrary.pas',
- phpCustomLibrary in 'phpCustomLibrary.pas',
PHPFunctions in 'PHPFunctions.pas',
PHPTypes in 'PHPTypes.pas',
ZENDTypes in 'ZENDTypes.pas',
phpClass in 'phpClass.pas',
PHPCommon in 'PHPCommon.pas';
-d.
+end.
diff --git a/Source/php4DelphiR2007.dproj.local b/Source/php4DelphiR2007.dproj.local
deleted file mode 100644
index b3811b7..0000000
--- a/Source/php4DelphiR2007.dproj.local
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/Source/php4DelphiR2007.stat b/Source/php4DelphiR2007.stat
deleted file mode 100644
index 6544ade..0000000
--- a/Source/php4DelphiR2007.stat
+++ /dev/null
@@ -1,10 +0,0 @@
-[Stats]
-EditorSecs=1
-DesignerSecs=1
-InspectorSecs=1
-CompileSecs=1
-OtherSecs=1
-StartTime=21.09.2018 3:08:16
-RealKeys=0
-EffectiveKeys=0
-DebugSecs=1
diff --git a/Source/php4DelphiR2009.dpk b/Source/php4DelphiR2009.dpk
index ec35688..e7e09aa 100644
--- a/Source/php4DelphiR2009.dpk
+++ b/Source/php4DelphiR2009.dpk
@@ -2,7 +2,6 @@ package php4DelphiR2009;
{$R *.res}
{$R 'php4delphi.dcr'}
-{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
@@ -13,39 +12,36 @@ package php4DelphiR2009;
{$LOCALSYMBOLS ON}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
-{$OPTIMIZATION OFF}
+{$OPTIMIZATION ON}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
-{$REFERENCEINFO ON}
+{$REFERENCEINFO OFF}
{$SAFEDIVIDE OFF}
-{$STACKFRAMES ON}
+{$STACKFRAMES OFF}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 1}
{$IMAGEBASE $400000}
-{$DEFINE DEBUG}
-{$ENDIF IMPLICITBUILDING}
{$DESCRIPTION 'php4Delphi (run-rime)'}
{$RUNONLY}
{$IMPLICITBUILD OFF}
-rrequires
+requires
rtl,
vcl;
-ocontains
+contains
ZENDAPI in 'ZENDAPI.pas',
DelphiFunctions in 'DelphiFunctions.pas',
php4delphi in 'php4delphi.pas',
PHPAPI in 'PHPAPI.pas',
phpModules in 'phpModules.pas',
PHPLibrary in 'PHPLibrary.pas',
- phpCustomLibrary in 'phpCustomLibrary.pas',
PHPFunctions in 'PHPFunctions.pas',
PHPTypes in 'PHPTypes.pas',
ZENDTypes in 'ZENDTypes.pas',
phpClass in 'phpClass.pas',
PHPCommon in 'PHPCommon.pas';
-d.
+end.
diff --git a/Source/php4DelphiR2009.dproj b/Source/php4DelphiR2009.dproj
index 818ccc6..1f38f11 100644
--- a/Source/php4DelphiR2009.dproj
+++ b/Source/php4DelphiR2009.dproj
@@ -1,110 +1,139 @@
-
-
- {B0FA1B58-2442-42C7-83BD-6DD3D0CE3CF8}
- php4DelphiR2009.dpk
- True
- Debug
- 1
- Package
- VCL
- 18.2
- Win32
-
-
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- true
- Base
- true
-
-
- 1
- php4Delphi (run-rime)
- Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
- php4DelphiR2009
- true
- 1049
- false
- true
- true
- true
- false
- CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
- 00400000
- false
- false
- false
-
-
- android-support-v4.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services.dex.jar
-
-
- php4DelphiR2009_Icon.ico
- 1033
- true
- CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)
- Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
-
-
- 0
- false
- RELEASE;$(DCC_Define)
- 0
-
-
- true
- false
- DEBUG;$(DCC_Define)
-
-
-
- MainSource
-
-
-
- Cfg_2
- Base
-
-
- Base
-
-
- Cfg_1
- Base
-
-
-
- Delphi.Personality.12
- Package
-
-
-
- php4DelphiR2009.dpk
-
-
-
- False
- True
-
-
- 12
-
-
-
-
+
+
+ {B0FA1B58-2442-42C7-83BD-6DD3D0CE3CF8}
+ php4DelphiR2009.dpk
+ True
+ Debug
+ 1
+ Package
+ VCL
+ 18.2
+ Win32
+ DCC32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ 0
+ false
+ ..\..\..\..\Public\Documents\RAD Studio\6.0\Bpl\php4DelphiR2009.bpl
+ php4Delphi (run-rime)
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ php4DelphiR2009
+ true
+ 1049
+ false
+ true
+ true
+ true
+ false
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ 00400000
+ false
+ false
+ false
+
+
+ 0
+ false
+ RELEASE;$(DCC_Define)
+ 0
+
+
+ true
+ false
+ DEBUG;$(DCC_Define)
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Base
+
+
+ Cfg_2
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiR2009.dpk
+
+
+ False
+ True
+ False
+
+
+ True
+ False
+ 1
+ 0
+ 0
+ 0
+ False
+ False
+ False
+ False
+ False
+ 1058
+ 1251
+
+
+
+
+ 1.0.0.0
+
+
+
+
+
+ 1.0.0.0
+
+
+
+
+ False
+ True
+
+
+ 12
+
+
diff --git a/Source/php4DelphiR2009.dproj.local b/Source/php4DelphiR2009.dproj.local
deleted file mode 100644
index b3811b7..0000000
--- a/Source/php4DelphiR2009.dproj.local
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/Source/php4DelphiR2009.res b/Source/php4DelphiR2009.res
index b946c3c..4ed2b32 100644
Binary files a/Source/php4DelphiR2009.res and b/Source/php4DelphiR2009.res differ
diff --git a/Source/php4DelphiR2009.stat b/Source/php4DelphiR2009.stat
deleted file mode 100644
index 32ee432..0000000
--- a/Source/php4DelphiR2009.stat
+++ /dev/null
@@ -1,10 +0,0 @@
-[Stats]
-EditorSecs=1
-DesignerSecs=1
-InspectorSecs=1
-CompileSecs=1
-OtherSecs=1
-StartTime=21.09.2018 3:08:17
-RealKeys=0
-EffectiveKeys=0
-DebugSecs=1
diff --git a/Source/php4DelphiR2010.dproj.local b/Source/php4DelphiR2010.dproj.local
deleted file mode 100644
index 2c5c945..0000000
--- a/Source/php4DelphiR2010.dproj.local
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
- 1899.12.30 00:00:00.000.755,C:\Users\User\Desktop\soulengine-5554e3db061d08b94f439be26ed071a74c30071c\php4delphi\php4DelphiR2010.dproj=C:\Users\User\Desktop\soulengine-5554e3db061d08b94f439be26ed071a74c30071c\php4delphi\php4DelphiR2010.dproj
-
-
diff --git a/Source/php4DelphiR2010.identcache b/Source/php4DelphiR2010.identcache
deleted file mode 100644
index 827b7ad..0000000
Binary files a/Source/php4DelphiR2010.identcache and /dev/null differ
diff --git a/Source/php4DelphiR2010.lpk b/Source/php4DelphiR2010.lpk
new file mode 100644
index 0000000..15061d0
--- /dev/null
+++ b/Source/php4DelphiR2010.lpk
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/php4DelphiR2010.stat b/Source/php4DelphiR2010.stat
deleted file mode 100644
index a623f2e..0000000
--- a/Source/php4DelphiR2010.stat
+++ /dev/null
@@ -1,10 +0,0 @@
-[Stats]
-EditorSecs=3026
-DesignerSecs=1
-InspectorSecs=3
-CompileSecs=87688
-OtherSecs=331
-StartTime=29.07.4016 22:02:01
-RealKeys=0
-EffectiveKeys=0
-DebugSecs=1
diff --git a/Source/php4DelphiR5.dpk b/Source/php4DelphiR5.dpk
index e1c6298..555ae25 100644
--- a/Source/php4DelphiR5.dpk
+++ b/Source/php4DelphiR5.dpk
@@ -38,13 +38,12 @@ contains
DelphiFunctions in 'DelphiFunctions.pas',
php4delphi in 'php4delphi.pas',
PHPAPI in 'PHPAPI.pas',
+ phpModules in 'phpModules.pas',
PHPLibrary in 'PHPLibrary.pas',
- phpCustomLibrary in 'phpCustomLibrary.pas',
- phpFunctions in 'phpFunctions.pas',
+ PHPFunctions in 'PHPFunctions.pas',
PHPTypes in 'PHPTypes.pas',
ZENDTypes in 'ZENDTypes.pas',
phpClass in 'phpClass.pas',
- phpModules in 'phpModules.pas',
PHPCommon in 'PHPCommon.pas';
END.
diff --git a/Source/php4DelphiR5.dproj.local b/Source/php4DelphiR5.dproj.local
deleted file mode 100644
index b3811b7..0000000
--- a/Source/php4DelphiR5.dproj.local
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/Source/php4DelphiR5.identcache b/Source/php4DelphiR5.identcache
deleted file mode 100644
index ad5b648..0000000
Binary files a/Source/php4DelphiR5.identcache and /dev/null differ
diff --git a/Source/php4DelphiR5.stat b/Source/php4DelphiR5.stat
deleted file mode 100644
index 7e8d660..0000000
--- a/Source/php4DelphiR5.stat
+++ /dev/null
@@ -1,10 +0,0 @@
-[Stats]
-EditorSecs=96
-DesignerSecs=1
-InspectorSecs=1
-CompileSecs=9481
-OtherSecs=55
-StartTime=21.09.2018 3:07:56
-RealKeys=0
-EffectiveKeys=0
-DebugSecs=1
diff --git a/Source/php4DelphiR6.dpk b/Source/php4DelphiR6.dpk
index b96a100..78e7aa7 100644
--- a/Source/php4DelphiR6.dpk
+++ b/Source/php4DelphiR6.dpk
@@ -30,22 +30,21 @@ package php4DelphiR6;
{$RUNONLY}
{$IMPLICITBUILD OFF}
-rrequires
+requires
rtl,
vcl;
-ocontains
+contains
ZENDAPI in 'ZENDAPI.pas',
DelphiFunctions in 'DelphiFunctions.pas',
php4delphi in 'php4delphi.pas',
PHPAPI in 'PHPAPI.pas',
phpModules in 'phpModules.pas',
PHPLibrary in 'PHPLibrary.pas',
- phpCustomLibrary in 'phpCustomLibrary.pas',
PHPFunctions in 'PHPFunctions.pas',
- ZendTypes in 'ZendTypes.pas',
- phpTypes in 'phpTypes.pas',
+ PHPTypes in 'PHPTypes.pas',
+ ZENDTypes in 'ZENDTypes.pas',
phpClass in 'phpClass.pas',
PHPCommon in 'PHPCommon.pas';
-d.
+end.
diff --git a/Source/php4DelphiR6.dproj.local b/Source/php4DelphiR6.dproj.local
deleted file mode 100644
index b3811b7..0000000
--- a/Source/php4DelphiR6.dproj.local
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/Source/php4DelphiR6.stat b/Source/php4DelphiR6.stat
deleted file mode 100644
index 0c40d2a..0000000
--- a/Source/php4DelphiR6.stat
+++ /dev/null
@@ -1,10 +0,0 @@
-[Stats]
-EditorSecs=1
-DesignerSecs=1
-InspectorSecs=1
-CompileSecs=1
-OtherSecs=1
-StartTime=21.09.2018 3:07:52
-RealKeys=0
-EffectiveKeys=0
-DebugSecs=1
diff --git a/Source/php4DelphiR7.cfg b/Source/php4DelphiR7.cfg
new file mode 100644
index 0000000..290f5ea
--- /dev/null
+++ b/Source/php4DelphiR7.cfg
@@ -0,0 +1,40 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O-
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W+
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
+-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
+-DDEBUG
+-Z
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/Source/php4DelphiR7.dof b/Source/php4DelphiR7.dof
new file mode 100644
index 0000000..f3d0e61
--- /dev/null
+++ b/Source/php4DelphiR7.dof
@@ -0,0 +1,136 @@
+[FileVersion]
+Version=7.0
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=0
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=1
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=1
+SymbolLibrary=1
+SymbolPlatform=1
+UnitLibrary=1
+UnitPlatform=1
+UnitDeprecated=1
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=php4Delphi (run-rime)
+[Directories]
+OutputDir=
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=
+Conditionals=DEBUG
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=
+HostApplication=
+Launcher=
+UseLauncher=0
+DebugCWD=
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+[Version Info]
+IncludeVerInfo=1
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1058
+CodePage=1251
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
diff --git a/Source/php4DelphiR7.dpk b/Source/php4DelphiR7.dpk
index cbc7fef..dc295fa 100644
--- a/Source/php4DelphiR7.dpk
+++ b/Source/php4DelphiR7.dpk
@@ -41,7 +41,6 @@ contains
PHPAPI in 'PHPAPI.pas',
phpModules in 'phpModules.pas',
PHPLibrary in 'PHPLibrary.pas',
- phpCustomLibrary in 'phpCustomLibrary.pas',
PHPFunctions in 'PHPFunctions.pas',
PHPTypes in 'PHPTypes.pas',
ZENDTypes in 'ZENDTypes.pas',
diff --git a/Source/php4DelphiR7.dproj.local b/Source/php4DelphiR7.dproj.local
deleted file mode 100644
index b3811b7..0000000
--- a/Source/php4DelphiR7.dproj.local
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/Source/php4DelphiR7.identcache b/Source/php4DelphiR7.identcache
deleted file mode 100644
index 5416a41..0000000
Binary files a/Source/php4DelphiR7.identcache and /dev/null differ
diff --git a/Source/php4DelphiR7.stat b/Source/php4DelphiR7.stat
deleted file mode 100644
index d2541d1..0000000
--- a/Source/php4DelphiR7.stat
+++ /dev/null
@@ -1,10 +0,0 @@
-[Stats]
-EditorSecs=157
-DesignerSecs=1
-InspectorSecs=1
-CompileSecs=5944
-OtherSecs=23
-StartTime=21.09.2018 3:08:01
-RealKeys=0
-EffectiveKeys=0
-DebugSecs=1
diff --git a/Source/php4DelphiRRio.dpk b/Source/php4DelphiRRio.dpk
new file mode 100644
index 0000000..74a511b
--- /dev/null
+++ b/Source/php4DelphiRRio.dpk
@@ -0,0 +1,50 @@
+package php4DelphiRRio;
+
+{$R *.res}
+{$R 'php4delphi.dcr'}
+{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
+{$ALIGN 8}
+{$ASSERTIONS ON}
+{$BOOLEVAL OFF}
+{$DEBUGINFO ON}
+{$EXTENDEDSYNTAX ON}
+{$IMPORTEDDATA ON}
+{$IOCHECKS ON}
+{$LOCALSYMBOLS ON}
+{$LONGSTRINGS ON}
+{$OPENSTRINGS ON}
+{$OPTIMIZATION OFF}
+{$OVERFLOWCHECKS OFF}
+{$RANGECHECKS OFF}
+{$REFERENCEINFO ON}
+{$SAFEDIVIDE OFF}
+{$STACKFRAMES ON}
+{$TYPEDADDRESS OFF}
+{$VARSTRINGCHECKS ON}
+{$WRITEABLECONST OFF}
+{$MINENUMSIZE 1}
+{$IMAGEBASE $400000}
+{$DEFINE DEBUG}
+{$ENDIF IMPLICITBUILDING}
+{$DESCRIPTION 'php4Delphi (run-rime)'}
+{$RUNONLY}
+{$IMPLICITBUILD OFF}
+
+requires
+ rtl,
+ vcl;
+
+contains
+ ZENDAPI in 'ZENDAPI.pas',
+ DelphiFunctions in 'DelphiFunctions.pas',
+ php4delphi in 'php4delphi.pas',
+ PHPAPI in 'PHPAPI.pas',
+ phpModules in 'phpModules.pas',
+ PHPLibrary in 'PHPLibrary.pas',
+ PHPFunctions in 'PHPFunctions.pas',
+ PHPTypes in 'PHPTypes.pas',
+ ZENDTypes in 'ZENDTypes.pas',
+ phpClass in 'phpClass.pas',
+ PHPCommon in 'PHPCommon.pas';
+
+end.
diff --git a/Source/php4DelphiRRio.dproj b/Source/php4DelphiRRio.dproj
new file mode 100644
index 0000000..b61998b
--- /dev/null
+++ b/Source/php4DelphiRRio.dproj
@@ -0,0 +1,806 @@
+
+
+ {E17417E2-2EC1-4971-BB34-C9C25AFF27A5}
+ php4DelphiRRio.dpk
+ True
+ Debug
+ 1
+ Package
+ VCL
+ 18.7
+ Win32
+
+
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Cfg_2
+ true
+ true
+
+
+ 1
+ php4Delphi (run-rime)
+ Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
+ php4DelphiRRio
+ true
+ 1049
+ false
+ true
+ true
+ true
+ false
+ CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
+ 00400000
+ false
+ false
+ false
+
+
+ php4DelphiR2010_Icon.ico
+ 1033
+ true
+ CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)
+ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
+
+
+ 0
+ false
+ RELEASE;$(DCC_Define)
+ 0
+
+
+ true
+ false
+ DEBUG;$(DCC_Define)
+
+
+ true
+ 1033
+ CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName);FileDescription=$(ModuleName);ProductName=$(ModuleName)
+ php4delphi;$(DCC_UnitSearchPath)
+
+
+
+ MainSource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cfg_2
+ Base
+
+
+ Base
+
+
+ Cfg_1
+ Base
+
+
+
+ Delphi.Personality.12
+ Package
+
+
+
+ php4DelphiRRio.dpk
+
+
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
+ Microsoft Office XP Sample Automation Server Wrapper Components
+ File C:\USERS\PUBLIC\DOCUMENTS\EMBARCADERO\STUDIO\18.0\bpl\dcllmdlegacy240.bpl not found
+
+
+
+ True
+
+
+
+
+ php4DelphiRRio.bpl
+ true
+
+
+
+
+ 1
+
+
+ 0
+
+
+
+
+ classes
+ 1
+
+
+
+
+ res\xml
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ library\lib\armeabi
+ 1
+
+
+
+
+ library\lib\mips
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+
+
+ res\values-v21
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+
+
+ res\drawable
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ res\drawable-ldpi
+ 1
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-mdpi
+ 1
+
+
+
+
+ res\drawable-hdpi
+ 1
+
+
+
+
+ res\drawable-xhdpi
+ 1
+
+
+
+
+ res\drawable-xxhdpi
+ 1
+
+
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+
+
+ res\drawable-small
+ 1
+
+
+
+
+ res\drawable-normal
+ 1
+
+
+
+
+ res\drawable-large
+ 1
+
+
+
+
+ res\drawable-xlarge
+ 1
+
+
+
+
+ res\values
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+
+
+ 1
+ .framework
+
+
+ 1
+ .framework
+
+
+ 0
+
+
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 0
+ .dll;.bpl
+
+
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 1
+ .dylib
+
+
+ 0
+ .bpl
+
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+ 1
+
+
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
+ 1
+
+
+
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+
+
+
+
+
+ Contents\Resources
+ 1
+
+
+ Contents\Resources
+ 1
+
+
+
+
+ library\lib\armeabi-v7a
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+
+
+ 1
+
+
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+ Assets
+ 1
+
+
+ Assets
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+ 12
+
+
+
+
+
diff --git a/Source/php4delphi.pas b/Source/php4delphi.pas
index 1d19cbb..e3381b0 100644
--- a/Source/php4delphi.pas
+++ b/Source/php4delphi.pas
@@ -1,385 +1,427 @@
-{*******************************************************}
-{ PHP4Delphi }
-{ PHP - Delphi interface }
-{ }
-{ Developers: }
-{ Serhiy Perevoznyk }
-{ serge_perevoznyk@hotmail.com }
-{ }
-{ Toby Allen (Documentation) }
-{ tobyphp@toflidium.com }
-{ }
-{ http://users.telenet.be/ws36637 }
-{ http://delphi32.blogspot.com }
-{*******************************************************}
-{$I PHP.INC}
-{$ifdef fpc}
- {$mode delphi}
-{$endif}
-{ $Id: php4delphi.pas,v 7.4 02/2019 delphi32 Exp $ }
-
-// Important:
-// Please check PHP version you are using and change php.inc file
-// See php.inc for more details
-
-{
-You can download the latest version of PHP from
-http://www.php.net/downloads.php
-You have to download and install PHP separately.
-It is not included in the package.
-
-For more information on the PHP Group and the PHP project,
-please see .
-}
-unit php4delphi;
-
-interface
-
-uses
- Windows, Messages, SysUtils, System.Types, Classes, VCL.Graphics,
- PHPCommon, WinApi.WinSock,
- ZendTypes, PHPTypes, PHPAPI, ZENDAPI,
- DelphiFunctions, phpFunctions, strUtils, varUtils,
- {$IFDEF soulengine_build} VCL.Dialogs, {$ENDIF}
- System.UITypes;
-
-type
-
- IPHPEngine = interface (IUnknown)
- ['{484AE2CA-755A-437C-9B60-E3735973D0A9}']
- procedure HandleRequest(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer);
- function GetEngineActive : boolean;
- end;
- TPHPMemoryStream = class(TMemoryStream)
- public
- constructor Create;
- procedure SetInitialSize(ASize : integer);
- end;
- {-- PHP Events --}
- TPHPLogMessage = procedure (Sender : TObject; AText : zend_ustr) of object;
- TPHPErrorEvent = procedure (Sender: TObject; AText: zend_ustr;
- AType: integer; AFileName: zend_ustr; ALineNo: integer) of object;
- TPHPReadPostEvent = procedure(Sender : TObject; Stream : TStream) of object;
- TPHPReadResultEvent = procedure(Sender : TObject; Stream : TStream) of object;
-
- { TpsvCustomPHP }
- TpsvCustomPHP = class(TPHPComponent)
- private
- FHeaders : TPHPHeaders;
- FMaxExecutionTime : integer;
- FExecuteMethod : TPHPExecuteMethod;
- FSessionActive : boolean;
- FOnRequestStartup : TNotifyEvent;
- FOnRequestShutdown : TNotifyEvent;
- FAfterExecute : TNotifyEvent;
- FBeforeExecute : TNotifyEvent;
- FTerminated : boolean;
- FVariables : TPHPVariables;
- FBuffer : TPHPMemoryStream;
- FOnLogMessage : TPHPLogMessage;
- FOnScriptError : TPHPErrorEvent;
- FFileName : zend_ustr;
- {$IFDEF PHP4}
- FWriterHandle : THandle;
- FVirtualReadHandle : THandle;
- FVirtualWriteHandle : THandle;
- FVirtualCode : zend_ustr;
- {$ENDIF}
- FUseDelimiters : boolean;
- FUseMapping : boolean;
- FPostStream : TMemoryStream;
- FOnReadPost : TPHPReadPostEvent;
- FRequestType : TPHPRequestType;
- FOnReadResult : TPHPReadResultEvent;
- FContentType: zend_ustr;
- {$IFDEF PHP5}
- FVirtualStream : TMemoryStream;
- {$ENDIF}
- procedure SetVariables(Value : TPHPVariables);
- procedure SetHeaders(Value : TPHPHeaders);
- function GetVariableCount: integer;
- protected
-
- procedure ClearBuffer;
- procedure ClearHeaders;
- procedure PrepareResult; virtual;
- procedure PrepareVariables; virtual;
- function RunTime : boolean;
- function GetThreadSafeResourceManager : pointer;
- function CreateVirtualFile(ACode : zend_ustr) : boolean;
- procedure CloseVirtualFile;
- {$IFDEF PHP4}
- property VirtualCode : string read FVirtualCode;
- {$ENDIF}
- function GetEngine : IPHPEngine;
- public
- TSRMLS_D : pointer;
- Thread: TThread;
- {fixed}
- procedure StartupRequest; virtual;
- procedure ShutdownRequest; virtual;
- {/fixed}
-
- constructor Create(AOwner : TComponent); override;
- destructor Destroy; override;
- function EngineActive : boolean;
- function Execute : zend_ustr; overload;
- function Execute(AFileName : zend_ustr) : zend_ustr; overload;
- function RunCode(ACode : zend_ustr) : zend_ustr; overload;
- function RunCode(ACode : TStrings) : string; overload;
- function VariableByName(AName : zend_ustr) : TPHPVariable;
- property PostStream : TMemoryStream read FPostStream;
- property ExecuteMethod : TPHPExecuteMethod read FExecuteMethod write FExecuteMethod default emServer;
- property FileName : zend_ustr read FFileName write FFileName;
- property Variables : TPHPVariables read FVariables write SetVariables;
- property VariableCount : integer read GetVariableCount;
- property OnLogMessage : TPHPLogMessage read FOnLogMessage write FOnLogMessage;
- property OnScriptError : TPHPErrorEvent read FOnScriptError write FOnScriptError;
- property OnRequestStartup : TNotifyEvent read FOnRequestStartup write FOnRequestStartup;
- property OnRequestShutdown : TNotifyEvent read FOnRequestShutdown write FOnRequestShutdown;
- property BeforeExecute : TNotifyEvent read FBeforeExecute write FBeforeExecute;
- property AfterExecute : TNotifyEvent read FAfterExecute write FAfterExecute;
- property ThreadSafeResourceManager : pointer read GetThreadSafeResourceManager;
- property SessionActive : boolean read FSessionActive;
- property UseDelimiters : boolean read FUseDelimiters write FUseDelimiters default true;
- property MaxExecutionTime : integer read FMaxExecutionTime write FMaxExecutionTime default 0;
- property Headers : TPHPHeaders read FHeaders write SetHeaders;
- property OnReadPost : TPHPReadPostEvent read FOnReadPost write FOnReadPost;
- property RequestType : TPHPRequestType read FRequestType write FRequestType default prtGet;
- property ResultBuffer : TPHPMemoryStream read FBuffer;
- property OnReadResult : TPHPReadResultEvent read FOnReadResult write FOnReadResult;
- property ContentType : zend_ustr read FContentType write FContentType;
- end;
-
- TpsvPHP = class(TpsvCustomPHP)
- published
- property About;
- property FileName;
- property Variables;
- property OnLogMessage;
- property OnScriptError;
- property OnRequestStartup;
- property OnRequestShutdown;
- property OnReadPost;
- property BeforeExecute;
- property AfterExecute;
- property UseDelimiters;
- property MaxExecutionTime;
- property RequestType;
- property OnReadResult;
- property ContentType;
- end;
-
- TCustomPHPLibrary = class(TPHPComponent)
- private
- FExecutor : TpsvCustomPHP;
- FLibraryName : zend_ustr;
- FFunctions : TPHPFunctions;
- FLocked: boolean;
- procedure SetFunctions(const Value : TPHPFunctions);
- procedure SetExecutor(AValue : TpsvCustomPHP);
- procedure SetLibraryName(AValue : zend_ustr);
- protected
- procedure RegisterLibrary; virtual;
- procedure UnregisterLibrary; virtual;
- public
- constructor Create(AOwner : TComponent); override;
- destructor Destroy; override;
- procedure Refresh; virtual;
- property Executor : TpsvCustomPHP read FExecutor write SetExecutor;
- property LibraryName : zend_ustr read FLibraryName write SetLibraryName;
- property Functions : TPHPFunctions read FFunctions write SetFunctions;
- property Locked : boolean read FLocked write FLocked;
- end;
- { TPHPEngine }
-
- TPHPEngine = class(TPHPComponent, IUnknown, IPHPEngine)
- private
- FINIPath : zend_ustr;
- FOnEngineStartup : TNotifyEvent;
- FOnEngineShutdown : TNotifyEvent;
- FEngineActive : boolean;
- FHandleErrors : boolean;
- {$IFNDEF PHP540}
- FSafeMode : boolean;
- FSafeModeGid : boolean;
- {$ENDIF}
- FRegisterGlobals : boolean;
- FHTMLErrors : boolean;
- FMaxInputTime : integer;
- FConstants : TphpConstants;
- FDLLFolder : zend_ustr;
- FReportDLLError : boolean;
- FLock: TRTLCriticalSection;
- FOnScriptError : TPHPErrorEvent;
- FOnLogMessage : TPHPLogMessage;
- FWaitForShutdown : boolean;
- FHash : TStringList;
- FLibraryModule : Tzend_module_entry;
- FLibraryEntryTable : array of zend_function_entry;
- FRequestCount : integer;
- procedure SetConstants(Value : TPHPConstants);
- function GetConstantCount: integer;
- function GetEngineActive : boolean;
- protected
- MyFuncs: TStringList;
- TSRMLS_D : pppointer;
- procedure StartupPHP; virtual;
- procedure PrepareEngine; virtual;
- procedure PrepareIniEntry; virtual;
- procedure RegisterConstants; virtual;
- procedure RegisterInternalConstants(TSRMLS_DC : pointer); virtual;
- procedure HandleRequest(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); virtual;
- property RequestCount : integer read FRequestCount;
- procedure HandleError (Sender : TObject; AText : string; AType : Integer; AFileName : string; ALineNo : integer);
- procedure HandleLogMessage(Sender : TObject; AText : string);
- procedure RegisterLibrary(ALib : TCustomPHPLibrary);
- procedure RefreshLibrary;
- procedure UnlockLibraries;
- procedure RemoveRequest;
- procedure AddRequest;
- public
- constructor Create(AOwner : TComponent); override;
- destructor Destroy; override;
- procedure AddFunction(FN: zend_ustr; Func: Pointer);
- procedure StartupEngine; virtual;
- procedure ShutdownEngine; virtual;
- procedure LockEngine; virtual;
- procedure UnlockEngine; virtual;
- procedure PrepareForShutdown; virtual;
- property EngineActive : boolean read GetEngineActive;
- property ConstantCount : integer read GetConstantCount;
- property WaitForShutdown : boolean read FWaitForShutdown;
- procedure ShutdownAndWaitFor; virtual;
- property LibraryEntry : Tzend_module_entry read FLibraryModule;
- published
- property HandleErrors : boolean read FHandleErrors write FHandleErrors default true;
- property OnEngineStartup : TNotifyEvent read FOnEngineStartup write FOnEngineStartup;
- property OnEngineShutdown : TNotifyEvent read FOnEngineShutdown write FOnEngineShutdown;
- property OnScriptError : TPHPErrorEvent read FOnScriptError write FOnScriptError;
- property OnLogMessage : TPHPLogMessage read FOnLogMessage write FOnLogMessage;
- property IniPath : zend_ustr read FIniPath write FIniPath;
- {$IFNDEF PHP540}
- property SafeMode : boolean read FSafeMode write FSafeMode default false;
- property SafeModeGid : boolean read FSafeModeGid write FSafeModeGid default false;
- {$ENDIF}
- property RegisterGlobals : boolean read FRegisterGlobals write FRegisterGlobals default true;
- property HTMLErrors : boolean read FHTMLErrors write FHTMLErrors default false;
- property MaxInputTime : integer read FMaxInputTime write FMaxInputTime default 0;
- property Constants : TPHPConstants read FConstants write SetConstants;
- property DLLFolder : zend_ustr read FDLLFolder write FDLLFolder;
- property ReportDLLError : boolean read FReportDLLError write FReportDLLError;
- end;
-
- TPHPLibrarian = class
- private
- FLibraries : TList;
- public
- constructor Create; virtual;
- destructor Destroy; override;
- procedure AddLibrary(ALibrary : TCustomPHPLibrary);
- procedure RemoveLibrary(ALibrary : TCustomPHPLibrary);
- function Count : integer;
- function GetLibrary(Index : integer) : TCustomPHPLibrary;
- property Libraries : TList read FLibraries write FLibraries;
- end;
-{$IFDEF REGISTER_COLORS}
-const
- Colors: array[0..41] of TIdentMapEntry = (
- (Value: clBlack; Name: 'clBlack'),
- (Value: clMaroon; Name: 'clMaroon'),
- (Value: clGreen; Name: 'clGreen'),
- (Value: clOlive; Name: 'clOlive'),
- (Value: clNavy; Name: 'clNavy'),
- (Value: clPurple; Name: 'clPurple'),
- (Value: clTeal; Name: 'clTeal'),
- (Value: clGray; Name: 'clGray'),
- (Value: clSilver; Name: 'clSilver'),
- (Value: clRed; Name: 'clRed'),
- (Value: clLime; Name: 'clLime'),
- (Value: clYellow; Name: 'clYellow'),
- (Value: clBlue; Name: 'clBlue'),
- (Value: clFuchsia; Name: 'clFuchsia'),
- (Value: clAqua; Name: 'clAqua'),
- (Value: clWhite; Name: 'clWhite'),
- (Value: clScrollBar; Name: 'clScrollBar'),
- (Value: clBackground; Name: 'clBackground'),
- (Value: clActiveCaption; Name: 'clActiveCaption'),
- (Value: clInactiveCaption; Name: 'clInactiveCaption'),
- (Value: clMenu; Name: 'clMenu'),
- (Value: clWindow; Name: 'clWindow'),
- (Value: clWindowFrame; Name: 'clWindowFrame'),
- (Value: clMenuText; Name: 'clMenuText'),
- (Value: clWindowText; Name: 'clWindowText'),
- (Value: clCaptionText; Name: 'clCaptionText'),
- (Value: clActiveBorder; Name: 'clActiveBorder'),
- (Value: clInactiveBorder; Name: 'clInactiveBorder'),
- (Value: clAppWorkSpace; Name: 'clAppWorkSpace'),
- (Value: clHighlight; Name: 'clHighlight'),
- (Value: clHighlightText; Name: 'clHighlightText'),
- (Value: clBtnFace; Name: 'clBtnFace'),
- (Value: clBtnShadow; Name: 'clBtnShadow'),
- (Value: clGrayText; Name: 'clGrayText'),
- (Value: clBtnText; Name: 'clBtnText'),
- (Value: clInactiveCaptionText; Name: 'clInactiveCaptionText'),
- (Value: clBtnHighlight; Name: 'clBtnHighlight'),
- (Value: cl3DDkShadow; Name: 'cl3DDkShadow'),
- (Value: cl3DLight; Name: 'cl3DLight'),
- (Value: clInfoText; Name: 'clInfoText'),
- (Value: clInfoBk; Name: 'clInfoBk'),
- (Value: clNone; Name: 'clNone'));
-{$ENDIF}
-var
- Librarian : TPHPLibrarian = nil;
- delphi_sapi_module : sapi_module_struct;
- PHPEngine : TPHPEngine = nil;
- {$IFDEF soulengine_build}
- log_handler_php: string;
- fatal_handler_php: string;
- phpmd: TpsvPHP;
- {$ENDIF}
-implementation
-
-function AddSlashes(const S: zend_ustr): zend_ustr;
-begin
- Result := StringReplace(S, chr(8), '8', [rfReplaceAll]);
- Result := StringReplace(S, '\', '\\', [rfReplaceAll]);
- Result := StringReplace(Result, '''', '\''', [rfReplaceAll]);
- Result := StringReplace(Result, '', '''."<".chr(' + IntToStr(Ord('?')) +
- ').''', [rfReplaceAll]);
-end;
-
-{ TCustomPHPLibrary }
-
-constructor TCustomPHPLibrary.Create(AOwner: TComponent);
-begin
- inherited;
- FFunctions := TPHPFunctions.Create(Self, TPHPFunction);
- RegisterLibrary;
-end;
-
-destructor TCustomPHPLibrary.Destroy;
-begin
- UnregisterLibrary;
- FFunctions.Free;
- FFunctions := nil;
- inherited;
-end;
-
-procedure TCustomPHPLibrary.Refresh;
-begin
-end;
-
-
-procedure TCustomPHPLibrary.RegisterLibrary;
-begin
- if Assigned(Librarian) then
- Librarian.AddLibrary(Self);
-end;
-
-procedure TCustomPHPLibrary.SetExecutor(AValue: TpsvCustomPHP);
+{*******************************************************}
+{ PHP4Delphi }
+{ PHP - Delphi interface }
+{ }
+{ Developers: }
+{ Serhiy Perevoznyk }
+{ serge_perevoznyk@hotmail.com }
+{ }
+{ Toby Allen (Documentation) }
+{ tobyphp@toflidium.com }
+{ }
+{ http://users.telenet.be/ws36637 }
+{ http://delphi32.blogspot.com }
+{*******************************************************}
+{$I PHP.INC}
+{$ifdef fpc}
+ {$mode delphi}
+{$endif}
+{ $Id: php4delphi.pas,v 7.4 02/2019 delphi32 Exp $ }
+
+// Important:
+// Please check PHP version you are using and change php.inc file
+// See php.inc for more details
+
+{
+You can download the latest version of PHP from
+http://www.php.net/downloads.php
+You have to download and install PHP separately.
+It is not included in the package.
+
+For more information on the PHP Group and the PHP project,
+please see .
+}
+unit php4delphi;
+
+interface
+
+uses
+ Windows, Messages, SysUtils,
+ {$if CompilerVersion > 21}
+ System.Types,
+ {$else}
+ Types,
+ {$ifend}
+ Classes,
+ {$if defined(REGISTER_COLOURS) or defined(php_side_handler)}
+
+ {$if defined(LCL) or (defined(VCL) and (CompilerVersion < 22))}
+ Graphics,
+ {$ifdef php_side_handler}
+ Dialogs,
+ {$endif}
+{$elseif defined(KYLIX)}
+ QGraphics,
+ {$ifdef php_side_handler}
+ QDialogs,
+ {$endif}
+{$elseif defined(FMX)}
+ FMX.GraphConsts,
+ {$ifdef php_side_handler}
+ FMX.Dialogs,
+ {$endif}
+{$elseif defined(VCL)}
+ VCL.Graphics,
+ {$ifdef php_side_handler}
+ VCL.Dialogs,
+ {$endif}
+{$ifend}
+ {$ifend}
+ PHPCommon,
+ {$if CompilerVersion > 21}
+ WinApi.WinSock,
+ {$else}
+ WinSock,
+ {$ifend}
+
+ ZendTypes, PHPTypes, PHPAPI, ZENDAPI,
+ DelphiFunctions, phpFunctions, strUtils, varUtils
+ {$IFDEF PHP_UNICODE}, WideStrUtils{$ENDIF}
+ {$if CompilerVersion > 21}
+ , System.UITypes
+ {$ifend};
+
+type
+
+ IPHPEngine = interface (IUnknown)
+ ['{484AE2CA-755A-437C-9B60-E3735973D0A9}']
+ procedure HandleRequest(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer);
+ function GetEngineActive : boolean;
+ end;
+ TPHPMemoryStream = class(TMemoryStream)
+ public
+ constructor Create;
+ procedure SetInitialSize(ASize : integer);
+ end;
+ {-- PHP Events --}
+ TPHPLogMessage = procedure (Sender : TObject; AText : zend_ustr) of object;
+ TPHPErrorEvent = procedure (Sender: TObject; AText: zend_ustr;
+ AType: integer; AFileName: zend_ustr; ALineNo: integer) of object;
+ TPHPReadPostEvent = procedure(Sender : TObject; Stream : TStream) of object;
+ TPHPReadResultEvent = procedure(Sender : TObject; Stream : TStream) of object;
+
+ { TpsvCustomPHP }
+ TpsvCustomPHP = class(TPHPComponent)
+ private
+ FHeaders : TPHPHeaders;
+ FMaxExecutionTime : integer;
+ FExecuteMethod : TPHPExecuteMethod;
+ FSessionActive : boolean;
+ FOnRequestStartup : TNotifyEvent;
+ FOnRequestShutdown : TNotifyEvent;
+ FAfterExecute : TNotifyEvent;
+ FBeforeExecute : TNotifyEvent;
+ FTerminated : boolean;
+ FVariables : TPHPVariables;
+ FBuffer : TPHPMemoryStream;
+ FOnLogMessage : TPHPLogMessage;
+ FOnScriptError : TPHPErrorEvent;
+ FFileName : zend_ustr;
+ {$IFDEF PHP4}
+ FWriterHandle : THandle;
+ FVirtualReadHandle : THandle;
+ FVirtualWriteHandle : THandle;
+ FVirtualCode : zend_ustr;
+ {$ENDIF}
+ FUseDelimiters : boolean;
+ FUseMapping : boolean;
+ FPostStream : TMemoryStream;
+ FOnReadPost : TPHPReadPostEvent;
+ FRequestType : TPHPRequestType;
+ FOnReadResult : TPHPReadResultEvent;
+ FContentType: zend_ustr;
+ FVirtualStream : TStringStream;
+ procedure SetVariables(Value : TPHPVariables);
+ procedure SetHeaders(Value : TPHPHeaders);
+ function GetVariableCount: integer;
+ protected
+
+ procedure ClearBuffer;
+ procedure ClearHeaders;
+ procedure PrepareResult; virtual;
+ procedure PrepareVariables; virtual;
+ function RunTime : boolean;
+ function GetThreadSafeResourceManager : pointer;
+ function CreateVirtualFile(A_code: zend_ustr) : boolean;
+ procedure CloseVirtualFile;
+ {$IFDEF PHP4}
+ property VirtualCode : string read FVirtualCode;
+ {$ENDIF}
+ function GetEngine : IPHPEngine;
+ public
+ TSRMLS_D : pointer;
+ Thread: TThread;
+ {fixed}
+ procedure StartupRequest; virtual;
+ procedure ShutdownRequest; virtual;
+ {/fixed}
+
+ constructor Create(AOwner : TComponent); override;
+ destructor Destroy; override;
+ function EngineActive : boolean;
+ function Execute : zend_ustr; overload;
+ function Execute(AFileName : zend_ustr) : zend_ustr; overload;
+ function RunCode(ACode : zend_ustr) : zend_ustr; overload;
+ function RunCode(ACode : TStrings) : string; overload;
+ function VariableByName(AName : zend_ustr) : TPHPVariable;
+ property PostStream : TMemoryStream read FPostStream;
+ property ExecuteMethod : TPHPExecuteMethod read FExecuteMethod write FExecuteMethod default emServer;
+ property FileName : zend_ustr read FFileName write FFileName;
+ property Variables : TPHPVariables read FVariables write SetVariables;
+ property VariableCount : integer read GetVariableCount;
+ property OnLogMessage : TPHPLogMessage read FOnLogMessage write FOnLogMessage;
+ property OnScriptError : TPHPErrorEvent read FOnScriptError write FOnScriptError;
+ property OnRequestStartup : TNotifyEvent read FOnRequestStartup write FOnRequestStartup;
+ property OnRequestShutdown : TNotifyEvent read FOnRequestShutdown write FOnRequestShutdown;
+ property BeforeExecute : TNotifyEvent read FBeforeExecute write FBeforeExecute;
+ property AfterExecute : TNotifyEvent read FAfterExecute write FAfterExecute;
+ property ThreadSafeResourceManager : pointer read GetThreadSafeResourceManager;
+ property SessionActive : boolean read FSessionActive;
+ property UseDelimiters : boolean read FUseDelimiters write FUseDelimiters default true;
+ property MaxExecutionTime : integer read FMaxExecutionTime write FMaxExecutionTime default 0;
+ property Headers : TPHPHeaders read FHeaders write SetHeaders;
+ property OnReadPost : TPHPReadPostEvent read FOnReadPost write FOnReadPost;
+ property RequestType : TPHPRequestType read FRequestType write FRequestType default prtGet;
+ property ResultBuffer : TPHPMemoryStream read FBuffer;
+ property OnReadResult : TPHPReadResultEvent read FOnReadResult write FOnReadResult;
+ property ContentType : zend_ustr read FContentType write FContentType;
+ end;
+
+ TpsvPHP = class(TpsvCustomPHP)
+ published
+ property About;
+ property FileName;
+ property Variables;
+ property OnLogMessage;
+ property OnScriptError;
+ property OnRequestStartup;
+ property OnRequestShutdown;
+ property OnReadPost;
+ property BeforeExecute;
+ property AfterExecute;
+ property UseDelimiters;
+ property MaxExecutionTime;
+ property RequestType;
+ property OnReadResult;
+ property ContentType;
+ end;
+
+ TCustomPHPLibrary = class(TPHPComponent)
+ private
+ FExecutor : TpsvCustomPHP;
+ FLibraryName : zend_ustr;
+ FFunctions : TPHPFunctions;
+ FLocked: boolean;
+ procedure SetFunctions(const Value : TPHPFunctions);
+ procedure SetExecutor(AValue : TpsvCustomPHP);
+ procedure SetLibraryName(AValue : zend_ustr);
+ protected
+ procedure RegisterLibrary; virtual;
+ procedure UnregisterLibrary; virtual;
+ public
+ constructor Create(AOwner : TComponent); override;
+ destructor Destroy; override;
+ procedure Refresh; virtual;
+ property Executor : TpsvCustomPHP read FExecutor write SetExecutor;
+ property LibraryName : zend_ustr read FLibraryName write SetLibraryName;
+ property Functions : TPHPFunctions read FFunctions write SetFunctions;
+ property Locked : boolean read FLocked write FLocked;
+ end;
+ { TPHPEngine }
+ TPHPEngineInitEvent = procedure(Sender:TObject;TSRMLS_DC:Pointer) of object;
+ TPHPEngine = class(TPHPComponent, IUnknown, IPHPEngine)
+ private
+ FINIPath : zend_ustr;
+ FOnEngineStartup : TNotifyEvent;
+ {$if CompilerVersion > 21}
+ FAddMods : TArray;
+ {$else}
+ FAddMods : array of Pzend_module_entry;
+ {$ifend}
+ FOnEngineShutdown : TNotifyEvent;
+ FEngineActive : boolean;
+ FHandleErrors : boolean;
+ {$IFNDEF PHP540}
+ FSafeMode : boolean;
+ FSafeModeGid : boolean;
+ {$ENDIF}
+ FRegisterGlobals : boolean;
+ FHTMLErrors : boolean;
+ FMaxInputTime : integer;
+ FConstants : TphpConstants;
+ FDLLFolder : zend_ustr;
+ FReportDLLError : boolean;
+ FLock: TRTLCriticalSection;
+ FOnScriptError : TPHPErrorEvent;
+ FOnLogMessage : TPHPLogMessage;
+ FWaitForShutdown : boolean;
+ RegNumFunc : Cardinal;
+ FHash : TStringList;
+ FLibraryModule : Tzend_module_entry;
+ FLibraryEntryTable : array of zend_function_entry;
+ FRequestCount : integer;
+ procedure SetConstants(Value : TPHPConstants);
+ function GetConstantCount: integer;
+ function GetEngineActive : boolean;
+ protected
+ TSRMLS_D : pppointer;
+ procedure StartupPHP; virtual;
+ procedure PrepareEngine; virtual;
+ procedure PrepareIniEntry; virtual;
+ procedure RegisterConstants; virtual;
+ procedure RegisterInternalConstants(TSRMLS_DC : pointer); virtual;
+ procedure HandleRequest(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); virtual;
+ property RequestCount : integer read FRequestCount;
+ procedure HandleError (Sender : TObject; AText : string; AType : Integer; AFileName : string; ALineNo : integer);
+ procedure HandleLogMessage(Sender : TObject; AText : string);
+ procedure RegisterLibrary(ALib : TCustomPHPLibrary);
+ procedure RefreshLibrary;
+ procedure UnlockLibraries;
+ procedure RemoveRequest;
+ procedure AddRequest;
+ public
+ constructor Create(AOwner : TComponent); override;
+ destructor Destroy; override;
+ procedure AddFunction(FN: zend_pchar; Func: Pointer);
+ procedure AddModule(Module_entry: Pzend_module_entry);
+ procedure StartupEngine; virtual;
+ procedure ShutdownEngine; virtual;
+ procedure LockEngine; virtual;
+ procedure UnlockEngine; virtual;
+ procedure PrepareForShutdown; virtual;
+ property EngineActive : boolean read GetEngineActive;
+ property ConstantCount : integer read GetConstantCount;
+ property WaitForShutdown : boolean read FWaitForShutdown;
+ procedure ShutdownAndWaitFor; virtual;
+ property LibraryEntry : Tzend_module_entry read FLibraryModule;
+ published
+ property HandleErrors : boolean read FHandleErrors write FHandleErrors default true;
+ property OnEngineStartup : TNotifyEvent read FOnEngineStartup write FOnEngineStartup;
+ property OnEngineShutdown : TNotifyEvent read FOnEngineShutdown write FOnEngineShutdown;
+ property OnScriptError : TPHPErrorEvent read FOnScriptError write FOnScriptError;
+ property OnLogMessage : TPHPLogMessage read FOnLogMessage write FOnLogMessage;
+ property IniPath : zend_ustr read FIniPath write FIniPath;
+ {$IFNDEF PHP540}
+ property SafeMode : boolean read FSafeMode write FSafeMode default false;
+ property SafeModeGid : boolean read FSafeModeGid write FSafeModeGid default false;
+ {$ENDIF}
+ property RegisterGlobals : boolean read FRegisterGlobals write FRegisterGlobals default true;
+ property HTMLErrors : boolean read FHTMLErrors write FHTMLErrors default false;
+ property MaxInputTime : integer read FMaxInputTime write FMaxInputTime default 0;
+ property Constants : TPHPConstants read FConstants write SetConstants;
+ property DLLFolder : zend_ustr read FDLLFolder write FDLLFolder;
+ property ReportDLLError : boolean read FReportDLLError write FReportDLLError;
+ end;
+
+ TPHPLibrarian = class
+ private
+ FLibraries : TList;
+ public
+ constructor Create; virtual;
+ destructor Destroy; override;
+ procedure AddLibrary(ALibrary : TCustomPHPLibrary);
+ procedure RemoveLibrary(ALibrary : TCustomPHPLibrary);
+ function Count : integer;
+ function GetLibrary(Index : integer) : TCustomPHPLibrary;
+ property Libraries : TList read FLibraries write FLibraries;
+ end;
+{$IFDEF REGISTER_COLOURS}
+const
+ Colors: array[0..41] of TIdentMapEntry = (
+ (Value: clBlack; Name: 'clBlack'),
+ (Value: clMaroon; Name: 'clMaroon'),
+ (Value: clGreen; Name: 'clGreen'),
+ (Value: clOlive; Name: 'clOlive'),
+ (Value: clNavy; Name: 'clNavy'),
+ (Value: clPurple; Name: 'clPurple'),
+ (Value: clTeal; Name: 'clTeal'),
+ (Value: clGray; Name: 'clGray'),
+ (Value: clSilver; Name: 'clSilver'),
+ (Value: clRed; Name: 'clRed'),
+ (Value: clLime; Name: 'clLime'),
+ (Value: clYellow; Name: 'clYellow'),
+ (Value: clBlue; Name: 'clBlue'),
+ (Value: clFuchsia; Name: 'clFuchsia'),
+ (Value: clAqua; Name: 'clAqua'),
+ (Value: clWhite; Name: 'clWhite'),
+ (Value: clScrollBar; Name: 'clScrollBar'),
+ (Value: clBackground; Name: 'clBackground'),
+ (Value: clActiveCaption; Name: 'clActiveCaption'),
+ (Value: clInactiveCaption; Name: 'clInactiveCaption'),
+ (Value: clMenu; Name: 'clMenu'),
+ (Value: clWindow; Name: 'clWindow'),
+ (Value: clWindowFrame; Name: 'clWindowFrame'),
+ (Value: clMenuText; Name: 'clMenuText'),
+ (Value: clWindowText; Name: 'clWindowText'),
+ (Value: clCaptionText; Name: 'clCaptionText'),
+ (Value: clActiveBorder; Name: 'clActiveBorder'),
+ (Value: clInactiveBorder; Name: 'clInactiveBorder'),
+ (Value: clAppWorkSpace; Name: 'clAppWorkSpace'),
+ (Value: clHighlight; Name: 'clHighlight'),
+ (Value: clHighlightText; Name: 'clHighlightText'),
+ (Value: clBtnFace; Name: 'clBtnFace'),
+ (Value: clBtnShadow; Name: 'clBtnShadow'),
+ (Value: clGrayText; Name: 'clGrayText'),
+ (Value: clBtnText; Name: 'clBtnText'),
+ (Value: clInactiveCaptionText; Name: 'clInactiveCaptionText'),
+ (Value: clBtnHighlight; Name: 'clBtnHighlight'),
+ (Value: cl3DDkShadow; Name: 'cl3DDkShadow'),
+ (Value: cl3DLight; Name: 'cl3DLight'),
+ (Value: clInfoText; Name: 'clInfoText'),
+ (Value: clInfoBk; Name: 'clInfoBk'),
+ (Value: clNone; Name: 'clNone'));
+{$ENDIF}
+var
+ Librarian : TPHPLibrarian = nil;
+ delphi_sapi_module : sapi_module_struct;
+ PHPEngine : TPHPEngine = nil;
+ {$IFDEF php_side_handler}
+ log_handler_php: string;
+ fatal_handler_php: string;
+ phpmd: TpsvPHP;
+ {$ENDIF}
+implementation
+
+function AddSlashes(const S: zend_ustr): zend_ustr;
+begin
+ Result := StringReplace(S, chr(8), '8', [rfReplaceAll]);
+ Result := StringReplace(S, '\', '\\', [rfReplaceAll]);
+ Result := StringReplace(Result, '''', '\''', [rfReplaceAll]);
+ Result := StringReplace(Result, '', '''."<".chr(' + IntToStr(Ord('?')) +
+ ').''', [rfReplaceAll]);
+end;
+
+{ TCustomPHPLibrary }
+
+constructor TCustomPHPLibrary.Create(AOwner: TComponent);
+begin
+ inherited;
+ FFunctions := TPHPFunctions.Create(Self, TPHPFunction);
+ RegisterLibrary;
+end;
+
+destructor TCustomPHPLibrary.Destroy;
+begin
+ UnregisterLibrary;
+ FFunctions.Free;
+ FFunctions := nil;
+ inherited;
+end;
+
+procedure TCustomPHPLibrary.Refresh;
+begin
+end;
+
+
+procedure TCustomPHPLibrary.RegisterLibrary;
+begin
+ if Assigned(Librarian) then
+ Librarian.AddLibrary(Self);
+end;
+
+procedure TCustomPHPLibrary.SetExecutor(AValue: TpsvCustomPHP);
begin
if FExecutor <> AValue then
begin
@@ -393,358 +435,358 @@ procedure TCustomPHPLibrary.SetExecutor(AValue: TpsvCustomPHP);
end;
end;
end;
-
-procedure TCustomPHPLibrary.SetFunctions(const Value: TPHPFunctions);
-begin
- FFunctions.Assign(Value);
-end;
-
-procedure TCustomPHPLibrary.SetLibraryName(AValue: zend_ustr);
-begin
- if FLibraryName <> AValue then
- begin
- FLibraryName := AValue;
- end;
-end;
-
-procedure TCustomPHPLibrary.UnregisterLibrary;
-begin
- if Assigned(Librarian) then
- Librarian.RemoveLibrary(Self);
-end;
-
-
-procedure InitLibrarian;
-begin
- Librarian := TPHPLibrarian.Create;
-end;
-
-procedure UninitLibrarian;
-begin
- if Assigned(Librarian) then
- try
- Librarian.Free;
- finally
- Librarian := nil;
- end;
-end;
-
-{ TPHPLibrarian }
-
-procedure TPHPLibrarian.AddLibrary(ALibrary: TCustomPHPLibrary);
-begin
- if FLibraries.IndexOf(ALibrary) = -1 then
- FLibraries.Add(ALibrary);
-end;
-
-function TPHPLibrarian.Count: integer;
-begin
- Result := FLibraries.Count;
-end;
-
-constructor TPHPLibrarian.Create;
-begin
- inherited;
- FLibraries := TList.Create;
-end;
-
-destructor TPHPLibrarian.Destroy;
-begin
- FLibraries.Free;
- inherited;
-end;
-
-function TPHPLibrarian.GetLibrary(Index: integer): TCustomPHPLibrary;
-begin
- Result := TCustomPHPLibrary(FLibraries[Index]);
-end;
-
-procedure TPHPLibrarian.RemoveLibrary(ALibrary: TCustomPHPLibrary);
-begin
- FLibraries.Remove(ALibrary);
-end;
-{ TPHPMemoryStream }
-
-constructor TPHPMemoryStream.Create;
-begin
- inherited;
-end;
-
-procedure TPHPMemoryStream.SetInitialSize(ASize: integer);
-begin
- Capacity := ASize;
-end;
-{ Startup functions }
-function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- RegisterInternalClasses(TSRMLS_DC);
- RESULT := SUCCESS;
-end;
-
-function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- RESULT := SUCCESS;
-end;
-
-{Request initialization}
-function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- Result := SUCCESS;
-end;
-
-{Request shutdown}
-function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- Result := SUCCESS;
-end;
-
-{$IFDEF PHP5}
-
-{PHP 5 only}
-function delphi_stream_reader (handle : pointer; buf : zend_pchar; len : size_t; TSRMLS_DC : pointer) : size_t; cdecl;
-var
- MS : TMemoryStream;
-begin
- MS := TMemoryStream(handle);
- if MS = nil then
- result := 0
- else
- try
- result := MS.Read(buf^, len);
- except
- result := 0;
- end;
-end;
-
-{PHP 5 only}
-procedure delphi_stream_closer(handle : pointer; TSRMLS_DC : pointer); cdecl;
-var
- MS : TMemoryStream;
-begin
- MS := TMemoryStream(handle);
- if MS <> nil then
- try
- MS.Clear;
- except
- end;
-end;
-
-{$IFDEF PHP530}
-function delphi_stream_fsizer(handle : pointer; TSRMLS_DC : pointer) : size_t; cdecl;
-var
- MS : TMemoryStream;
-begin
- MS := TMemoryStream(handle);
- if MS <> nil then
- try
- result := MS.Size;
- except
- Result := 0;
- end
- else
- Result := 0;
-end;
-{$ELSE}
-{$IFDEF PHP510}
-
-{ PHP 5.10 and higher }
-function delphi_stream_teller(handle : pointer; TSRMLS_DC : pointer) : longint; cdecl;
-var
- MS : TMemoryStream;
-begin
- MS := TMemoryStream(handle);
- if MS <> nil then
- try
- result := MS.Size;
- except
- Result := 0;
- end
- else
- Result := 0;
-end;
-{$ENDIF}
-{$ENDIF}
-{$ENDIF}
-{ PHP Info functions }
-procedure php_info_library(zend_module : Pointer; TSRMLS_DC : pointer); cdecl;
-begin
-end;
-
-function php_delphi_startup(sapi_module : Psapi_module_struct) : integer; cdecl;
-begin
- Result := SUCCESS;
-end;
-
-function php_delphi_deactivate(p : pointer) : integer; cdecl;
-begin
- result := SUCCESS;
-end;
-
-procedure php_delphi_flush(p : pointer); cdecl;
-begin
-end;
-
-function php_delphi_ub_write(str : pointer; len : uint; p : pointer) : integer; cdecl;
-var
- php : TpsvPHP;
- gl : psapi_globals_struct;
-begin
- Result := 0;
- gl := GetSAPIGlobals;
- if Assigned(gl) then
- begin
- php := TpsvPHP(gl^.server_context);
- if Assigned(php) then
- begin
- try
- result := php.FBuffer.Write(str^, len);
- except
- end;
- end;
- end;
-end;
-function php_delphi_header_handler(sapi_header : psapi_header_struct; sapi_headers : psapi_headers_struct; TSRMLS_DC : pointer) : integer; cdecl;
-begin
- Result := SAPI_HEADER_ADD;
-end;
-function php_delphi_send_header(p1, TSRMLS_DC : pointer) : integer; cdecl;
-var
- php : TpsvPHP;
- gl : psapi_globals_struct;
-begin
- gl := GetSAPIGlobals;
- php := TpsvPHP(gl^.server_context);
- if Assigned(p1) and Assigned(php) then
- begin
- with php.Headers.Add do
- Header := String(Psapi_header_struct(p1)^.header);
- end;
- Result := SAPI_HEADER_SENT_SUCCESSFULLY;
-end;
-
-function php_delphi_read_cookies(p1 : pointer) : pointer; cdecl;
-begin
- result := nil;
-end;
-function php_delphi_read_post(buf : zend_pchar; len : uint; TSRMLS_DC : pointer) : integer; cdecl;
-var
- gl : psapi_globals_struct;
- php : TpsvPHP;
-begin
- gl := GetSAPIGlobals;
- if gl = nil then
- begin
- Result := 0;
- Exit;
- end;
-
- php := TpsvPHP(gl^.server_context);
-
- if PHP = nil then
- begin
- Result := 0;
- Exit;
- end;
-
- if php.PostStream = nil then
- begin
- Result := 0;
- Exit;
- end;
-
- if php.PostStream.Size = 0 then
- begin
- Result := 0;
- Exit;
- end;
-
- Result := php.PostStream.Read(buf^, len);
-end;
-function GetLocalIP: String;
-const WSVer = $101;
-var
- wsaData: TWSAData;
- P: PHostEnt;
- Buf: array [0..127] of Char;
-begin
- Result := '';
- if WSAStartup(WSVer, wsaData) = 0 then begin
- if GetHostName(@Buf, 128) = 0 then begin
- P := GetHostByName(@Buf);
- if P <> nil then Result := iNet_ntoa(PInAddr(p^.h_addr_list^)^);
- end;
- WSACleanup;
- end;
-end;
-
-procedure php_delphi_register_variables(val : pzval; p : pointer); cdecl;
-var
- php : TpsvPHP;
- gl : psapi_globals_struct;
- cnt : integer;
- varcnt : integer;
-begin
- gl := GetSAPIGlobals;
- if gl = nil then
- Exit;
-
- php := TpsvPHP(gl^.server_context);
-
- if PHP = nil then
- begin
- Exit;
- end;
-
- php_register_variable('PHP_SELF', '_', nil, p);
- php_register_variable('REMOTE_ADDR', zend_pchar(GetLocalIP()), val, p);
- php_register_variable('IP_ADDRESS', zend_pchar(GetLocalIP()), val, p);
- {if php.RequestType = prtPost then
- php_register_variable('REQUEST_METHOD', 'POST', val, p)
- else
- php_register_variable('REQUEST_METHOD', 'GET', val, p);}
-
- varcnt := PHP.Variables.Count;
- if varcnt > 0 then
- begin
- for cnt := 0 to varcnt - 1 do
- begin
- php_register_variable(zend_pchar(php.Variables[cnt].Name),
- zend_pchar(php.Variables[cnt].Value), val, p);
- end;
- end;
-end;
-function wvsprintfA(Output: zend_pchar; Format: zend_pchar; arglist: zend_pchar): Integer; stdcall; external 'user32.dll';
-{$IFDEF PHP4}
-function WriterProc(Parameter : Pointer) : integer;
-var
- n : integer;
- php : TpsvCustomPHP;
- buf : zend_pchar;
- k : cardinal;
-begin
- try
- php := TPsvCustomPHP(Parameter);
- Buf := zend_pchar(php.FVirtualCode);
- k := length(php.FVirtualCode);
- repeat
- n := _write(php.FVirtualWriteHandle, Buf, k);
- if (n <= 0) then
- break
- else
- begin
- inc(Buf, n);
- dec(K, n);
- end;
- until (n <= 0);
- Close(php.FVirtualWriteHandle);
- php.FVirtualWriteHandle := 0;
- finally
- Result := 0;
- ExitThread(0);
- end;
-end;
-{$ENDIF}
-
{$IFDEF soulengine_build}
+
+procedure TCustomPHPLibrary.SetFunctions(const Value: TPHPFunctions);
+begin
+ FFunctions.Assign(Value);
+end;
+
+procedure TCustomPHPLibrary.SetLibraryName(AValue: zend_ustr);
+begin
+ if FLibraryName <> AValue then
+ begin
+ FLibraryName := AValue;
+ end;
+end;
+
+procedure TCustomPHPLibrary.UnregisterLibrary;
+begin
+ if Assigned(Librarian) then
+ Librarian.RemoveLibrary(Self);
+end;
+
+
+procedure InitLibrarian;
+begin
+ Librarian := TPHPLibrarian.Create;
+end;
+
+procedure UninitLibrarian;
+begin
+ if Assigned(Librarian) then
+ try
+ Librarian.Free;
+ finally
+ Librarian := nil;
+ end;
+end;
+
+{ TPHPLibrarian }
+
+procedure TPHPLibrarian.AddLibrary(ALibrary: TCustomPHPLibrary);
+begin
+ if FLibraries.IndexOf(ALibrary) = -1 then
+ FLibraries.Add(ALibrary);
+end;
+
+function TPHPLibrarian.Count: integer;
+begin
+ Result := FLibraries.Count;
+end;
+
+constructor TPHPLibrarian.Create;
+begin
+ inherited;
+ FLibraries := TList.Create;
+end;
+
+destructor TPHPLibrarian.Destroy;
+begin
+ FLibraries.Free;
+ inherited;
+end;
+
+function TPHPLibrarian.GetLibrary(Index: integer): TCustomPHPLibrary;
+begin
+ Result := TCustomPHPLibrary(FLibraries[Index]);
+end;
+
+procedure TPHPLibrarian.RemoveLibrary(ALibrary: TCustomPHPLibrary);
+begin
+ FLibraries.Remove(ALibrary);
+end;
+{ TPHPMemoryStream }
+
+constructor TPHPMemoryStream.Create;
+begin
+ inherited;
+end;
+
+procedure TPHPMemoryStream.SetInitialSize(ASize: integer);
+begin
+ Capacity := ASize;
+end;
+{ Startup functions }
+function minit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RegisterInternalClasses(TSRMLS_DC);
+ RESULT := SUCCESS;
+end;
+
+function mshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ RESULT := SUCCESS;
+end;
+
+{Request initialization}
+function rinit (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+{Request shutdown}
+function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+{$IFDEF PHP5}
+
+{PHP 5 only}
+function delphi_stream_reader (handle : pointer; buf : zend_pchar; len : size_t; TSRMLS_DC : pointer) : size_t; cdecl;
+var
+ MS : TMemoryStream;
+begin
+ MS := TMemoryStream(handle);
+ if MS = nil then
+ result := 0
+ else
+ try
+ result := MS.Read(buf^, len);
+ except
+ result := 0;
+ end;
+end;
+
+{PHP 5 only}
+procedure delphi_stream_closer(handle : pointer; TSRMLS_DC : pointer); cdecl;
+var
+ MS : TMemoryStream;
+begin
+ MS := TMemoryStream(handle);
+ if MS <> nil then
+ try
+ MS.Clear;
+ except
+ end;
+end;
+
+{$IFDEF PHP530}
+function delphi_stream_fsizer(handle : pointer; TSRMLS_DC : pointer) : size_t; cdecl;
+var
+ MS : TMemoryStream;
+begin
+ MS := TMemoryStream(handle);
+ if MS <> nil then
+ try
+ result := MS.Size;
+ except
+ Result := 0;
+ end
+ else
+ Result := 0;
+end;
+{$ELSE}
+{$IFDEF PHP510}
+
+{ PHP 5.10 and higher }
+function delphi_stream_teller(handle : pointer; TSRMLS_DC : pointer) : longint; cdecl;
+var
+ MS : TMemoryStream;
+begin
+ MS := TMemoryStream(handle);
+ if MS <> nil then
+ try
+ result := MS.Size;
+ except
+ Result := 0;
+ end
+ else
+ Result := 0;
+end;
+{$ENDIF}
+{$ENDIF}
+{$ENDIF}
+{ PHP Info functions }
+procedure php_info_library(zend_module : Pointer; TSRMLS_DC : pointer); cdecl;
+begin
+end;
+
+function php_delphi_startup(sapi_module : Psapi_module_struct) : integer; cdecl;
+begin
+ Result := SUCCESS;
+end;
+
+function php_delphi_deactivate(p : pointer) : integer; cdecl;
+begin
+ result := SUCCESS;
+end;
+
+procedure php_delphi_flush(p : pointer); cdecl;
+begin
+end;
+
+function php_delphi_ub_write(str : pointer; len : uint; p : pointer) : integer; cdecl;
+var
+ php : TpsvPHP;
+ gl : psapi_globals_struct;
+begin
+ Result := 0;
+ gl := GetSAPIGlobals;
+ if Assigned(gl) then
+ begin
+ php := TpsvPHP(gl^.server_context);
+ if Assigned(php) then
+ begin
+ try
+ result := php.FBuffer.Write(str^, len);
+ except
+ end;
+ end;
+ end;
+end;
+function php_delphi_header_handler(sapi_header : psapi_header_struct; sapi_headers : psapi_headers_struct; TSRMLS_DC : pointer) : integer; cdecl;
+begin
+ Result := SAPI_HEADER_ADD;
+end;
+function php_delphi_send_header(p1, TSRMLS_DC : pointer) : integer; cdecl;
+var
+ php : TpsvPHP;
+ gl : psapi_globals_struct;
+begin
+ gl := GetSAPIGlobals;
+ php := TpsvPHP(gl^.server_context);
+ if Assigned(p1) and Assigned(php) then
+ begin
+ with php.Headers.Add do
+ Header := String(Psapi_header_struct(p1)^.header);
+ end;
+ Result := SAPI_HEADER_SENT_SUCCESSFULLY;
+end;
+
+function php_delphi_read_cookies(p1 : pointer) : pointer; cdecl;
+begin
+ result := nil;
+end;
+function php_delphi_read_post(buf : zend_pchar; len : uint; TSRMLS_DC : pointer) : integer; cdecl;
+var
+ gl : psapi_globals_struct;
+ php : TpsvPHP;
+begin
+ gl := GetSAPIGlobals;
+ if gl = nil then
+ begin
+ Result := 0;
+ Exit;
+ end;
+
+ php := TpsvPHP(gl^.server_context);
+
+ if PHP = nil then
+ begin
+ Result := 0;
+ Exit;
+ end;
+
+ if php.PostStream = nil then
+ begin
+ Result := 0;
+ Exit;
+ end;
+
+ if php.PostStream.Size = 0 then
+ begin
+ Result := 0;
+ Exit;
+ end;
+
+ Result := php.PostStream.Read(buf^, len);
+end;
+function GetLocalIP: String;
+const WSVer = $101;
+var
+ wsaData: TWSAData;
+ P: PHostEnt;
+ Buf: array [0..127] of Char;
+begin
+ Result := '';
+ if WSAStartup(WSVer, wsaData) = 0 then begin
+ if GetHostName(@Buf, 128) = 0 then begin
+ P := GetHostByName(@Buf);
+ if P <> nil then Result := iNet_ntoa(PInAddr(p^.h_addr_list^)^);
+ end;
+ WSACleanup;
+ end;
+end;
+
+procedure php_delphi_register_variables(val : pzval; p : pointer); cdecl;
+var
+ php : TpsvPHP;
+ gl : psapi_globals_struct;
+ cnt : integer;
+ varcnt : integer;
+begin
+ gl := GetSAPIGlobals;
+ if gl = nil then
+ Exit;
+
+ php := TpsvPHP(gl^.server_context);
+
+ if PHP = nil then
+ begin
+ Exit;
+ end;
+ php_register_variable('PHP_SELF', '_', nil, p);
+ php_register_variable('REMOTE_ADDR', zend_pchar(GetLocalIP()), val, p);
+ php_register_variable('IP_ADDRESS', zend_pchar(GetLocalIP()), val, p);
+ {if php.RequestType = prtPost then
+ php_register_variable('REQUEST_METHOD', 'POST', val, p)
+ else
+ php_register_variable('REQUEST_METHOD', 'GET', val, p);}
+
+ varcnt := PHP.Variables.Count;
+ if varcnt > 0 then
+ begin
+ for cnt := 0 to varcnt - 1 do
+ begin
+ php_register_variable(zend_pchar(php.Variables[cnt].Name),
+ zend_pchar(php.Variables[cnt].Value), val, p);
+ end;
+ end;
+end;
+function wvsprintfA(Output: zend_pchar; Format: zend_pchar; arglist: zend_pchar): Integer; stdcall; external 'user32.dll';
+{$IFDEF PHP4}
+function WriterProc(Parameter : Pointer) : integer;
+var
+ n : integer;
+ php : TpsvCustomPHP;
+ buf : zend_pchar;
+ k : cardinal;
+begin
+ try
+ php := TPsvCustomPHP(Parameter);
+ Buf := zend_pchar(php.FVirtualCode);
+ k := length(php.FVirtualCode);
+ repeat
+ n := _write(php.FVirtualWriteHandle, Buf, k);
+ if (n <= 0) then
+ break
+ else
+ begin
+ inc(Buf, n);
+ dec(K, n);
+ end;
+ until (n <= 0);
+ Close(php.FVirtualWriteHandle);
+ php.FVirtualWriteHandle := 0;
+ finally
+ Result := 0;
+ ExitThread(0);
+ end;
+end;
+{$ENDIF}
+
+{$IFDEF php_side_handler}
procedure delphi_error_cb(AType: Integer; const AFname: zend_pchar; const ALineNo: UINT;
const AFormat: zend_pchar; args: zend_pchar) cdecl;
var
@@ -800,9 +842,9 @@ procedure delphi_error_cb(AType: Integer; const AFname: zend_pchar; const ALineN
MessageDlg(LText, mtError, [mbOk], 0)
end;
end;
-end;
-{$ELSE}
-procedure delphi_error_cb(_type : integer; const error_filename : zend_pchar;
+end;
+{$ELSE}
+procedure delphi_error_cb(_type : integer; const error_filename : zend_pchar;
const error_lineno : uint; const _format : zend_pchar; args : zend_pchar); cdecl;
var
buffer : array[0..1023] of zend_uchar;
@@ -862,35 +904,40 @@ procedure delphi_error_cb(_type : integer; const error_filename : zend_pchar;
else
error_type_str := 'Unknown error';
end;
-
+ {$IFDEF COMPILER_php7pv}
+ ShowMessage(
+ Format
+ ('PHP4DELPHI %s: %s in %s on line %d', [error_type_str, buffer, error_filename, error_lineno]));
+ {$ELSE}
php_log_err(zend_pchar(
- {$IFDEF PHP_UNICE}Format{$ELSE}AnsiFormat{$ENDIF}
- ('PHP4DELPHI %s: %s in %s on line %d', [error_type_str, buffer, error_filename, error_lineno])), p);
+ {$IFDEF PHP_UNICODE}Format{$ELSE}AnsiFormat{$ENDIF}
+ ('PHP4DELPHI %s: %s in %s on line %d', [error_type_str, buffer, error_filename, error_lineno])), p);
+ {$ENDIF}
end;
end;
if PHPLoaded then
_zend_bailout(error_filename, error_lineno);
-end;
-{$ENDIF}
-{$IFDEF soulengine_build}
-function php_delphi_log_message(msg : zend_pchar) : integer; cdecl;
-var
- php : TpsvPHP;
- gl : psapi_globals_struct;
- S: zend_ustr;
-begin
- Result := 0;
- gl := GetSAPIGlobals;
- if gl = nil then
- Exit;
-
- php := TpsvPHP(gl^.server_context);
- if Assigned(PHPEngine) then
- begin
- if Assigned(PHPEngine.OnLogMessage) then
- phpEngine.HandleLogMessage(php, msg)
- else
- if log_handler_php <> '' then
+end;
+{$ENDIF}
+{$IFDEF php_side_handler}
+function php_delphi_log_message(msg : zend_pchar) : integer; cdecl;
+var
+ php : TpsvPHP;
+ gl : psapi_globals_struct;
+ S: zend_ustr;
+begin
+ Result := 0;
+ gl := GetSAPIGlobals;
+ if gl = nil then
+ Exit;
+
+ php := TpsvPHP(gl^.server_context);
+ if Assigned(PHPEngine) then
+ begin
+ if Assigned(PHPEngine.OnLogMessage) then
+ phpEngine.HandleLogMessage(php, msg)
+ else
+ if log_handler_php <> '' then
begin
S := zend_ustr(fatal_handler_php + '(' + '''' + AddSlashes(msg) + '''' +
');' + ' ?>');
@@ -900,15 +947,15 @@ function php_delphi_log_message(msg : zend_pchar) : integer; cdecl;
phpmd.RunCode(S);
S := '';
- end
- else
- MessageBoxA(0, MSG, 'PHP4Delphi', MB_OK)
- end
- else
- MessageBoxA(0, msg, 'PHP4Delphi', MB_OK);
-end;
-{$ELSE}
-function php_delphi_log_message(msg : Pchar) : integer; cdecl;
+ end
+ else
+ MessageBoxA(0, MSG, 'PHP4Delphi', MB_OK)
+ end
+ else
+ MessageBoxA(0, msg, 'PHP4Delphi', MB_OK);
+end;
+{$ELSE}
+function php_delphi_log_message(msg : Pchar) : integer; cdecl;
var
php : TpsvPHP;
gl : psapi_globals_struct;
@@ -927,1148 +974,1092 @@ function php_delphi_log_message(msg : Pchar) : integer; cdecl;
else
MessageBox(0, msg, 'PHP4Delphi', MB_OK);
result := 0;
-end;
-{$ENDIF}
-{ Request sender/dispatcher }
-
-{$IFDEF PHP510}
-procedure DispatchRequest(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ELSE}
-procedure DispatchRequest(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer); cdecl;
-{$ENDIF}
-var
- php : TpsvPHP;
- gl : psapi_globals_struct;
- Lib : IPHPEngine;
-{$IFNDEF PHP510}
- return_value_ptr : ppzval;
-{$ENDIF}
-begin
- {$IFNDEF PHP510}
- return_value_ptr := nil;
- {$ENDIF}
- ZVAL_NULL(return_value);
- gl := GetSAPIGlobals;
- if gl = nil then
- Exit;
- php := TpsvPHP(gl^.server_context);
- if Assigned(php) then
- begin
- try
- Lib := php.GetEngine;
- if lib <> nil then
- Lib.HandleRequest(ht, return_value, return_value_ptr, this_ptr, return_value_used, TSRMLS_DC);
- except
- ZVAL_NULL(return_value);
- end;
- end;
-end;
-
-{ TpsvCustomPHP }
-
-constructor TpsvCustomPHP.Create(AOwner: TComponent);
-begin
- inherited;
- FMaxExecutionTime := 0;
- FExecuteMethod := emServer;
- FSessionActive := false;
- FVariables := TPHPVariables.Create(Self);
- FHeaders := TPHPHeaders.Create(Self);
- FUseDelimiters := true;
- FRequestType := prtGet;
- FBuffer := TPHPMemoryStream.Create;
- {$IFDEF PHP4}
- FVirtualCode := '';
- {$ELSE}
- FVirtualStream := TMemoryStream.Create;
- {$ENDIF}
-end;
-
-destructor TpsvCustomPHP.Destroy;
-begin
- FVariables.Free;
- FHeaders.Free;
- FSessionActive := False;
- FBuffer.Free;
- {$IFDEF PHP4}
- FVirtualCode := '';
- {$ELSE}
- if FVirtualStream <> nil then
- FreeAndNil(FVirtualStream);
- {$ENDIF}
- if Assigned(FPostStream) then
- FreeAndNil(FPostStream);
- inherited;
-end;
-
-procedure TpsvCustomPHP.ClearBuffer;
-begin
- FBuffer.Clear;
-end;
-
-procedure TpsvCustomPHP.ClearHeaders;
-begin
- FHeaders.Clear;
-end;
-
-
-function TpsvCustomPHP.Execute : zend_ustr;
-var
- file_handle : zend_file_handle;
- {$IFDEF PHP4}
- thread_id : cardinal;
- {$ENDIF}
- {$IFDEF PHP5}
- ZendStream : TZendStream;
- {$ENDIF}
-begin
-
- if not EngineActive then
- begin
- Result := '';
- Exit;
- end;
-
- if PHPEngine.WaitForShutdown then
- begin
- Result := '';
- Exit;
- end;
-
- PHPEngine.AddRequest;
-
- try
- ClearHeaders;
- ClearBuffer;
-
- if Assigned(FBeforeExecute) then
- FBeforeExecute(Self);
-
-
-
- FTerminated := false;
- if not FUseMapping then
- begin
- if not FileExists(FFileName) then
- raise Exception.CreateFmt('File %s does not exists', [FFileName]);
- end;
-
- StartupRequest;
-
-
- ZeroMemory(@file_handle, sizeof(zend_file_handle));
-
- if FUseMapping then
- begin
- {$IFDEF PHP5}
- ZeroMemory(@ZendStream, sizeof(ZendStream));
- ZendStream.reader := delphi_stream_reader;
- ZendStream.closer := delphi_stream_closer;
- {$IFDEF PHP530}
- ZendStream.fsizer := delphi_stream_fsizer;
- {$ELSE}
- {$IFDEF PHP510}
- ZendStream.fteller := delphi_stream_teller;
- {$ENDIF}
- ZendStream.interactive := 0;
- {$ENDIF}
-
- ZendStream.handle := FVirtualStream;
-
- file_handle._type := ZEND_HANDLE_STREAM;
- file_handle.opened_path := nil;
- file_handle.filename := '-';
- file_handle.free_filename := 0;
- file_handle.handle.stream := ZendStream;
- {$ELSE}
- {for PHP4 only}
- file_handle._type := ZEND_HANDLE_FD;
- file_handle.opened_path := nil;
- file_handle.filename := '-';
- file_handle.free_filename := 0;
- file_handle.handle.fd := FVirtualReadHandle;
- FWriterHandle := BeginThread(nil, 8192, @WriterProc, Self, 0, thread_id);
- {$ENDIF}
- end
- else
- begin
- file_handle._type := ZEND_HANDLE_FILENAME;
- file_handle.filename := zend_pchar(FFileName);
- file_handle.opened_path := nil;
- file_handle.free_filename := 0;
- end;
-
- try
- php_execute_script(@file_handle, TSRMLS_D);
- except
- FBuffer.Clear;
- try
- ts_free_thread;
- except
-
- end;
- end;
-
- PrepareResult;
-
-
- if Assigned(FAfterExecute) then
- FAfterExecute(Self);
-
- //ShutdownRequest;
-
- FBuffer.Position := 0;
- if Assigned(FOnReadResult) then
- begin
- FOnReadResult(Self, FBuffer);
- Result := '';
- end
- else
- begin
- SetLength(Result, FBuffer.Size);
- FBuffer.Read(Result[1], FBuffer.Size);
- end;
- FBuffer.Clear;
- {$IFDEF PHP4}
- FVirtualCode := '';
- {$ENDIF}
- finally
- PHPEngine.RemoveRequest;
- end;
-end;
-
-function TpsvCustomPHP.RunCode(ACode : zend_ustr) : zend_ustr;
-begin
- if not EngineActive then
- begin
- Result := '';
- Exit;
- end;
-
- ClearHeaders;
- ClearBuffer;
- FUseMapping := true;
- try
- if FUseDelimiters then
- begin
- if Pos('', ACode) = 0 then
- ACode := Format(' %s ?>', [ACode]);
- end;
- if not CreateVirtualFile(ACode) then
- begin
- Result := '';
- Exit;
- end;
- Result := Execute;
- CloseVirtualFile;
- finally
- FUseMapping := false;
- end;
-end;
-
-
-function TpsvCustomPHP.RunCode(ACode: TStrings): string;
-begin
- if Assigned(ACode) then
- Result := RunCode(ACode.Text);
-end;
-
-
-procedure TpsvCustomPHP.SetVariables(Value: TPHPVariables);
-begin
- FVariables.Assign(Value);
-end;
-
-procedure TpsvCustomPHP.SetHeaders(Value : TPHPHeaders);
-begin
- FHeaders.Assign(Value);
-end;
-
-
-
-function TpsvCustomPHP.Execute(AFileName: zend_ustr): zend_ustr;
-begin
- FFileName := AFileName;
- Result := Execute;
-end;
-
-procedure TpsvCustomPHP.PrepareResult;
-var
- ht : PHashTable;
- data: ^ppzval;
- cnt : integer;
- variable : pzval;
- {$IFDEF PHP5}
- EG : pzend_executor_globals;
- {$ENDIF}
-begin
- if FVariables.Count = 0 then
- Exit;
-
- if FExecuteMethod = emServer then
- {$IFDEF PHP4}
- ht := GetSymbolsTable
- {$ELSE}
- begin
- EG := GetExecutorGlobals;
- if Assigned(EG) then
- ht := @EG.symbol_table
- else
- ht := nil;
- end
- {$ENDIF}
- else
- ht := GetTrackHash('_GET');
- if Assigned(ht) then
- begin
- for cnt := 0 to FVariables.Count - 1 do
- begin
- new(data);
- try
- if zend_hash_find(ht, zend_pchar(FVariables[cnt].Name),
- strlen(zend_pchar(FVariables[cnt].Name)) + 1, data) = SUCCESS then
- begin
- variable := data^^;
- convert_to_string(variable);
- FVariables[cnt].Value := variable^.value.str.val;
- end;
- finally
- freemem(data);
- end;
- end;
- end;
-end;
-
-function TpsvCustomPHP.VariableByName(AName: zend_ustr): TPHPVariable;
-begin
- Result := FVariables.ByName(AName);
-end;
-
-{Indicates activity of PHP Engine}
-function TpsvCustomPHP.EngineActive : boolean;
-begin
- if Assigned(PHPEngine) then
- Result := PHPEngine.EngineActive
- else
- Result := false;
-end;
-
-procedure TpsvCustomPHP.StartupRequest;
-var
- gl : psapi_globals_struct;
- TimeStr : string;
-begin
- if not EngineActive then
- raise EDelphiErrorEx.Create('PHP engine is not active ');
-
- if FSessionActive then
- Exit;
-
- TSRMLS_D := tsrmls_fetch;
-
- gl := GetSAPIGlobals;
- gl^.server_context := Self;
-
- if PHPEngine.RegisterGlobals then
- GetPHPGlobals(TSRMLS_D)^.register_globals := true;
-
- try
- if Assigned(FOnReadPost) then
- FOnReadPost(Self, FPostStream);
-
- zend_alter_ini_entry('max_execution_time', 19, zend_pchar(TimeStr), Length(TimeStr), ZEND_INI_SYSTEM, ZEND_INI_STAGE_RUNTIME);
-
- php_request_startup(TSRMLS_D);
- if Assigned(FOnRequestStartup) then
- FOnRequestStartup(Self);
-
- FSessionActive := true;
- except
- FSessionActive := false;
- end;
-end;
-
-function TpsvCustomPHP.RunTime: boolean;
-begin
- Result := not (csDesigning in ComponentState);
-end;
-
-function TpsvCustomPHP.GetThreadSafeResourceManager: pointer;
-begin
- Result := TSRMLS_D;
-end;
-
-function TpsvCustomPHP.GetVariableCount: integer;
-begin
- Result := FVariables.Count;
-end;
-
-
-procedure TpsvCustomPHP.ShutdownRequest;
-var
- gl : psapi_globals_struct;
-begin
- if not FSessionActive then
- Exit;
- try
-
- if not FTerminated then
- begin
- try
- php_request_shutdown(nil);
- except
- end;
- gl := GetSAPIGlobals;
- gl^.server_context := nil;
- end;
-
-
- if Assigned(FOnRequestShutdown) then
- FOnRequestShutdown(Self);
-
- finally
- FSessionActive := false;
- end;
-
-end;
-
-
-procedure TpsvCustomPHP.PrepareVariables;
-var
- ht : PHashTable;
- data: ^ppzval;
- cnt : integer;
- {$IFDEF PHP5}
- EG : pzend_executor_globals;
- {$ENDIF}
-begin
- {$IFDEF PHP4}
- ht := GetSymbolsTable;
- {$ELSE}
- begin
- EG := GetExecutorGlobals;
- if Assigned(EG) then
- ht := @EG.symbol_table
- else
- ht := nil;
- end;
- {$ENDIF}
-
- if Assigned(ht) then
- begin
- for cnt := 0 to FVariables.Count - 1 do
- begin
- new(data);
- try
- if zend_hash_find(ht, zend_pchar(FVariables[cnt].Name),
- strlen(zend_pchar(FVariables[cnt].Name)) + 1, data) = SUCCESS then
- begin
- if (data^^^._type = IS_STRING) then
- begin
- efree(data^^^.value.str.val);
- ZVAL_STRING(data^^, zend_pchar(FVariables[cnt].Value), true);
- end
- else
- begin
- ZVAL_STRING(data^^, zend_pchar(FVariables[cnt].Value), true);
- end;
- end;
- finally
- freemem(data);
- end;
- end;
- end;
-end;
-
-procedure TpsvCustomPHP.CloseVirtualFile;
-begin
- {$IFDEF PHP4}
- if FWriterHandle <> 0 then
- begin
- WaitForSingleObject(FWriterHandle, INFINITE);
- CloseHandle(FWriterHandle);
- FWriterHandle := 0;
- end;
- {$ELSE}
- FVirtualStream.Clear;
- {$ENDIF}
-end;
-
-function TpsvCustomPHP.CreateVirtualFile(ACode : zend_ustr): boolean;
-{$IFDEF PHP4}
-var
- _handles : array[0..1] of THandle;
-{$ENDIF}
-begin
-
- Result := false;
- {$IFDEF PHP4}
- if ACode = '' then
- begin
- FVirtualReadHandle := 0;
- FVirtualWriteHandle := 0;
- Exit; {empty buffer was provided}
- end;
-
- FVirtualCode := ACode;
-
- if pipe(@_handles, 4096, 0) = -1 then
- begin
- FVirtualReadHandle := 0;
- FVirtualWriteHandle := 0;
- FVirtualCode := '';
- Exit;
- end;
-
- FVirtualReadHandle := _handles[0];
- FVirtualWriteHandle := _handles[1];
- Result := true;
- {$ELSE}
- if ACode = '' then
- Exit;
- try
- FVirtualStream.Clear;
- FVirtualStream.Write(ACode[1], Length(ACode));
- FVirtualStream.Position := 0;
- Result := true;
- except
- Result := false;
- end;
- {$ENDIF}
-end;
-
-
-function TpsvCustomPHP.GetEngine: IPHPEngine;
-begin
- Result := PHPEngine;
-end;
-
-{ TPHPEngine }
-
-
-constructor TPHPEngine.Create(AOwner: TComponent);
-begin
- inherited;
- if Assigned(PHPEngine) then
- raise Exception.Create('Only one instance of PHP engine per application');
- FEngineActive := false;
- FHandleErrors := true;
- {$IFNDEF PHP540}
- FSafeMode := false;
- FSafeModeGid := false;
- {$ENDIF}
- FRegisterGlobals := true;
- FHTMLErrors := false;
- FMaxInputTime := 0;
- FWaitForShutdown := false;
- FConstants := TPHPConstants.Create(Self);
- FRequestCount := 0;
- FHash := TStringList.Create;
- FHash.Duplicates := dupError;
- FHash.Sorted := true;
- InitializeCriticalSection(FLock);
- PHPEngine := Self;
-
- MyFuncs := TStringList.Create;
-end;
-
-destructor TPHPEngine.Destroy;
-begin
- ShutdownAndWaitFor;
- FEngineActive := false;
- FConstants.Free;
- FHash.Free;
- MyFuncs.Free;
- DeleteCriticalSection(FLock);
- if (PHPEngine = Self) then
- PHPEngine := nil;
- inherited;
- if PHPLoaded then
- UnloadPHP;
-end;
-
-function TPHPEngine.GetConstantCount: integer;
-begin
- Result := FConstants.Count;
-end;
-
-procedure TPHPEngine.HandleRequest(ht: integer; return_value: pzval;
- return_value_ptr: ppzval; this_ptr: pzval; return_value_used: integer;
- TSRMLS_DC: pointer);
-
-var
- Params : pzval_array;
- AFunction : TPHPFunction;
- j : integer;
- FActiveFunctionName : string;
- FunctionIndex : integer;
- FZendVar : TZendVariable;
- FParameters : TFunctionParams;
- ReturnValue : variant;
-begin
- FParameters := TFunctionParams.Create(nil, TFunctionParam);
- try
-
- if ht > 0 then
- begin
- if ( not (zend_get_parameters_ex(ht, Params) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
- end;
-
- FActiveFunctionName := get_active_function_name(TSRMLS_DC);
- if FHash.Find(FActiveFunctionName, FunctionIndex) then
- AFunction := TPHPFunction(FHash.Objects[FunctionIndex])
- else
- AFunction := nil;
-
- if Assigned(AFunction) then
- begin
- if AFunction.Collection = nil then
- Exit; {library was destroyed}
-
- if Assigned(AFunction.OnExecute) then
- begin
- if AFunction.Parameters.Count <> ht then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
-
- FParameters.Assign(AFunction.Parameters);
- if ht > 0 then
- begin
- for j := 0 to ht - 1 do
- begin
- if not IsParamTypeCorrect(FParameters[j].ParamType, Params[j]^) then
- begin
- zend_error(E_WARNING, zend_pchar(
- {$IFDEF PHP_UNICE}Format{$ELSE}AnsiFormat{$ENDIF}
- ('Wrong parameter type for %s()', [FActiveFunctionName])));
- Exit;
- end;
- FParameters[j].ZendValue := (Params[j]^);
- end;
- end; { if ht > 0}
-
- FZendVar := TZendVariable.Create;
- try
- FZendVar.AsZendVariable := return_value;
- AFunction.OnExecute(Self, FParameters, ReturnValue, FZendVar, TSRMLS_DC);
- if FZendVar.ISNull then {perform variant conversion}
- variant2zval(ReturnValue, return_value);
- finally
- FZendVar.Free;
- end;
- end; {if assigned AFunction.OnExecute}
- end;
-
- finally
- FParameters.Free;
- dispose_pzval_array(Params);
- end;
-end;
-
-procedure TPHPEngine.PrepareIniEntry;
-var
- p : integer;
- TimeStr : string;
-begin
- if not PHPLoaded then
- Exit;
-
- if FHandleErrors then
- begin
- // p := integer(GetProcAddress(PHPLib, 'zend_do_print'));
- p := integer(GetProcAddress(PHPLib, 'zend_error_cb'));
- asm
- mov edx, dword ptr [p]
- mov dword ptr [edx], offset delphi_error_cb
- end;
- end;
- {$IFNDEF PHP540}
- if FSafeMode then
- zend_alter_ini_entry('safe_mode', 10, '1', 1, PHP_INI_SYSTEM, PHP_INI_STAGE_STARTUP)
- else
- {$ENDIF}
- zend_alter_ini_entry('safe_mode', 10, '0', 1, PHP_INI_SYSTEM, PHP_INI_STAGE_STARTUP);
- {$IFNDEF PHP540}
- if FSafeModeGID then
- zend_alter_ini_entry('safe_mode_gid', 14, '1', 1, PHP_INI_SYSTEM, PHP_INI_STAGE_STARTUP)
- else
- {$ENDIF}
- zend_alter_ini_entry('safe_mode_gid', 14, '0', 1, PHP_INI_SYSTEM, PHP_INI_STAGE_STARTUP);
-
- zend_alter_ini_entry('register_argc_argv', 19, '0', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
-
- if FRegisterGlobals then
- zend_alter_ini_entry('register_globals', 17, '1', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE)
- else
- zend_alter_ini_entry('register_globals', 17, '0', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
-
- if FHTMLErrors then
- zend_alter_ini_entry('html_errors', 12, '1', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE)
- else
- zend_alter_ini_entry('html_errors', 12, '0', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
-
- zend_alter_ini_entry('implicit_flush', 15, '1', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
-
- TimeStr := IntToStr(FMaxInputTime);
- zend_alter_ini_entry('max_input_time', 15, zend_pchar(TimeStr), Length(TimeStr), ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
-end;
-
-procedure TPHPEngine.PrepareEngine;
-begin
- delphi_sapi_module.name := 'embed'; {to solve a problem with dl()}
- delphi_sapi_module.pretty_name := 'PHP for Delphi';
- delphi_sapi_module.startup := php_delphi_startup;
- delphi_sapi_module.shutdown := nil; //php_module_shutdown_wrapper;
- delphi_sapi_module.activate:= nil;
- delphi_sapi_module.deactivate := @php_delphi_deactivate;
- delphi_sapi_module.ub_write := @php_delphi_ub_write;
- delphi_sapi_module.flush := @php_delphi_flush;
- delphi_sapi_module.stat:= nil;
- delphi_sapi_module.getenv:= nil;
- delphi_sapi_module.sapi_error := @zend_error;
- delphi_sapi_module.header_handler := @php_delphi_header_handler;
- delphi_sapi_module.send_headers := nil;
- delphi_sapi_module.send_header := @php_delphi_send_header;
- delphi_sapi_module.read_post := @php_delphi_read_post;
- delphi_sapi_module.read_cookies := @php_delphi_read_cookies;
- delphi_sapi_module.register_server_variables := @php_delphi_register_variables;
- delphi_sapi_module.log_message := @php_delphi_log_message;
- if FIniPath <> '' then
- delphi_sapi_module.php_ini_path_override := zend_pchar(FIniPath)
- else
- delphi_sapi_module.php_ini_path_override := nil;
- delphi_sapi_module.block_interruptions := nil;
- delphi_sapi_module.unblock_interruptions := nil;
- delphi_sapi_module.default_post_reader := nil;
- delphi_sapi_module.treat_data := nil;
- delphi_sapi_module.executable_location := nil;
- delphi_sapi_module.php_ini_ignore := 0;
-
- FLibraryModule.size := sizeOf(Tzend_module_entry);
- FLibraryModule.zend_api := ZEND_MODULE_API_NO;
- {$IFDEF PHP_DEBUG}
- FLibraryModule.zend_debug := 1;
- {$ELSE}
- FLibraryModule.zend_debug := 0;
- {$ENDIF}
- FLibraryModule.zts := USING_ZTS;
- FLibraryModule.name := 'php4delphi_internal';
- FLibraryModule.functions := nil;
- FLibraryModule.module_startup_func := @minit;
- FLibraryModule.module_shutdown_func := @mshutdown;
- FLibraryModule.info_func := @php_info_library;
- FLibraryModule.version := '8.0 ds';
-
- FLibraryModule.request_shutdown_func := @rshutdown;
- FLibraryModule.request_startup_func := @rinit;
-
- FLibraryModule.module_started := 0;
- FLibraryModule._type := MODULE_PERSISTENT;
- FLibraryModule.handle := nil;
- FLibraryModule.module_number := 0;
- FLibraryModule.build_id := DupStr(zend_pchar(ZEND_MODULE_BUILD_ID));
-end;
-
-procedure TPHPEngine.RegisterConstants;
-var
- cnt : integer;
- ConstantName : zend_ustr;
- ConstantValue : zend_ustr;
-begin
- for cnt := 0 to FConstants.Count - 1 do
- begin
- ConstantName := FConstants[cnt].Name;
- ConstantValue := FConstants[cnt].Value;
- zend_register_string_constant(zend_pchar(ConstantName),
- strlen(zend_pchar(ConstantName)) + 1,
- zend_pchar(ConstantValue), CONST_PERSISTENT or CONST_CS, 0, TSRMLS_D);
- end;
-
- RegisterInternalConstants(TSRMLS_D);
-end;
-
-procedure TPHPEngine.RegisterInternalConstants(TSRMLS_DC: pointer);
-{$IFDEF REGISTER_COLORS}
-var
- i : integer;
- ColorName : zend_ustr;
-{$ENDIF}
-begin
- {$IFDEF REGISTER_COLORS}
- for I := Low(Colors) to High(Colors) do
- begin
- ColorName := zend_ustr(Colors[i].Name);
- zend_register_long_constant( zend_pchar(ColorName), strlen(zend_pchar(ColorName)) + 1, Colors[i].Value,
- CONST_PERSISTENT or CONST_CS, 0, TSRMLS_DC);
- end;
- {$ENDIF}
-end;
-
-
-procedure TPHPEngine.SetConstants(Value: TPHPConstants);
-begin
- FConstants.Assign(Value);
-end;
-
-procedure TPHPEngine.ShutdownEngine;
-begin
-
- if PHPEngine <> Self then
- raise EDelphiErrorEx.Create('Only active engine can be stopped');
-
-
- if not FEngineActive then
- Exit;
-
- try
-
- if @delphi_sapi_module.shutdown <> nil then
- delphi_sapi_module.shutdown(@delphi_sapi_module);
- sapi_shutdown;
- {Shutdown PHP thread safe resource manager}
- if Assigned(FOnEngineShutdown) then
- FOnEngineShutdown(Self);
-
- try
- tsrm_shutdown();
- except
-
- end;
- FHash.Clear;
- finally
- FEngineActive := false;
- FWaitForShutdown := False;
- end;
-end;
-
-procedure TPHPEngine.RegisterLibrary(ALib : TCustomPHPLibrary);
-var
- cnt : integer;
- skip : boolean;
- FN : zend_ustr;
-begin
- skip := false;
- ALib.Refresh;
-
- {No functions defined, skip this library}
- if ALib.Functions.Count = 0 then
- Exit;
-
- for cnt := 0 to ALib.Functions.Count - 1 do
- begin
- FN :=
- {$IFDEF PHP_UNICE}LowerCase{$ELSE}AnsiLowerCase{$ENDIF}
- (ALib.Functions[cnt].FunctionName);
- if FHash.IndexOf(FN) > -1 then
- begin
- skip := true;
- break;
- end;
- end;
-
- if not skip then
- begin
- for cnt := 0 to ALib.Functions.Count - 1 do
- begin
- FN := {$IFDEF PHP_UNICE}LowerCase{$ELSE}AnsiLowerCase{$ENDIF}
- (ALib.Functions[cnt].FunctionName);
- FHash.AddObject(FN, ALib.Functions[cnt]);
- end;
- ALib.Locked := true;
- end;
-end;
-
-procedure TPHPEngine.RefreshLibrary;
+end;
+{$ENDIF}
+{ Request sender/dispatcher }
+
+{$IFDEF PHP510}
+procedure DispatchRequest(ht : integer; return_value : pzval; return_value_ptr : ppzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ELSE}
+procedure DispatchRequest(ht : integer; return_value : pzval; this_ptr : pzval;
+ return_value_used : integer; TSRMLS_DC : pointer); cdecl;
+{$ENDIF}
var
- cnt, offset : integer;
- HashName : zend_ustr;
+ php : TpsvPHP;
+ gl : psapi_globals_struct;
+ Lib : IPHPEngine;
+{$IFNDEF PHP510}
+ return_value_ptr : ppzval;
+{$ENDIF}
begin
- SetLength(FLibraryEntryTable, FHash.Count + MyFuncs.Count + 14);
+ {$IFNDEF PHP510}
+ return_value_ptr := nil;
+ {$ENDIF}
+ ZVALVAL(return_value);
+ gl := GetSAPIGlobals;
+ if gl = nil then
+ Exit;
+ php := TpsvPHP(gl^.server_context);
+ if Assigned(php) then
+ begin
+ try
+ Lib := php.GetEngine;
+ if lib <> nil then
+ Lib.HandleRequest(ht, return_value, return_value_ptr, this_ptr, return_value_used, TSRMLS_DC);
+ except
+ ZVALVAL(return_value);
+ end;
+ end;
+end;
- PHP_FUNCTION(FLibraryEntryTable[0], 'delphi_date', @delphi_date);
- PHP_FUNCTION(FLibraryEntryTable[1], 'delphi_extract_file_dir', @delphi_extract_file_dir);
- PHP_FUNCTION(FLibraryEntryTable[2], 'delphi_extract_file_drive', @delphi_extract_file_drive);
- PHP_FUNCTION(FLibraryEntryTable[3], 'delphi_extract_file_name', @delphi_extract_file_name);
+{ TpsvCustomPHP }
- FLibraryEntryTable[4].fname := 'delphi_extract_file_ext';
- FLibraryEntryTable[4].handler := @delphi_extract_file_ext;
+constructor TpsvCustomPHP.Create(AOwner: TComponent);
+begin
+ inherited;
+ FMaxExecutionTime := 0;
+ FExecuteMethod := emServer;
+ FSessionActive := false;
+ FVariables := TPHPVariables.Create(Self);
+ FHeaders := TPHPHeaders.Create(Self);
+ FUseDelimiters := true;
+ FRequestType := prtGet;
+ FBuffer := TPHPMemoryStream.Create;
{$IFDEF PHP4}
- FLibraryEntryTable[4].func_arg_types := nil;
+ FVirtualCode := '';
{$ELSE}
- FLibraryEntryTable[4].arg_info := nil;
+ FVirtualStream := TStringStream.Create;
{$ENDIF}
+end;
- FLibraryEntryTable[5].fname := 'delphi_show_message';
- FLibraryEntryTable[5].handler := @delphi_show_message;
+destructor TpsvCustomPHP.Destroy;
+begin
+ FVariables.Free;
+ FHeaders.Free;
+ FSessionActive := False;
+ FBuffer.Free;
{$IFDEF PHP4}
- FLibraryEntryTable[5].func_arg_types := nil;
+ FVirtualCode := '';
{$ELSE}
- FLibraryEntryTable[5].arg_info := nil;
+ if FVirtualStream <> nil then
+ FreeAndNil(FVirtualStream);
{$ENDIF}
+ if Assigned(FPostStream) then
+ FreeAndNil(FPostStream);
+ inherited;
+end;
- FLibraryEntryTable[6].fname := 'register_delphi_object';
- FLibraryEntryTable[6].handler := @register_delphi_object;
- {$IFDEF PHP4}
- FLibraryEntryTable[6].func_arg_types := nil;
- {$ELSE}
- FLibraryEntryTable[6].arg_info := nil;
- {$ENDIF}
+procedure TpsvCustomPHP.ClearBuffer;
+begin
+ FBuffer.Clear;
+end;
- FLibraryEntryTable[7].fname := 'delphi_get_author';
- FLibraryEntryTable[7].handler := @delphi_get_author;
- {$IFDEF PHP4}
- FLibraryEntryTable[7].func_arg_types := nil;
- {$ELSE}
- FLibraryEntryTable[7].arg_info := nil;
- {$ENDIF}
+procedure TpsvCustomPHP.ClearHeaders;
+begin
+ FHeaders.Clear;
+end;
- FLibraryEntryTable[8].fname := 'delphi_is_uc';
- FLibraryEntryTable[8].handler := @delphi_is_uc;
- {$IFDEF PHP4}
- FLibraryEntryTable[8].func_arg_types := nil;
- {$ELSE}
- FLibraryEntryTable[8].arg_info := nil;
- {$ENDIF}
- FLibraryEntryTable[9].fname := 'delphi_str_date';
- FLibraryEntryTable[9].handler := @delphi_str_date;
+function TpsvCustomPHP.Execute : zend_ustr;
+var
+ file_handle : zend_file_handle;
{$IFDEF PHP4}
- FLibraryEntryTable[9].func_arg_types := nil;
- {$ELSE}
- FLibraryEntryTable[9].arg_info := nil;
+ thread_id : cardinal;
{$ENDIF}
+ {$IFDEF PHP5}
+ ZendStream : TZendStream;
+ {$ENDIF}
+begin
- PHP_FUNCTION(FLibraryEntryTable[10], 'delphi_get_system_directory', @delphi_get_system_directory);
- PHP_FUNCTION(FLibraryEntryTable[11], 'InputBox', @delphi_input_box);
- PHP_FUNCTION(FLibraryEntryTable[12], 'register_delphi_component', @register_delphi_component);
-
+ if not EngineActive then
+ begin
+ Result := '';
+ Exit;
+ end;
- for cnt := 0 to FHash.Count - 1 do
+ if PHPEngine.WaitForShutdown then
begin
- HashName := FHash[cnt];
-
- {$IFNDEF COMPILER_VC9}
- FLibraryEntryTable[cnt+13].fname := strdup(zend_pchar(HashName));
- {$ELSE}
- FLibraryEntryTable[cnt+13].fname := DupStr(zend_pchar(HashName));
- {$ENDIF}
-
- FLibraryEntryTable[cnt+13].handler := @DispatchRequest;
- {$IFDEF PHP4}
- FLibraryEntryTable[cnt+13].func_arg_types := nil;
- {$ENDIF}
+ Result := '';
+ Exit;
end;
- offset := FHash.Count + 13;
- for cnt := 0 to MyFuncs.Count - 1 do
+ PHPEngine.AddRequest;
+
+ try
+ ClearHeaders;
+ ClearBuffer;
+
+ if Assigned(FBeforeExecute) then
+ FBeforeExecute(Self);
+
+
+
+ FTerminated := false;
+ if not FUseMapping then
+ begin
+ if not FileExists(FFileName) then
+ raise Exception.CreateFmt('File %s does not exists', [FFileName]);
+ end;
+ StartupRequest;
+
+ ZeroMemory(@file_handle, sizeof(zend_file_handle));
+
+ if FUseMapping then
+ begin
+ {$IFDEF PHP5}
+ ZeroMemory(@ZendStream, sizeof(ZendStream));
+ ZendStream.reader := delphi_stream_reader;
+ ZendStream.closer := delphi_stream_closer;
+ {$IFDEF PHP530}
+ ZendStream.fsizer := delphi_stream_fsizer;
+ {$ELSE}
+ {$IFDEF PHP510}
+ ZendStream.fteller := delphi_stream_teller;
+ {$ENDIF}
+ ZendStream.interactive := 0;
+ {$ENDIF}
+ ZendStream.handle := FVirtualStream;
+
+ file_handle._type := ZEND_HANDLE_STREAM;
+ file_handle.opened_path := nil;
+ file_handle.filename := '-';
+ file_handle.free_filename := 0;
+ file_handle.handle.stream := ZendStream;
+ {$ELSE}
+ {for PHP4 only}
+ file_handle._type := ZEND_HANDLE_FD;
+ file_handle.opened_path := nil;
+ file_handle.filename := '-';
+ file_handle.free_filename := 0;
+ file_handle.handle.fd := FVirtualReadHandle;
+ FWriterHandle := BeginThread(nil, 8192, @WriterProc, Self, 0, thread_id);
+ {$ENDIF}
+ end
+ else
+ begin
+ file_handle._type := ZEND_HANDLE_FILENAME;
+ file_handle.filename := zend_pchar(FFileName);
+ file_handle.opened_path := nil;
+ file_handle.free_filename := 0;
+ end;
+
+ try
begin
- HashName := MyFuncs[cnt];
- {$IFNDEF COMPILER_VC9}
- FLibraryEntryTable[cnt+offset].fname := strdup(zend_pchar(HashName));
- {$ELSE}
- FLibraryEntryTable[cnt+offset].fname := DupStr(zend_pchar(HashName));
- {$ENDIF}
-
- FLibraryEntryTable[cnt+offset].handler := MyFuncs.Objects[ cnt ];
- {$IFDEF PHP4}
- FLibraryEntryTable[cnt+offset].func_arg_types := nil;
- {$ENDIF}
+ PHPAPI.php_execute_script(@file_handle, TSRMLS_D);
+ end
+ except
+ FBuffer.Clear;
+ try
+ ts_free_thread;
+ except
+
+ end;
end;
+ PrepareResult;
+
- FLibraryEntryTable[FHash.Count+MyFuncs.Count+13].fname := nil;
- FLibraryEntryTable[FHash.Count+MyFuncs.Count+13].handler := nil;
+ if Assigned(FAfterExecute) then
+ FAfterExecute(Self);
+
+ //ShutdownRequest;
+
+ FBuffer.Position := 0;
+ if Assigned(FOnReadResult) then
+ begin
+ FOnReadResult(Self, FBuffer);
+ Result := '';
+ end
+ else
+ begin
+ SetLength(Result, FBuffer.Size);
+ FBuffer.Read(Result[1], FBuffer.Size);
+ end;
+ FBuffer.Clear;
{$IFDEF PHP4}
- FLibraryEntryTable[FHash.Count+MyFuncs.Count+13].func_arg_types := nil;
+ FVirtualCode := '';
{$ENDIF}
+ finally
+ PHPEngine.RemoveRequest;
+ end;
+end;
+
+function TpsvCustomPHP.RunCode(Acode : zend_ustr) : zend_ustr;
+begin
+ if not EngineActive then
+ begin
+ Result := '';
+ Exit;
+ end;
+
+ ClearHeaders;
+ ClearBuffer;
+ FUseMapping := true;
+
+ try
+ if FUseDelimiters then
+ begin
+ if Pos('', ACode) = 0 then
+ ACode := Format(' %s ?>', [ACode]);
+ end;
+ if not CreateVirtualFile(ACode) then
+ begin
+ Result := '';
+ Exit;
+ end;
+ Result := Execute;
+ finally
+ FUseMapping := false;
+ end;
+end;
+
+
+function TpsvCustomPHP.RunCode(ACode: TStrings): string;
+begin
+ if Assigned(ACode) then
+ Result := RunCode(ACode.Text);
+end;
+
+
+procedure TpsvCustomPHP.SetVariables(Value: TPHPVariables);
+begin
+ FVariables.Assign(Value);
+end;
+
+procedure TpsvCustomPHP.SetHeaders(Value : TPHPHeaders);
+begin
+ FHeaders.Assign(Value);
+end;
+
+
+
+function TpsvCustomPHP.Execute(AFileName: zend_ustr): zend_ustr;
+begin
+ FFileName := AFileName;
+ Result := Execute;
+end;
+
+procedure TpsvCustomPHP.PrepareResult;
+var
+ ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF};
+ data: ^ppzval;
+ cnt : integer;
+ variable : pzval;
+begin
+ if FVariables.Count = 0 then
+ Exit;
+
+ if FExecuteMethod = emServer then
+ ht := GetSymbolsTable
+ else
+ ht := GetTrackHash('_GET');
+ if Assigned(ht) then
+ begin
+ for cnt := 0 to FVariables.Count - 1 do
+ begin
+ new(data);
+ try
+ if zend_hash_find(ht, zend_pchar(FVariables[cnt].Name),
+ strlen(zend_pchar(FVariables[cnt].Name)) + 1, data) = SUCCESS then
+ begin
+ variable := data^^;
+ convert_to_string(variable);
+ FVariables[cnt].Value := Z_STRVAL(variable);
+ end;
+ finally
+ freemem(data);
+ end;
+ end;
+ end;
+end;
+
+function TpsvCustomPHP.VariableByName(AName: zend_ustr): TPHPVariable;
+begin
+ Result := FVariables.ByName(AName);
+end;
+
+{Indicates activity of PHP Engine}
+function TpsvCustomPHP.EngineActive : boolean;
+begin
+ if Assigned(PHPEngine) then
+ Result := PHPEngine.EngineActive
+ else
+ Result := false;
+end;
+
+procedure TpsvCustomPHP.StartupRequest;
+var
+ gl : psapi_globals_struct;
+ TimeStr : string;
+begin
+ if not EngineActive then
+ raise EDelphiErrorEx.Create('PHP engine is not active ');
+
+ if FSessionActive then
+ Exit;
+
+ TSRMLS_D := tsrmls_fetch;
+
+ gl := GetSAPIGlobals;
+ gl^.server_context := Self;
+ //ShowMessage('TpsvCustomPHP.StartupRequest -- RegisterGlobals');
+ if PHPEngine.RegisterGlobals then
+ GetPHPGlobals(TSRMLS_D)^.register_globals := true;
+ //ShowMessage('TpsvCustomPHP.StartupRequest -- Try');
+ try
+ //ShowMessage('TpsvCustomPHP.StartupRequest -- FOnReadPost');
+ if Assigned(FOnReadPost) then
+ FOnReadPost(Self, FPostStream);
+ //ShowMessage('TpsvCustomPHP.StartupRequest -- zend_alter_ini_entry');
+ zend_alter_ini_entry('max_execution_time', 19, zend_pchar(TimeStr), Length(TimeStr), ZEND_INI_SYSTEM, ZEND_INI_STAGE_RUNTIME);
+ //ShowMessage('TpsvCustomPHP.StartupRequest -- php_request_startup');
+ php_request_startup(TSRMLS_D);
+ //ShowMessage('TpsvCustomPHP.StartupRequest -- FOnRequestStartup');
+ if Assigned(FOnRequestStartup) then
+ FOnRequestStartup(Self);
+ //ShowMessage('TpsvCustomPHP.StartupRequest --');
+ FSessionActive := true;
+ except
+ FSessionActive := false;
+ end;
+end;
+
+function TpsvCustomPHP.RunTime: boolean;
+begin
+ Result := not (csDesigning in ComponentState);
+end;
+
+function TpsvCustomPHP.GetThreadSafeResourceManager: pointer;
+begin
+ Result := TSRMLS_D;
+end;
+
+function TpsvCustomPHP.GetVariableCount: integer;
+begin
+ Result := FVariables.Count;
+end;
+
+
+procedure TpsvCustomPHP.ShutdownRequest;
+var
+ gl : psapi_globals_struct;
+begin
+ if not FSessionActive then
+ Exit;
+ try
+
+ if not FTerminated then
+ begin
+ try
+ php_request_shutdown(nil);
+ except
+ end;
+ gl := GetSAPIGlobals;
+ gl^.server_context := nil;
+ end;
+
+
+ if Assigned(FOnRequestShutdown) then
+ FOnRequestShutdown(Self);
+
+ finally
+ FSessionActive := false;
+ end;
+
+end;
+
+procedure TpsvCustomPHP.PrepareVariables;
+var
+ ht : {$IFDEF PHP7}Pzend_array{$ELSE}PHashTable{$ENDIF};
+ data: ^ppzval;
+ cnt : integer;
+ {$IFDEF PHP5}
+ EG : pzend_executor_globals;
+ {$ENDIF}
+begin
+ {$IFDEF PHP4}
+ ht := GetSymbolsTable;
+ {$ELSE}
+ begin
+ EG := GetExecutorGlobals;
+ if Assigned(EG) then
+ ht := @EG.symbol_table
+ else
+ ht := nil;
+ end;
+ {$ENDIF}
+
+ if Assigned(ht) then
+ begin
+ for cnt := 0 to FVariables.Count - 1 do
+ begin
+ new(data);
+ try
+ if zend_hash_find(ht, zend_pchar(FVariables[cnt].Name),
+ strlen(zend_pchar(FVariables[cnt].Name)) + 1, data) = SUCCESS then
+ begin
+ {$IFDEF PHP7}
+ if (data^^^.u1.v._type = IS_STRING) then
+ {$ELSE}
+ if (data^^^._type = IS_STRING) then
+ {$ENDIF}
+ begin
+ efree(data^^^.value.str.val);
+ ZVAL_STRING(data^^, zend_pchar(FVariables[cnt].Value), true);
+ end
+ else
+ begin
+ ZVAL_STRING(data^^, zend_pchar(FVariables[cnt].Value), true);
+ end;
+ end;
+ finally
+ freemem(data);
+ end;
+ end;
+ end;
+end;
+
+procedure TpsvCustomPHP.CloseVirtualFile;
+begin
+ {$IFDEF PHP4}
+ if FWriterHandle <> 0 then
+ begin
+ WaitForSingleObject(FWriterHandle, INFINITE);
+ CloseHandle(FWriterHandle);
+ FWriterHandle := 0;
+ end;
+ {$ELSE}
+ FVirtualStream.Clear;
+ {$ENDIF}
+end;
+
+function TpsvCustomPHP.CreateVirtualFile(A_code : zend_ustr): boolean;
+var
+{$IFDEF PHP4}
+_handles : array[0..1] of THandle;
+{$ENDIF}
+sc:PUTF8Char;
+begin
+
+ Result := false;
+ {$IFDEF PHP4}
+ if ACode = '' then
+ begin
+ FVirtualReadHandle := 0;
+ FVirtualWriteHandle := 0;
+ Exit; {empty buffer was provided}
+ end;
+
+ FVirtualCode := A_code;
+
+ if pipe(@_handles, 4096, 0) = -1 then
+ begin
+ FVirtualReadHandle := 0;
+ FVirtualWriteHandle := 0;
+ FVirtualCode := '';
+ Exit;
+ end;
+
+ FVirtualReadHandle := _handles[0];
+ FVirtualWriteHandle := _handles[1];
+ Result := true;
+ {$ELSE}
+ if A_code = '' then
+ Exit;
+ try
+ FVirtualStream.Clear;
+ FVirtualStream.WriteString(A_code);
+ FVirtualStream.Seek(0, TSeekOrigin.soBeginning);
+ finally
+ Result := True;
+ end;
+ {$ENDIF}
+end;
+
+
+function TpsvCustomPHP.GetEngine: IPHPEngine;
+begin
+ Result := PHPEngine;
+end;
+
+{ TPHPEngine }
+
+
+constructor TPHPEngine.Create(AOwner: TComponent);
+begin
+ inherited;
+ if Assigned(PHPEngine) then
+ raise Exception.Create('Only one instance of PHP engine per application');
+ FEngineActive := false;
+ FHandleErrors := true;
+ {$IFNDEF PHP540}
+ FSafeMode := false;
+ FSafeModeGid := false;
+ {$ENDIF}
+ FRegisterGlobals := true;
+ FHTMLErrors := false;
+ FMaxInputTime := 0;
+ FWaitForShutdown := false;
+ FConstants := TPHPConstants.Create(Self);
+ FRequestCount := 0;
+ FHash := TStringList.Create;
+ FHash.Duplicates := dupError;
+ FHash.Sorted := true;
+ InitializeCriticalSection(FLock);
+ PHPEngine := Self;
+
+end;
+
+destructor TPHPEngine.Destroy;
+begin
+ ShutdownAndWaitFor;
+ FEngineActive := false;
+ FConstants.Free;
+ FHash.Free;
+ DeleteCriticalSection(FLock);
+ if (PHPEngine = Self) then
+ PHPEngine := nil;
+ inherited;
+ if PHPLoaded then
+ UnloadPHP;
+end;
+
+function TPHPEngine.GetConstantCount: integer;
+begin
+ Result := FConstants.Count;
+end;
+{
+procedure log(i:String);
+var f:TextFile;
+begin
+ AssignFile(f, 'log.txt');
+ Append(f);
+ Write(f, #10 + #13 + i);
+ CloseFile(f);
+end;
+}
+procedure TPHPEngine.HandleRequest(ht: integer; return_value: pzval;
+ return_value_ptr: ppzval; this_ptr: pzval; return_value_used: integer;
+ TSRMLS_DC: pointer);
+
+var
+ Params : pzval_array;
+ AFunction : TPHPFunction;
+ j : integer;
+ FActiveFunctionName : string;
+ FunctionIndex : integer;
+ FZendVar : TZendVariable;
+ FParameters : TFunctionParams;
+ ReturnValue : variant;
+begin
+ FParameters := TFunctionParams.Create(nil, TFunctionParam);
+
+ if ht > 0 then
+ begin
+ if ( not (zend_get_parameters_my(ht, Params, TSRMLS_DC) = SUCCESS )) then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+ end;
+
+ FActiveFunctionName := get_active_function_name(TSRMLS_DC);
+ if FHash.Find(FActiveFunctionName, FunctionIndex) then
+ AFunction := TPHPFunction(FHash.Objects[FunctionIndex])
+ else
+ AFunction := nil;
+
+ if Assigned(AFunction) then
+ begin
+ if AFunction.Collection = nil then
+ Exit; {library was destroyed}
+
+ if Assigned(AFunction.OnExecute) then
+ begin
+ if AFunction.Parameters.Count <> ht then
+ begin
+ zend_wrong_param_count(TSRMLS_DC);
+ Exit;
+ end;
+
+ FParameters.Assign(AFunction.Parameters);
+ if ht > 0 then
+ begin
+ for j := 0 to ht - 1 do
+ begin
+ if not IsParamTypeCorrect(FParameters[j].ParamType, Params[j]^) then
+ begin
+ zend_error(E_WARNING, zend_pchar(
+ {$IFDEF PHP_UNICODE}Format{$ELSE}AnsiFormat{$ENDIF}
+ ('Wrong parameter type for %s()', [FActiveFunctionName])));
+ Exit;
+ end;
+ FParameters[j].ZendValue := (Params[j]^);
+ end;
+ end; { if ht > 0}
+ //log(FActiveFunctionName);
+ FZendVar := TZendVariable.Create;
+ FZendVar.AsZendVariable := return_value;
+ AFunction.OnExecute(Self, FParameters, ReturnValue, FZendVar, TSRMLS_DC);
+ if Assigned(FZendVar) then
+ begin
+ if FZendVar.ISNull then {perform variant conversion}
+ VariantToZend(ReturnValue, return_value);
+ FZendVar.Free;
+ end
+ else
+ VariantToZend(ReturnValue, return_value);
+ end; {if assigned AFunction.OnExecute}
+ end;
+ FParameters.Free;
+ dispose_pzval_array(Params);
+end;
+
+procedure TPHPEngine.PrepareIniEntry;
+var
+ p, p2 : pointer;
+ TimeStr : string;
+begin
+ if not PHPLoaded then
+ Exit;
+
+ if FHandleErrors then
+ begin
+ HFunc(@delphi_error_cb, 'zend_error_cb');
+ end;
+ {$IFNDEF PHP540}
+ if FSafeMode then
+ zend_alter_ini_entry('safe_mode', 10, '1', 1, PHP_INI_SYSTEM, PHP_INI_STAGE_STARTUP)
+ else
+ {$ENDIF}
+ zend_alter_ini_entry('safe_mode', 10, '0', 1, PHP_INI_SYSTEM, PHP_INI_STAGE_STARTUP);
+ {$IFNDEF PHP540}
+ if FSafeModeGID then
+ zend_alter_ini_entry('safe_mode_gid', 14, '1', 1, PHP_INI_SYSTEM, PHP_INI_STAGE_STARTUP)
+ else
+ {$ENDIF}
+ zend_alter_ini_entry('safe_mode_gid', 14, '0', 1, PHP_INI_SYSTEM, PHP_INI_STAGE_STARTUP);
+
+ zend_alter_ini_entry('register_argc_argv', 19, '0', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
+
+ if FRegisterGlobals then
+ zend_alter_ini_entry('register_globals', 17, '1', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE)
+ else
+ zend_alter_ini_entry('register_globals', 17, '0', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
+
+ if FHTMLErrors then
+ zend_alter_ini_entry('html_errors', 12, '1', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE)
+ else
+ zend_alter_ini_entry('html_errors', 12, '0', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
+
+ zend_alter_ini_entry('implicit_flush', 15, '1', 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
+ TimeStr := IntToStr(FMaxInputTime);
+ zend_alter_ini_entry('max_input_time', 15, zend_pchar(TimeStr), Length(TimeStr), ZEND_INI_SYSTEM, ZEND_INI_STAGE_ACTIVATE);
+end;
+
+procedure TPHPEngine.PrepareEngine;
+begin
+ delphi_sapi_module.name := 'embed'; {to solve a problem with dl()}
+ delphi_sapi_module.pretty_name := 'PHP for Delphi';
+ delphi_sapi_module.startup := php_delphi_startup;
+ delphi_sapi_module.shutdown := nil; //php_module_shutdown_wrapper;
+ delphi_sapi_module.activate:= nil;
+ delphi_sapi_module.deactivate := @php_delphi_deactivate;
+ delphi_sapi_module.ub_write := @php_delphi_ub_write;
+ delphi_sapi_module.flush := @php_delphi_flush;
+ delphi_sapi_module.stat:= nil;
+ delphi_sapi_module.getenv:= nil;
+ delphi_sapi_module.sapi_error := @zend_error;
+ delphi_sapi_module.header_handler := @php_delphi_header_handler;
+ delphi_sapi_module.send_headers := nil;
+ delphi_sapi_module.send_header := @php_delphi_send_header;
+ delphi_sapi_module.read_post := @php_delphi_read_post;
+ delphi_sapi_module.read_cookies := @php_delphi_read_cookies;
+ delphi_sapi_module.register_server_variables := @php_delphi_register_variables;
+ delphi_sapi_module.log_message := @php_delphi_log_message;
+ if FIniPath <> '' then
+ delphi_sapi_module.php_ini_path_override := zend_pchar(FIniPath)
+ else
+ delphi_sapi_module.php_ini_path_override := nil;
+ delphi_sapi_module.block_interruptions := nil;
+ delphi_sapi_module.unblock_interruptions := nil;
+ delphi_sapi_module.default_post_reader := nil;
+ delphi_sapi_module.treat_data := nil;
+ delphi_sapi_module.executable_location := nil;
+ delphi_sapi_module.php_ini_ignore := 0;
+
+ FLibraryModule.size := sizeOf(Tzend_module_entry);
+ FLibraryModule.zend_api := ZEND_MODULE_API_NO;
+ {$IFDEF PHP_DEBUG}
+ FLibraryModule.zend_debug := 1;
+ {$ELSE}
+ FLibraryModule.zend_debug := 0;
+ {$ENDIF}
+ FLibraryModule.zts := USING_ZTS;
+ FLibraryModule.name := 'php4delphi_internal';
+ FLibraryModule.functions := nil;
+ FLibraryModule.module_startup_func := @minit;
+ FLibraryModule.module_shutdown_func := @mshutdown;
+ FLibraryModule.info_func := @php_info_library;
+
+ FLibraryModule.request_shutdown_func := @rshutdown;
+ FLibraryModule.request_startup_func := @rinit;
+ {$if defined(PHP5) and not defined(PHP520)}
+ FLibraryModule.global_id := 0;
+ {$ifend}
+
+ FLibraryModule.module_started := 0;
+ FLibraryModule._type := MODULE_PERSISTENT;
+
+ FLibraryModule.Handle := nil;
+ FLibraryModule.module_number := 0;
+ {$ifdef PHP530}
+ {$ifndef COMPILER_VC9}
+ FLibraryModule.build_id := strdup(PAnsiChar(ZEND_MODULE_BUILD_ID));
+ {$else}
+ FLibraryModule.build_id := DupStr(zend_pchar(ZEND_MODULE_BUILD_ID));
+ {$endif}
+ {$endif}
+end;
+
+procedure TPHPEngine.RegisterConstants;
+var
+ cnt : integer;
+ ConstantName : zend_ustr;
+ ConstantValue : zend_ustr;
+begin
+ for cnt := 0 to FConstants.Count - 1 do
+ begin
+ ConstantName := FConstants[cnt].Name;
+ ConstantValue := FConstants[cnt].Value;
+ zend_register_string_constant(zend_pchar(ConstantName),
+ strlen(zend_pchar(ConstantName)) + 1,
+ zend_pchar(ConstantValue), CONST_PERSISTENT or CONST_CS, 0, TSRMLS_D);
+ end;
+ zend_register_bool_constant( zend_pchar('UTF8_SUPPORT'), 13, {$IFDEF PHP_UNICODE}TRUE{$ELSE}FALSE{$ENDIF},
+ CONST_PERSISTENT or CONST_CS, 0, TSRMLS_D);
+ RegisterInternalConstants(TSRMLS_D);
+end;
+
+procedure TPHPEngine.RegisterInternalConstants(TSRMLS_DC: pointer);
+{$IFDEF REGISTER_COLOURS}
+var
+ i : integer;
+ ColorName : zend_ustr;
+{$ENDIF}
+begin
+ {$IFDEF REGISTER_COLOURS}
+ for I := Low(Colors) to High(Colors) do
+ begin
+ ColorName := zend_ustr(Colors[i].Name);
+ zend_register_long_constant( zend_pchar(ColorName), strlen(zend_pchar(ColorName)) + 1, Colors[i].Value,
+ CONST_PERSISTENT or CONST_CS, 0, TSRMLS_DC);
+ end;
+ {$ENDIF}
+end;
+
+
+procedure TPHPEngine.SetConstants(Value: TPHPConstants);
+begin
+ FConstants.Assign(Value);
+end;
+
+procedure TPHPEngine.ShutdownEngine;
+begin
+
+ if PHPEngine <> Self then
+ raise EDelphiErrorEx.Create('Only active engine can be stopped');
+
+
+ if not FEngineActive then
+ Exit;
+
+ try
+
+ if @delphi_sapi_module.shutdown <> nil then
+ delphi_sapi_module.shutdown(@delphi_sapi_module);
+ sapi_shutdown;
+ {Shutdown PHP thread safe resource manager}
+ if Assigned(FOnEngineShutdown) then
+ FOnEngineShutdown(Self);
+ {$IF not Defined(PHP550) and not Defined(PHP560)}
+ try
+ tsrm_shutdown();
+ except
+
+ end;
+ {$ifend}
+ FHash.Clear;
+ finally
+ FEngineActive := false;
+ FWaitForShutdown := False;
+ end;
+end;
+
+procedure TPHPEngine.RegisterLibrary(ALib : TCustomPHPLibrary);
+var
+ cnt : integer;
+ skip : boolean;
+ FN : zend_ustr;
+begin
+ skip := false;
+ ALib.Refresh;
+
+ {No functions defined, skip this library}
+ if ALib.Functions.Count = 0 then
+ Exit;
+
+ for cnt := 0 to ALib.Functions.Count - 1 do
+ begin
+ FN :=
+ {$IFDEF PHP_UNICODE}UTF8LowerCase{$ELSE}AnsiLowerCase{$ENDIF}
+ (ALib.Functions[cnt].FunctionName);
+ if FHash.IndexOf(FN) > -1 then
+ begin
+ skip := true;
+ break;
+ end;
+ end;
+
+ if not skip then
+ begin
+ for cnt := 0 to ALib.Functions.Count - 1 do
+ begin
+ FN := {$IFDEF PHP_UNICODE}UTF8LowerCase{$ELSE}AnsiLowerCase{$ENDIF}
+ (ALib.Functions[cnt].FunctionName);
+ FHash.AddObject(FN, ALib.Functions[cnt]);
+ end;
+ ALib.Locked := true;
+ end;
+end;
+
+procedure TPHPEngine.StartupEngine;
+var
+ i : integer;
+ x: Pzend_module_entry;
+begin
+ if PHPEngine <> Self then
+ begin
+ raise EDelphiErrorEx.Create('Only one PHP engine can be activated');
+ end;
+
+ if FEngineActive then
+ raise EDelphiErrorEx.Create('PHP engine already active');
+
+ StartupPHP;
+ PrepareEngine;
+// ini := GetExecutorGlobals.ini_directives;
+
+
+
+ if not PHPLoaded then //Peter Enz
+ begin
+ raise EDelphiErrorEx.Create('PHP engine is not loaded');
+ end;
+
+ try
+ FHash.Clear;
+
+ for i := 0 to Librarian.Count -1 do
+ begin
+ RegisterLibrary(Librarian.GetLibrary(I));
+ end;
+
+
+ //Start PHP thread safe resource manager
+ tsrm_startup(128, 1, 0 , nil);
+
+ sapi_startup(@delphi_sapi_module);
+
+ RefreshLibrary;
+
+ php_module_startup(@delphi_sapi_module, @FLibraryModule, 1);
+
+ TSRMLS_D := ts_resource_ex(0, nil);
+ if Length(FAddMods) > 0 then
+ for x in FAddMods do
+ begin
+ zend_register_module_ex(x, TSRMLS_D);
+ zend_startup_module_ex(x, TSRMLS_D);
+ end;
+
+
+ PrepareIniEntry;
+ RegisterConstants;
+
+ if Assigned(FOnEngineStartup) then
+ FOnEngineStartup(Self);
+
+ FEngineActive := true;
+ except
+ FEngineActive := false;
+ end;
+end;
+
+procedure TPHPEngine.StartupPHP;
+var
+ DLLName : string;
+begin
+ if not PHPLoaded then
+ begin
+ if FDLLFolder <> '' then
+ DLLName := IncludeTrailingBackSlash(FDLLFolder) + PHPlp
+ else
+ DLLName := PHPlp;
+ LoadPHP(DLLName);
+ if FReportDLLError then
+ begin
+ if PHPLib = 0 then raise Exception.CreateFmt('%s not found', [DllName]);
+ end;
+ end;
+end;
+
+procedure TPHPEngine.LockEngine;
+begin
+ EnterCriticalSection(FLock);
+end;
+
+procedure TPHPEngine.UnlockEngine;
+begin
+ LeaveCriticalSection(FLock);
+end;
+
+procedure TPHPEngine.HandleError(Sender: TObject; AText: string;
+ AType: Integer; AFileName: string; ALineNo: integer);
+begin
+ LockEngine;
+ try
+ if Assigned(FOnScriptError) then
+
+
+ FOnScriptError(Sender, AText, AType, AFileName, ALineNo);
+ //ShowMessage( AText + #10#13 + AType.ToString + #10#13 + AFileName + #10#13 + ALineNo.ToString );
+ // FOnScriptError(Sender, AText, AType, AFileName, ALineNo);
+ finally
+ UnlockEngine;
+ end;
+end;
+
+procedure TPHPEngine.HandleLogMessage(Sender: TObject; AText: string);
+begin
+ LockEngine;
+ try
+ if Assigned(FOnLogMessage) then
+ FOnLogMessage(Sender, AText);
+ finally
+ UnlockEngine;
+ end;
+end;
+
+procedure TPHPEngine.PrepareForShutdown;
+begin
+ LockEngine;
+ try
+ FWaitForShutdown := true;
+ finally
+ UnlockEngine;
+ end;
+end;
+
+procedure TPHPEngine.ShutdownAndWaitFor;
+var
+ cnt : integer;
+ AllClear : boolean;
+begin
+ PrepareForShutdown;
+
+ AllClear := false;
+ while not AllClear do
+ begin
+ cnt := FRequestCount;
+ if cnt <= 0 then
+ AllClear := true
+ else
+ Sleep(250);
+ end;
+ ShutdownEngine;
+end;
+
+function TPHPEngine.GetEngineActive: boolean;
+begin
+ Result := FEngineActive;
+end;
+
+procedure TPHPEngine.UnlockLibraries;
+var
+ cnt : integer;
+begin
+ if Assigned(Librarian) then
+ begin
+ for cnt := 0 to Librarian.Count - 1 do
+ Librarian.GetLibrary(cnt).Locked := false;
+ end;
+end;
+
+procedure TPHPEngine.RemoveRequest;
+var
+ x: Pzend_module_entry;
+ xp: function(_type : integer; module_number : integer; TSRMLS_DC : pointer):integer;cdecl;
+begin
+ InterlockedDecrement(FRequestCount);
+ if Length(FAddMods) > 0 then
+ for x in FAddMods do
+ begin
+ xp := x^.request_shutdown_func;
+ if(Assigned(xp)) then
+ xp(x^._type, x^.module_number, TSRMLS_D);
+ end;
+end;
+
+procedure TPHPEngine.AddFunction(FN: zend_pchar; Func: Pointer);
+begin
+ inc(RegNumFunc);
+ SetLength(FLibraryEntryTable, RegNumFunc + 1);
+ FLibraryEntryTable[RegNumFunc - 1].fname := FN;
+ //FLibraryEntryTable[RegNumFunc - 1].num_args := 0;
+ FLibraryEntryTable[RegNumFunc - 1].arg_info := nil;
+ FLibraryEntryTable[RegNumFunc - 1].handler := Func;
+end;
+
+procedure TPHPEngine.AddModule(Module_entry: Pzend_module_entry);
+begin
+ SetLength(FAddMods, Length(FAddMods)+1);
+ FAddMods[High(FAddMods)] := Module_entry;
+end;
+
+procedure TPHPEngine.RefreshLibrary;
+var i: integer;
+begin
+ Self.AddFunction('delphi_date', @delphi_date);
+ Self.AddFunction('delphi_get_author', @delphi_get_author);
+ Self.AddFunction('delphi_str_date', @delphi_str_date);
+ Self.AddFunction('InputBox', @delphi_input_box);
+
+ for i := 0 to FHash.Count - 1 do
+ Self.AddFunction(zend_pchar(zend_ustr(FHash[i])), @DispatchRequest);
+ FLibraryModule.functions := @FLibraryEntryTable[0];
+end;
+
+procedure TPHPEngine.AddRequest;
+var
+ x: Pzend_module_entry;
+ xp: function(_type : integer; module_number : integer; TSRMLS_DC : pointer):integer;cdecl;
+begin
+ InterlockedIncrement(FRequestCount);
+ if Length(FAddMods) > 0 then
+ for x in FAddMods do
+ begin
+ xp := x^.request_startup_func;
+ if(Assigned(xp)) then
+ xp(x^._type, x^.module_number, TSRMLS_D);
+ end;
+end;
+
+initialization
+ InitLibrarian;
+
+finalization
+ UnInitLibrarian;
- FLibraryModule.functions := @FLibraryEntryTable[0];
-end;
-procedure TPHPEngine.StartupEngine;
-var
- i : integer;
-begin
- if PHPEngine <> Self then
- begin
- raise EDelphiErrorEx.Create('Only one PHP engine can be activated');
- end;
-
- if FEngineActive then
- raise EDelphiErrorEx.Create('PHP engine already active');
-
- StartupPHP;
- PrepareEngine;
-// ini := GetExecutorGlobals.ini_directives;
-
-
-
- if not PHPLoaded then //Peter Enz
- begin
- raise EDelphiErrorEx.Create('PHP engine is not loaded');
- end;
-
- try
- FHash.Clear;
-
- for i := 0 to Librarian.Count -1 do
- begin
- RegisterLibrary(Librarian.GetLibrary(I));
- end;
-
-
- //Start PHP thread safe resource manager
- tsrm_startup(128, 1, 0 , nil);
-
- sapi_startup(@delphi_sapi_module);
-
- RefreshLibrary;
-
-
- php_module_startup(@delphi_sapi_module, @FLibraryModule, 1);
-
-
- TSRMLS_D := ts_resource_ex(0, nil);
-
- PrepareIniEntry;
- RegisterConstants;
-
- if Assigned(FOnEngineStartup) then
- FOnEngineStartup(Self);
-
- FEngineActive := true;
- except
- FEngineActive := false;
- end;
-end;
-
-procedure TPHPEngine.StartupPHP;
-var
- DLLName : string;
-begin
- if not PHPLoaded then
- begin
- if FDLLFolder <> '' then
- DLLName := IncludeTrailingBackSlash(FDLLFolder) + PHPWin
- else
- DLLName := PHPWin;
- LoadPHP(DLLName);
- if FReportDLLError then
- begin
- if PHPLib = 0 then raise Exception.CreateFmt('%s not found', [DllName]);
- end;
- end;
-end;
-
-procedure TPHPEngine.LockEngine;
-begin
- EnterCriticalSection(FLock);
-end;
-
-procedure TPHPEngine.UnlockEngine;
-begin
- LeaveCriticalSection(FLock);
-end;
-
-procedure TPHPEngine.HandleError(Sender: TObject; AText: string;
- AType: Integer; AFileName: string; ALineNo: integer);
-begin
- LockEngine;
- try
- if Assigned(FOnScriptError) then
-
-
- FOnScriptError(Sender, AText, AType, AFileName, ALineNo);
- //ShowMessage( AText + #10#13 + AType.ToString + #10#13 + AFileName + #10#13 + ALineNo.ToString );
- // FOnScriptError(Sender, AText, AType, AFileName, ALineNo);
- finally
- UnlockEngine;
- end;
-end;
-
-procedure TPHPEngine.HandleLogMessage(Sender: TObject; AText: string);
-begin
- LockEngine;
- try
- if Assigned(FOnLogMessage) then
- FOnLogMessage(Sender, AText);
- finally
- UnlockEngine;
- end;
-end;
-
-procedure TPHPEngine.PrepareForShutdown;
-begin
- LockEngine;
- try
- FWaitForShutdown := true;
- finally
- UnlockEngine;
- end;
-end;
-
-procedure TPHPEngine.ShutdownAndWaitFor;
-var
- cnt : integer;
- AllClear : boolean;
-begin
- PrepareForShutdown;
-
- AllClear := false;
- while not AllClear do
- begin
- cnt := FRequestCount;
- if cnt <= 0 then
- AllClear := true
- else
- Sleep(250);
- end;
- ShutdownEngine;
-end;
-
-function TPHPEngine.GetEngineActive: boolean;
-begin
- Result := FEngineActive;
-end;
-
-procedure TPHPEngine.UnlockLibraries;
-var
- cnt : integer;
-begin
- if Assigned(Librarian) then
- begin
- for cnt := 0 to Librarian.Count - 1 do
- Librarian.GetLibrary(cnt).Locked := false;
- end;
-end;
-
-procedure TPHPEngine.RemoveRequest;
-begin
- InterlockedDecrement(FRequestCount);
-end;
-
-procedure TPHPEngine.AddFunction(FN: zend_ustr; Func: Pointer);
-begin
- if MyFuncs.IndexOf(FN) = -1 then
- MyFuncs.AddObject(FN, TObject(Func));
-end;
-
-procedure TPHPEngine.AddRequest;
-begin
- InterlockedIncrement(FRequestCount);
-end;
-
-initialization
- InitLibrarian;
-
-finalization
- UnInitLibrarian;
-
-end.
+end.
diff --git a/Source/phpAbout.dfm b/Source/phpAbout.dfm
index b2826e6..88d0aa1 100644
--- a/Source/phpAbout.dfm
+++ b/Source/phpAbout.dfm
@@ -1205,7 +1205,7 @@ object dlgAbout: TdlgAbout
Alignment = taCenter
Anchors = []
AutoSize = False
- Caption = 'Copyright (c) 2002-2019 Serhiy Perevoznyk, Andrew Zenin'#13#10'All Rights Reserved'
+ Caption = 'Copyright (c) 2002-2020 Serhiy Perevoznyk, Lew Zienin, Nikita Ganzikov'#13#10'All Rights Reserved'
end
object labVersion: TLabel
Left = 4
diff --git a/Source/phpClass.pas b/Source/phpClass.pas
index 12e035d..0c9f39b 100644
--- a/Source/phpClass.pas
+++ b/Source/phpClass.pas
@@ -18,6 +18,7 @@ interface
uses
Windows, SysUtils, Classes, PHPCommon,
+ {$IFDEF PHP_UNICODE}WideStrUtils, {$ENDIF}
ZendTypes, ZendAPI, phpTypes, PHPAPI,
phpFunctions;
@@ -155,7 +156,6 @@ TPHPClassInstance = class(TComponent)
property Properties : TClassProperties read FProperties write SetProperties;
end;
-
{$IFDEF PHP5}
procedure RegisterClassHandlers;
{$ENDIF}
@@ -173,11 +173,7 @@ implementation
{$ENDIF}
const
- {$IFDEF PHP4}
- le_classresource_name = 'TPHPCLASS4';
- {$ELSE}
le_classresource_name = 'TPHPCLASS5';
- {$ENDIF}
procedure class_destructor_handler(rsrc : PZend_rsrc_list_entry; TSRMLS_D : pointer); cdecl;
var
@@ -223,211 +219,6 @@ function class_call_constructor(AClassName : zend_ustr; return_value : pzval) :
end;
end;
-{$IFDEF PHP4}
-
-//PHP4
-function class_set_property_handler(property_reference : Pzend_property_reference; value : pzval) : integer; cdecl;
-var
- this_ptr : pzval;
- OBJ : TPHPClassInstance;
- data: ^ppzval;
- element : pzend_list_element;
- prop : pzend_overloaded_element;
- p : pointer;
- propname : zend_ustr;
- tsrmls : pointer;
- param : TClassProperty;
-begin
- tsrmls := ts_resource_ex(0, nil);
- element := property_reference^.elements_list^.head;
- p := @element^.data;
- prop := pzend_overloaded_element(p);
- propname := prop^.element.value.str.val;
-
- this_ptr := property_reference^._object;
- new(data);
- if zend_hash_find(this_ptr^.value.obj.properties, 'instance', strlen('instance') + 1, data) = SUCCESS then
- Obj := zend_fetch_resource(data^, TSRMLS, -1, 'class resource', nil, 1, le_classresource)
- else
- OBJ := nil;
- freemem(data);
- if Assigned(Obj) then
- begin
- convert_to_string(value);
- param := Obj.Properties.ByName(propname);
- if Assigned(param) then
- param.Value := value.value.str.val;
- end;
- Result := SUCCESS;
-end;
-
-
-
-//PHP4
-procedure class_call_function(ht : integer; return_value : pzval; this_ptr : pzval;
- return_value_used : integer; TSRMLS_DC : pointer; property_reference : Pzend_property_reference ); cdecl;
-var
- OBJ : TPHPClassInstance;
- Producer : TPHPClass;
- M : TPHPClassMethod;
- data: ^ppzval;
- element : pzend_list_element;
- prop : pzend_overloaded_element;
- p : pointer;
- MethodName : zend_ustr;
- Params : pzval_array;
- j : integer;
-begin
- element := property_reference^.elements_list^.head;
- p := @element^.data;
- prop := pzend_overloaded_element(p);
- MethodName := prop^.element.value.str.val;
- this_ptr := property_reference^._object;
- new(data);
- if (zend_hash_find(this_ptr^.value.obj.properties, 'instance', strlen('instance') + 1, data) = SUCCESS) then
- Obj := zend_fetch_resource(data^, TSRMLS_DC, -1, 'class resource', nil, 1, le_classresource)
- else
- Obj := nil;
- freemem(data);
-
- if not Assigned(Obj) then
- begin
- //not assigned obj = new instance (constructor)
- class_call_constructor(MethodName, this_ptr);
- exit;
- end;
-
- if ht > 0 then
- begin
- if ( not (zend_get_parameters_ex(ht, Params) = SUCCESS )) then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
- end;
-
-
- Producer := Obj.Producer;
- if Assigned(Producer) then
- begin
- M := Producer.Methods.ByName(MethodName);
- if Assigned(M) then
- begin
- if Assigned(M.FOnExecute) then
- begin
- if M.Parameters.Count <> ht then
- begin
- zend_wrong_param_count(TSRMLS_DC);
- Exit;
- end;
-
- if ht > 0 then
- begin
- for j := 0 to ht - 1 do
- begin
- if not IsParamTypeCorrect(M.Parameters[j].ParamType, Params[j]^) then
- begin
- zend_error(E_WARNING, zend_pchar(Format('Wrong parameter type for %s()', [get_active_function_name(TSRMLS_DC)])));
- Exit;
- end;
- M.Parameters[j].Value := zval2variant(Params[j]^^);
- end;
- end; // if ht > 0
-
-
- M.ZendVar.AsZendVariable := return_value; //direct access to zend variable
- M.FOnExecute(Obj, M.Parameters, M.ReturnValue, M.FZendVar.AsZendVariable, this_ptr, TSRMLS_DC);
- if M.ZendVar.ISNull then //perform variant conversion
- variant2zval(M.ReturnValue, return_value);
-
- end;
- end;
- end;
- dispose_pzval_array(Params);
-end;
-
-
-//PHP4
-procedure class_get_property_handler(val : pzval; property_reference : PZend_property_reference); cdecl;
-var
- this_ptr : pzval;
- element : pzend_list_element;
- prop : pzend_overloaded_element;
- obj : TPHPClassInstance;
- p : pointer;
- propname : zend_ustr;
- tsrmls : pointer;
- data: ^ppzval;
- param : TClassProperty;
-begin
- tsrmls := ts_resource_ex(0, nil);
- element := property_reference^.elements_list^.head;
- p := @element^.data;
- prop := pzend_overloaded_element(p);
- propname := prop^.element.value.str.val;
- this_ptr := property_reference^._object;
- new(data);
- if ( zend_hash_find(this_ptr^.value.obj.properties, 'instance', strlen('instance') + 1, data) <> SUCCESS) then
- Obj := nil
- else
- Obj := zend_fetch_resource(data^, TSRMLS, -1, 'class resource', nil, 1, le_classresource);
- freemem(data);
- if Assigned(Obj) then
- begin
- param := Obj.Properties.ByName(propname);
- if Assigned(param) then
- ZVAL_STRING(val, zend_pchar(param.value), true)
- else
- ZVAL_EMPTY_STRING(val)
- end
- else
- ZVAL_STRING(val, 'undefined', true);
-end;
-
-//PHP4
-procedure _class_get_property_wrapper; assembler;
-asm
- push ebp
- mov ebp,esp
- sub esp,50h
- push ebx
- push esi
- push edi
- lea edi,[ebp-50h]
- mov ecx,14h
- mov eax,0CCCCCCCCh
- rep stosd
- mov eax,dword ptr [ebp+0Ch]
- push eax
- lea ecx,[ebp-10h]
- push ecx
- call class_get_property_handler
- add esp,8
- mov edx,dword ptr [ebp+8]
- mov eax,dword ptr [ebp-10h]
- mov dword ptr [edx],eax
- mov ecx,dword ptr [ebp-0Ch]
- mov dword ptr [edx+4],ecx
- mov eax,dword ptr [ebp-8]
- mov dword ptr [edx+8],eax
- mov ecx,dword ptr [ebp-4]
- mov dword ptr [edx+0Ch],ecx
- mov eax,dword ptr [ebp+8]
-
- pop edi
- pop esi
- pop ebx
- add esp,50h
- cmp ebp,esp
- mov esp,ebp
- pop ebp
- ret
-end;
-{$ENDIF}
-
-
-
-
{$IFDEF PHP5}
// Read object property value (getter)
@@ -443,7 +234,7 @@ function class_get_property_handler(_object : pzval; member : pzval; _type : int
begin
retval := emalloc(sizeof(zval));
ZeroMemory(retval, sizeof(zval));
- propname := member^.value.str.val;
+ propname := Z_STRVAL(member);
new(data);
try
object_properties := Z_OBJPROP(_object);
@@ -480,7 +271,7 @@ procedure class_set_property_handler(_object : pzval; member : pzval; value : pz
object_properties : PHashTable;
param : TClassProperty;
begin
- propname := member^.value.str.val;
+ propname := Z_STRVAL(member);
new(data);
try
object_properties := Z_OBJPROP(_object);
@@ -497,7 +288,7 @@ procedure class_set_property_handler(_object : pzval; member : pzval; value : pz
convert_to_string(value);
param := Obj.Properties.ByName(propname);
if Assigned(param) then
- param.Value := value.value.str.val;
+ param.Value := Z_STRVAL(value);
end;
end;
@@ -534,7 +325,7 @@ function class_call_method(method : zend_pchar; ht : integer; return_value : pzv
if ht > 0 then
begin
- if ( not (zend_get_parameters_ex(ht, Params) = SUCCESS )) then
+ if ( not (zend_get_parameters_my(ht, Params, TSRMLS_DC) = SUCCESS )) then
begin
zend_wrong_param_count(TSRMLS_DC);
Result := FAILURE;
@@ -576,7 +367,7 @@ function class_call_method(method : zend_pchar; ht : integer; return_value : pzv
M.ZendVar.AsZendVariable := return_value; //direct access to zend variable
M.FOnExecute(Obj, M.Parameters, M.ReturnValue, M.FZendVar.AsZendVariable, this_ptr, TSRMLS_DC);
if M.ZendVar.ISNull then //perform variant conversion
- variant2zval(M.ReturnValue, return_value);
+ VariantToZend(M.ReturnValue, return_value);
end;
end;
@@ -678,24 +469,12 @@ procedure TPHPClass.ClassRegister(AModuleNumber : integer);
ZeroMemory(@FClassEntry, SizeOf(TZend_Class_Entry));
- {$IFDEF PHP5}
FClassFunction[0].fname := zend_pchar(FClassName);
FClassFunction[0].handler := @class_init_new;
INIT_CLASS_ENTRY(FClassEntry, zend_pchar(FClassName) , @FClassFunction);
- {$ELSE}
- INIT_CLASS_ENTRY(FClassEntry, zend_pchar(FClassName) , nil);
- {$ENDIF}
FClassObject := zend_register_internal_class(@FClassEntry, tsrmls);
-
- {$IFDEF PHP4}
- FClassObject.handle_property_get := @_class_get_property_wrapper;
- FClassObject.handle_property_set := @class_set_property_handler;
- FClassObject.handle_function_call := @class_call_function;
- {$ENDIF}
-
-
Application.RegisterPHPClass(FClassName, FClassObject);
end;
end;
@@ -742,17 +521,8 @@ function TPHPClass.InstanceConstructor(return_value : pzval): TPHPClassInstance;
FClassObject := GetClassEntry;
if not assigned(FClassObject) then
Exit;
- {$IFDEF PHP4}
- _object_init_ex(return_value, FClassObject, nil, 0, TSRMLS);
- {$ELSE}
object_init(return_value, FClassObject, TSRMLS );
- {$ENDIF}
-
- {$IFDEF PHP4}
- add_property_resource_ex(return_value, 'instance', strlen('instance') +1, rn);
- {$ELSE}
add_property_resource_ex(return_value, 'instance', strlen('instance') +1, rn, TSRMLS);
- {$ENDIF}
{$IFDEF PHP5}
return_value.value.obj.handlers := @ClassObjectHandlers;
@@ -786,18 +556,8 @@ procedure TPHPClass.ProduceInstance(AValue: pzval);
FClassObject := Application.GetPHPClass(FClassName);
if not assigned(FClassObject) then
Exit;
-
- {$IFDEF PHP4}
- _object_init_ex(AValue, FClassObject, nil, 0, TSRMLS);
- {$ELSE}
object_init(AValue, FClassObject, TSRMLS );
- {$ENDIF}
-
- {$IFDEF PHP4}
- add_property_resource_ex(AValue, 'instance', strlen('instance') +1, rn);
- {$ELSE}
add_property_resource_ex(AValue, 'instance', strlen('instance') +1, rn, TSRMLS);
- {$ENDIF}
{$IFDEF PHP5}
AValue.value.obj.handlers := @ClassObjectHandlers;
@@ -807,7 +567,7 @@ procedure TPHPClass.ProduceInstance(AValue: pzval);
procedure TPHPClass.SetClassName(const Value: zend_ustr);
begin
- FClassName := LowerCase(Value);
+ FClassName := {$IFDEF PHP_UNICODE}UTF8LowerCase(Value){$ELSE}LowerCase(Value){$ENDIF};
end;
procedure TPHPClass.SetMethods(const Value: TPHPClassmethods);
@@ -881,12 +641,9 @@ function TClassProperty.GetAsFloat: double;
function TClassProperty.GetAsInteger: integer;
var
- {$IFDEF VERSION12}
- c : WideChar;
- {$ELSE}
- c : AnsiChar;
- {$ENDIF}
+ c: CharPtr;
begin
+{$if CompilerVersion > 21}
c := FormatSettings.DecimalSeparator;
try
FormatSettings.DecimalSeparator := '.';
@@ -894,6 +651,15 @@ function TClassProperty.GetAsInteger: integer;
finally
FormatSettings.DecimalSeparator := c;
end;
+{$else}
+ c := DecimalSeparator;
+ try
+ DecimalSeparator := '.';
+ Result := Round(ValueToFloat(FValue));
+ finally
+ DecimalSeparator := c;
+ end;
+{$ifend}
end;
function TClassProperty.GetDisplayName: string;
@@ -919,12 +685,9 @@ procedure TClassProperty.SetAsFloat(const Value: double);
procedure TClassProperty.SetAsInteger(const Value: integer);
var
- {$IFDEF VERSION12}
- c : WideChar;
- {$ELSE}
- c : AnsiChar;
- {$ENDIF}
+ c: CharPtr;
begin
+{$if CompilerVersion > 21}
c := FormatSettings.DecimalSeparator;
try
FormatSettings.DecimalSeparator := '.';
@@ -932,6 +695,15 @@ procedure TClassProperty.SetAsInteger(const Value: integer);
finally
FormatSettings.DecimalSeparator := c;
end;
+{$else}
+ c := DecimalSeparator;
+ try
+ DecimalSeparator := '.';
+ FValue := IntToStr(Value);
+ finally
+ DecimalSeparator := c;
+ end;
+{$ifend}
end;
@@ -1123,17 +895,17 @@ procedure TPHPClassMethod.SetDisplayName(const Value: string);
F: TPHPClassMethod;
begin
if
- {$IFDEF PHP_UNICE}CompareText{$ELSE}AnsiCompareText{$ENDIF}(Value, FName) <> 0 then
+ {$IFDEF PHP_UNICODE}CompareText{$ELSE}AnsiCompareText{$ENDIF}(Value, FName) <> 0 then
begin
if Collection <> nil then
for I := 0 to Collection.Count - 1 do
begin
F := TPHPClassMethods(Collection).Items[I];
if (F <> Self) and (F is TPHPClassMethod) and
- ({$IFDEF PHP_UNICE}CompareText{$ELSE}AnsiCompareText{$ENDIF}(Value, F.Name) = 0) then
+ ({$IFDEF PHP_UNICODE}CompareText{$ELSE}AnsiCompareText{$ENDIF}(Value, F.Name) = 0) then
raise Exception.Create('Duplicate method name');
end;
- FName := LowerCase(Value);
+ FName := {$IFDEF PHP_UNICODE}UTF8LowerCase(Value){$ELSE}AnsiLowerCase(Value){$ENDIF};
Changed(False);
end;
end;
diff --git a/Source/phpModules.pas b/Source/phpModules.pas
index d7397a8..43629c7 100644
--- a/Source/phpModules.pas
+++ b/Source/phpModules.pas
@@ -16,7 +16,17 @@
interface
uses
- SyncObjs, Windows, SysUtils, Types, Classes, VCL.Forms, VCL.Consts,
+ SyncObjs, {$IFNDEF FPC} Windows, {$ELSE} LCLType,LCLIntf,dynlibs,LCLProc,{$ENDIF} SysUtils, Types, Classes,
+ {$if defined(VCL) and (CompilerVersion > 21)}
+ VCL.Forms, VCL.Consts,
+ {$elseif defined(FMX)}
+ FMX.Forms, FMX.Consts,
+ {$elseif defined(KYLIX)}
+ QForms, QConsts,
+ {$elseif defined(VCL) or defined(LCL)}
+ Forms, Consts,
+ {$ifend}
+
PHPCommon,
{$IFDEF VERSION6}RTLConsts, Variants,{$ENDIF} ZendAPI, phpAPI,
phpFunctions,
@@ -265,7 +275,7 @@ function rshutdown (_type : integer; module_number : integer; TSRMLS_DC : pointe
procedure DispatchRequest(ht : integer; return_value : pzval; return_value_ptr : ppzval;
this_ptr : pzval; return_value_used : integer; TSRMLS_DC : pointer); cdecl;
begin
- ZVAL_NULL(return_value);
+ ZvalVal(return_value);
if Assigned(Application) then
try
Application.HandleRequest(ht, return_value, return_value_ptr, this_ptr, return_value_used, TSRMLS_DC);
@@ -343,15 +353,11 @@ function get_module : Pzend_module_entry; cdecl;
{$ENDIF}
module_entry_table[cnt].handler := @DispatchRequest;
- {$IFDEF PHP4}
- module_entry_table[cnt].func_arg_types := nil;
- {$ENDIF}
+ module_entry_table[cnt].arg_info := nil;
end;
module_entry_table[Extension.FFunctions.Count].fname := nil;
module_entry_table[Extension.FFunctions.Count].handler := nil;
- {$IFDEF PHP4}
- module_entry_table[Extension.FFunctions.Count].func_arg_types := nil;
- {$ENDIF}
+ module_entry_table[Extension.FFunctions.Count].arg_info := nil;
ModuleEntry.functions := @module_entry_table[0];
ModuleEntry._type := ORD(Extension.ModuleType) + 1;
@@ -411,22 +417,30 @@ function TCustomPHPExtension.FunctionByName(
procedure TCustomPHPExtension.phpwrite(str: zend_pchar; str_len: integer);
begin
+{$IFNDEF PHP550}
php_body_write(str, str_len, FTSRMLS);
+{$ENDIF}
end;
procedure TCustomPHPExtension.phpwrite_h(str: zend_pchar; str_len: integer);
begin
+{$IFNDEF PHP550}
php_header_write(str, str_len, FTSRMLS);
+{$ENDIF}
end;
procedure TCustomPHPExtension.puts(str: zend_pchar);
begin
+{$IFNDEF PHP550}
php_body_write(str, strlen(str), FTSRMLS);
+{$ENDIF}
end;
procedure TCustomPHPExtension.puts_h(str: zend_pchar);
begin
+{$IFNDEF PHP550}
php_header_write(str, strlen(str), FTSRMLS);
+{$ENDIF}
end;
procedure TCustomPHPExtension.ReportError(ErrType: integer;
@@ -452,7 +466,15 @@ constructor TPHPExtension.Create(AOwner: TComponent);
try
if Assigned(OnCreate) and OldCreateOrder then OnCreate(Self);
except
- VCL.Forms.Application.HandleException(Self);
+ {$if defined(VCL) and (CompilerVersion > 21)}
+ VCL.Forms
+ {$elseif defined(FMX)}
+ FMX.Forms
+ {$elseif defined(KYLIX)}
+ QForms
+ {$elseif defined(VCL) or defined(LCL)}
+ Forms
+ {$ifend}.Application.HandleException(Self);
end;
end;
end;
@@ -463,11 +485,38 @@ constructor TPHPExtension.Create(AOwner: TComponent);
procedure DoneVCLApplication;
begin
try
- VCL.Forms.Application.OnException := nil;
- if VCL.Forms.Application.Handle <> 0 then ShowOwnedPopups(VCL.Forms.Application.Handle, False);
- VCL.Forms.Application.ShowHint := False;
- VCL.Forms.Application.Destroying;
- VCL.Forms.Application.DestroyComponents;
+ {$if defined(VCL) and (CompilerVersion > 21)}
+ VCL.Forms
+ {$elseif defined(FMX)}
+ FMX.Forms
+ {$elseif defined(KYLIX)}
+ QForms
+ {$elseif defined(VCL) or defined(LCL)}
+ Forms
+ {$ifend}.Application.OnException := nil;
+ {$IFDEF WINDOWS}
+ if {$if defined(VCL) and (CompilerVersion > 21)}
+ VCL.Forms
+ {$elseif defined(FMX)}
+ FMX.Forms
+ {$elseif defined(KYLIX)}
+ QForms
+ {$elseif defined(VCL) or defined(LCL)}
+ Forms
+ {$ifend}.Application.Handle <> 0 then ShowOwnedPopups({$if defined(VCL) and (CompilerVersion > 21)}
+ VCL.Forms
+ {$elseif defined(FMX)}
+ FMX.Forms
+ {$elseif defined(KYLIX)}
+ QForms
+ {$elseif defined(VCL) or defined(LCL)}
+ Forms
+ {$ifend}.Application.Handle, False);
+ {$ELSE}
+ Forms.Application.ShowHint := False;
+ Forms.Application.Destroying;
+ Forms.Application.DestroyComponents;
+ {$ENDIF}
except
end;
end;
@@ -600,7 +649,15 @@ procedure TPHPApplication.OnExceptionHandler(Sender: TObject;
procedure TPHPApplication.Run;
begin
- VCL.Forms.Application.OnException := OnExceptionHandler;
+ {$if defined(VCL) and (CompilerVersion > 21)}
+ VCL.Forms
+ {$elseif defined(FMX)}
+ FMX.Forms
+ {$elseif defined(KYLIX)}
+ QForms
+ {$elseif defined(VCL) or defined(LCL)}
+ Forms
+ {$ifend}.Application.OnException := OnExceptionHandler;
end;
@@ -704,7 +761,7 @@ procedure TPHPApplication.HandleRequest(ht: integer; return_value : pzval; retu
FZendVar.AsZendVariable := return_value;
AFunction.OnExecute(DataModule, FParameters, ReturnValue, FZendVar, TSRMLS_DC);
if FZendVar.ISNull then
- variant2zval(ReturnValue, return_value);
+ VariantToZend(ReturnValue, return_value);
finally
FZendVar.Free;
end;
diff --git a/Source/phpWeb.pas b/Source/phpWeb.pas
index 52ce78d..ac4ab48 100644
--- a/Source/phpWeb.pas
+++ b/Source/phpWeb.pas
@@ -16,7 +16,7 @@
interface
uses
- Windows, ToolsAPI, Forms, Dialogs, SysUtils, Graphics, Classes, ShellAPI;
+ {$IFNDEF FPC} Windows{$ELSE} LCLType,LCLIntf,dynlibs,libc{$ENDIF}, ToolsAPI, Forms, Dialogs, SysUtils, Graphics, Classes, ShellAPI;
type
TphpWebWizard = class(TNotifierObject, IOTAWIzard, IOTAMenuWizard)
diff --git a/Source/zend_dynamic_array.pas b/Source/zend_dynamic_array.pas
index e58c4d8..99eec4d 100644
--- a/Source/zend_dynamic_array.pas
+++ b/Source/zend_dynamic_array.pas
@@ -15,7 +15,7 @@
interface
uses
- Windows, SysUtils, ZENDTypes;
+ SysUtils, ZENDTypes;
type
diff --git a/php4Delphi.pdf b/php4Delphi.pdf
deleted file mode 100644
index b88790c..0000000
Binary files a/php4Delphi.pdf and /dev/null differ
diff --git a/readme.txt b/readme.txt
deleted file mode 100644
index ead92f3..0000000
--- a/readme.txt
+++ /dev/null
@@ -1,443 +0,0 @@
- PHP4Delphi library
-PHP - Delphi interface and PHP extensions development framework
-
-{ $Id: readme.txt,v 7.4 2/2019 delphi32 Exp $ }
-
-PHP4Delphi is a Delphi interface to PHP for Delphi 5, 6, 7, Delphi 2005 - Delphi Berlin
-
-PHP4Delphi consists of 3 big subprojects:
-
-1. PHP scripting (using PHP as a scripting language in Delphi applications)
-PHP4Delphi allows to execute the PHP scripts within the Delphi program using
-TpsvPHP component directly without a WebServer.
-It is a PHP extension that enables you to write client-side GUI applications.
-One of the goals behind it was to prove that PHP is a capable general-purpose scripting
-language that is suited for more than just Web applications.
-It is used by "Delphi for PHP" from CodeGear.
-
-2. PHP extensions development framework (using Delphi to extend PHP functionality)
-Visual Development Framework gives possibility to create custom PHP
-Extensions using Delphi.
-PHP extension, in the most basic of terms, is a set of instructions that is
-designed to add functionality to PHP.
-
-3. PHP4Applications (integrate PHP in any application)
-Supports C, C++, Visual Basic, VBA, C#, Delphi, Delphi .NET, Visual Basic .NET etc.
-
-
-More detail information available in php4Delphi manual php4Delphi.pdf
-
-
-This is a source-only release of php4Delphi. It includes
-design-time and run-time packages for Delphi 5 through Delphi Berlin
-
-
-
-History:
-7.4.1 Mar 2019
-
-* Added unicode support
-
-7.4 Feb 2019
-
-* Compatible with PHP 5.5.0
-* Compatible with PHP 5.6.0
-* Compatible with PHP 5.6
-* Compatible with Delphi 2011, XE8, Seattle, Berlin
-* Added Partial Unicode Support
-
-7.3 Jan 2019
-
-* Compatible with PHP 5.4.0
-
-7.2 Oct 2009
-
-* Compatible with Delphi 2010
-* Compatible with PHP 5.2.11
-* Compatible with PHP 5.3.0 (VC6 and VC9 editions : see PHP.INC for more details)
-
-7.1 Oct 2008
-
-* Compatible with Delphi 2009
-
-7.0 Apr 2007
-
-* Compatible with Delphi 2007
-* Compatible with PHP 5.2.1
-* Compatible with PHP 4.4.6
-* Thread safe TpsvPHP component
-* New component TPHPEngine introduced
-* RunCode method reimplemented to solve "black horror" of pipes.
-* Not fully compatible with previous version due to multithreading, but migration is easy.
-
-6.2 Feb 2006
-
-* Compatible with PHP 5.2.0
-* Compatible with Delphi 2006
-* Compatible with PHP 5.1.1
-* Compatible with PHP 5.1.2
-* Code reorganized, some crap was removed
-* Added headers support (Michael Maroszek)
-* New demo projects
-* PHP4Applications revisited
-
-6.1
-
-* Compatible with PHP 5.0.4
-* Compatible with PHP 5.1.0b3
-* Compatible with Delphi 2005
-
-6.0
-
-* Translated Zend II API
-* New PHP Object Model support
-* PHP classes support for PHP4 and PHP5
-* New demo projects
-* TPHPClass component compatible with PHP4 and PHP5
-* Added new property DLLFolder to psvPHP component
-* New component PHPSystemLibrary
-
-5.5 fix 1
-
-* New property RegisterGlobals (boolean) added to psvPHP component
-* New property MaxExecutionTime (integer) added to psvPHP component - Maximum execution time of each script, in seconds
-* New property MaxInputTime (integer) added to psvPHP component - Maximum amount of time each script may spend parsing request data
-* New property SafeMode (boolean) added to psvPHP component
-* New property SafeModeGid (boolean) added to psvPHP component - When safe_mode is on, UID/GID checks are bypassed when
- including files from this directory and its subdirectories. (directory must also be in include_path or full path must
- be used when including)
-* Memory leak fixed in phpModules unit
-* php_class demo project errors fixed
-* psvPHP can load now PHP modules using dl() function
-
-5.5
-
-* New component TPHPClass added (only for PHP 4)
-* Added support of PHP 5
-* Improved speed of unloading of the PHP extensions under Apache
-* Decreased size of the compiled modules (based on API only and developed using Visual FrameWork)
-* ZendAPI unit is splitted to ZendAPI and ZendTypes units
-* PHPAPI unit is splitted to PHPAPI and PHPTypes units
-* New version of php4App - php4Applications subproject.
- php4Applications allows to use php scripts in VB, C, C++, etc applications.
- Demo projects for Delphi, VC and MS Word included.
-* New property UseDelimiters added to TpsvPHP component. If UseDelimiters = true (by default) the
- syntax of RunCode method parameter ACode should include standard script delimiters "" and "?>"
- to make RunCode and Execute method compatible.
-* New parameters for OnScriptError event (error type, file name and line number)
-
-5.4
-
-* Minor bugs fixed
-* Documentation improved
-* New property IniPath (folder where php.ini located) added to TpsvPHP component
-* New functions translated in ZendAPI unit
-
-5.3
-* Added new public property ExecuteMethod to psvPHP component.
- if ExecuteMethod is emGet, psvPHP receives variables as $_GET["variable"],
- if ExecuteMethod is emServer (default), psvPHP receives variables as $variable.
- Can be used to debug real PHP scripts with GET parameters.
-* Added possibility to access published property of Delphi components from PHP
-* Fixed problem with loading of PHP extension compiled wihout PHP4DELPHI_AUTOLOAD
- option.
-
-5.2
-* Added dynamic attachement of all exported functions from php4ts.dll
- in PHPAPI.pas
-* New function for safe dynamic functions linking PHPStubInit and ZendStubInit
- This functions can be used if you are planning to work with beta-version of PHP,
- for example
-* New unit zend_dynamic_array.pas
-* New unit logos.pas
-
-5.0.3
-* Fixed bug when php function without parameters does not return value.
-* New classes: TZendVariable and TZendValue in phpFunctions.pas
-* New subproject: php4App
- Using php4App you can integrate PHP not only with Delphi, but with VB, for example
-
-5.0.2
-* Fixed problem with assembler code in ZENDAPI.pas for Delphi 7
-
-5.0.1
-* Fixed problem with number of parameters of zend_getparameters_ex function
-
-5.0
-* First version written in Delphi
-
-
-1.0 - 4.0
-* php4Delphi was written in C as a DLL with simple Delphi wrapper
-
-
-Before using php4Delphi library:
-
-If you have no PHP installed, you have to download and
-install PHP separately. It is not included in the package.
-You can download the latest version of PHP from
-http://www.php.net/downloads.php
-
-ZEND API documentation available at http://www.zend.com
-PHP API documentation available at http://www.php.net
-
-You need to ensure that the dlls which php uses can be found.
-php4ts.dll is always used. If you are using any php extension dlls then you
-will need those as well.
-To make sure that the dlls can be found, you can either copy them to the
-system directory (e.g. winnt/system32 or windows/system).
-
-Copy the file, php.ini-dist to your %WINDOWS% directory on
-Windows 95/98 or to your %SYSTEMROOT% directory under Windows NT,
-Windows 2000 or Windows XP and rename it to php.ini. Your %WINDOWS% or
-%SYSTEMROOT% directory is typically:
-c:\windows for Windows 95/98
-c:\winnt or c:\winnt40 for NT/2000/XP servers
-
-How to install php4Delphi library:
-
-1. Delphi 5.x:
-
-Uninstall previous installed version of php4Delphi Library from Delphi 5 IDE.
-Remove previously compiled php4Delphi packages from your hard disk.
-
-Select PHP version you are going to use. php4Delphi supports PHP 4.x and PHP 5.x,
-but not at the same time. You have to compile php4Delphi for selected target version of PHP.
-
-Open PHP.INC file.
-If you are using PHP5:
-a) Comment (remove) PHP4 directive {$DEFINE PHP4}
-b) Uncomment (remove dot) directive {$DEFINE PHP5}
-c) Save PHP.INC file
-
-If you are using PHP4:
-a) Comment (remove) PHP5 directive {$DEFINE PHP5}
-b) Uncomment (remove dot) directive {$DEFINE PHP4}
-c) If you are using PHP version 4.2.x...4.3.0 add {$DEFINE PHP430} and remove {$DEFINE PHP433}
- If you are using PHP version 4.3.3...4.3.x add {$DEFINE PHP433} and remove {$DEFINE PHP430}
-d) Save PHP.INC file
-
-Use "File\Open..." menu item of Delphi IDE to open php4Delphi runtime
-package php4DelphiR5.dpk. In "Package..." window click "Compile" button to
-compile packages php4DelphiR5.dpk.
-Put compiled BPL file into directory that is accessible through the search PATH (i.e. DOS
-"PATH" environment variable;
-for example, in the Windows\System directory).
-
-After compiling php4Delphi run-time package you must install design-time
-package into the IDE.
-
-Use "File\Open..." menu item to open design-time package php4DelphiD5.dpk.
-In "Package..." window click "Compile" button to compile the package
-and then click "Install" button to register php4Delphi Library
-components on the component palette.
-
-
-2. Delphi 6.x:
-
-Uninstall previous installed version of php4Delphi Library from Delphi 6 IDE.
-Remove previously compiled php4Delphi packages from your hard disk.
-
-Select PHP version you are going to use. php4Delphi supports PHP 4.x and PHP 5.x,
-but not at the same time. You have to compile php4Delphi for selected target version of PHP.
-
-Open PHP.INC file.
-If you are using PHP5:
-a) Comment (remove) PHP4 directive {$DEFINE PHP4}
-b) Uncomment (remove dot) directive {$DEFINE PHP5}
-c) Save PHP.INC file
-
-If you are using PHP4:
-a) Comment (remove) PHP5 directive {$DEFINE PHP5}
-b) Uncomment (remove dot) directive {$DEFINE PHP4}
-c) If you are using PHP version 4.2.x...4.3.0 add {$DEFINE PHP430} and remove {$DEFINE PHP433}
- If you are using PHP version 4.3.3...4.3.x add {$DEFINE PHP433} and remove {$DEFINE PHP430}
-d) Save PHP.INC file
-
-Use "File\Open..." menu item of Delphi IDE to open php4Delphi runtime
-package php4DelphiR6.dpk. In "Package..." window click "Compile" button to
-compile packages php4DelphiR6.
-Put compiled BPL file into directory that is accessible through the search PATH (i.e. DOS
-"PATH" environment variable;
-for example, in the Windows\System directory).
-
-After compiling php4Delphi run-time package you must install design-time
-package into the IDE.
-
-Use "File\Open..." menu item to open design-time package php4DelphiD6.dpk.
-In "Package..." window click "Compile" button to compile the package
-and then click "Install" button to register php4Delphi Library
-components on the component palette.
-
-3. Delphi 7.x:
-
-Uninstall previous installed version of php4Delphi Library from Delphi 7 IDE.
-Remove previously compiled php4Delphi packages from your hard disk.
-
-Select PHP version you are going to use. php4Delphi supports PHP 4.x and PHP 5.x,
-but not at the same time. You have to compile php4Delphi for selected target version of PHP.
-
-Open PHP.INC file.
-If you are using PHP5:
-a) Comment (remove) PHP4 directive {$DEFINE PHP4}
-b) Uncomment (remove dot) directive {$DEFINE PHP5}
-c) Save PHP.INC file
-
-If you are using PHP4:
-a) Comment (remove) PHP5 directive {$DEFINE PHP5}
-b) Uncomment (remove dot) directive {$DEFINE PHP4}
-c) If you are using PHP version 4.2.x...4.3.0 add {$DEFINE PHP430} and remove {$DEFINE PHP433}
- If you are using PHP version 4.3.3...4.3.x add {$DEFINE PHP433} and remove {$DEFINE PHP430}
-d) Save PHP.INC file
-
-Use "File\Open..." menu item of Delphi IDE to open php4Delphi runtime
-package php4DelphiR7.dpk. In "Package..." window click "Compile" button to
-compile packages php4DelphiR7.dpk.
-Put compiled BPL file into directory that is accessible through the search PATH (i.e. DOS
-"PATH" environment variable;
-for example, in the Windows\System directory).
-
-After compiling php4Delphi run-time package you must install design-time
-package into the IDE.
-
-Use "File\Open..." menu item to open design-time package php4DelphiD7.dpk
-In "Package..." window click "Compile" button to compile the package
-and then click "Install" button to register php4Delphi Library
-components on the component palette.
-
-
-4. Delphi 2005:
-
-Uninstall previous installed version of php4Delphi Library from Delphi 2005 IDE.
-Remove previously compiled php4Delphi packages from your hard disk.
-
-Select PHP version you are going to use. php4Delphi supports PHP 4.x and PHP 5.x,
-but not at the same time. You have to compile php4Delphi for selected target version of PHP.
-
-Open PHP.INC file.
-If you are using PHP5:
-a) Comment (remove) PHP4 directive {$DEFINE PHP4}
-b) Uncomment (remove dot) directive {$DEFINE PHP5}
-c) Save PHP.INC file
-
-If you are using PHP4:
-a) Comment (remove) PHP5 directive {$DEFINE PHP5}
-b) Uncomment (remove dot) directive {$DEFINE PHP4}
-c) If you are using PHP version 4.2.x...4.3.0 add {$DEFINE PHP430} and remove {$DEFINE PHP433}
- If you are using PHP version 4.3.3...4.3.x add {$DEFINE PHP433} and remove {$DEFINE PHP430}
-d) Save PHP.INC file
-
-Use "File\Open..." menu item of Delphi IDE to open php4Delphi runtime
-package php4DelphiR2005.dpk. In "Package..." window click "Compile" button to
-compile packages php4DelphiR2005.dpk.
-Put compiled BPL file into directory that is accessible through the search PATH (i.e. DOS
-"PATH" environment variable;
-for example, in the Windows\System directory).
-
-After compiling php4Delphi run-time package you must install design-time
-package into the IDE.
-
-Use "File\Open..." menu item to open design-time package php4DelphiD2005.dpk
-In "Package..." window click "Compile" button to compile the package
-and then click "Install" button to register php4Delphi Library
-components on the component palette.
-
-
-
-5. Delphi 2006:
-
-Uninstall previous installed version of php4Delphi Library from Delphi 2006 IDE.
-Remove previously compiled php4Delphi packages from your hard disk.
-
-Select PHP version you are going to use. php4Delphi supports PHP 4.x and PHP 5.x,
-but not at the same time. You have to compile php4Delphi for selected target version of PHP.
-
-Open PHP.INC file.
-If you are using PHP5:
-a) Comment (remove) PHP4 directive {$DEFINE PHP4}
-b) Uncomment (remove dot) directive {$DEFINE PHP5}
-c) Save PHP.INC file
-
-If you are using PHP4:
-a) Comment (remove) PHP5 directive {$DEFINE PHP5}
-b) Uncomment (remove dot) directive {$DEFINE PHP4}
-c) If you are using PHP version 4.2.x...4.3.0 add {$DEFINE PHP430} and remove {$DEFINE PHP433}
- If you are using PHP version 4.3.3...4.3.x add {$DEFINE PHP433} and remove {$DEFINE PHP430}
-d) Save PHP.INC file
-
-Use "File\Open..." menu item of Delphi IDE to open php4Delphi runtime
-package php4DelphiR2006.dpk. In "Package..." window click "Compile" button to
-compile packages php4DelphiR2006.dpk.
-Put compiled BPL file into directory that is accessible through the search PATH (i.e. DOS
-"PATH" environment variable;
-for example, in the Windows\System directory).
-
-After compiling php4Delphi run-time package you must install design-time
-package into the IDE.
-
-Use "File\Open..." menu item to open design-time package php4DelphiD2006.dpk
-In "Package..." window click "Compile" button to compile the package
-and then click "Install" button to register php4Delphi Library
-components on the component palette.
-
-
-6. Delphi 2007:
-
-Uninstall previous installed version of php4Delphi Library from Delphi 2007 IDE.
-Remove previously compiled php4Delphi packages from your hard disk.
-
-Select PHP version you are going to use. php4Delphi supports PHP 4.x and PHP 5.x,
-but not at the same time. You have to compile php4Delphi for selected target version of PHP.
-
-Open PHP.INC file.
-If you are using PHP5:
-a) Comment (remove) PHP4 directive {$DEFINE PHP4}
-b) Uncomment (remove dot) directive {$DEFINE PHP5}
-c) Save PHP.INC file
-
-If you are using PHP4:
-a) Comment (remove) PHP5 directive {$DEFINE PHP5}
-b) Uncomment (remove dot) directive {$DEFINE PHP4}
-c) If you are using PHP version 4.2.x...4.3.0 add {$DEFINE PHP430} and remove {$DEFINE PHP433}
- If you are using PHP version 4.3.3...4.3.x add {$DEFINE PHP433} and remove {$DEFINE PHP430}
-d) Save PHP.INC file
-
-Use "File\Open..." menu item of Delphi IDE to open php4Delphi runtime
-package php4DelphiR2007.dpk. In "Package..." window click "Compile" button to
-compile packages php4DelphiR2007.dpk.
-Put compiled BPL file into directory that is accessible through the search PATH (i.e. DOS
-"PATH" environment variable;
-for example, in the Windows\System directory).
-
-After compiling php4Delphi run-time package you must install design-time
-package into the IDE.
-
-Use "File\Open..." menu item to open design-time package php4DelphiD2007.dpk
-In "Package..." window click "Compile" button to compile the package
-and then click "Install" button to register php4Delphi Library
-components on the component palette.
-
-
-Since this is a freeware you are strongly encouraged to look
-at the source code and improve on the components if you want to.
-Of course I would appreciate it if you would send me back the
-changes and bug fixes you have made.
-
-For more information on the PHP Group and the PHP project,
-please see .
-
-
-PHP4Delphi forum
-http://sourceforge.net/forum/forum.php?forum_id=324242
-
-Authors:
-Serhiy Perevoznyk
-Belgium
-serge_perevoznyk@hotmail.com
-http://users.telenet.be/ws36637
-http://delphi32.blogspot.com
-
-Andrew Zenin
-Ukraine
-kashaket@protonmail.com
-
diff --git a/versions.md b/versions.md
new file mode 100644
index 0000000..9af88d4
--- /dev/null
+++ b/versions.md
@@ -0,0 +1,141 @@
+## 7.5-rc1
+* Some of the ZVAL_*Type procedures moved:
+ ZVAL_*Type -> ZVALVAL( z: pzval, what: Type )
+* Major bug fixes (AV, Range Checking, NullPointer, php executing order, etc.)
+* Introduced metatypes, so the types can be used regardless of Delphi version (x64/32, dcc version, other)
+* Replaced assembler calls with pointer math
+* Added procedures: HFunc - hook library function LFunc - load library function
+
+## 7.4 Mar 2019
+
+* Compatible with PHP 5.5.0
+* Compatible with PHP 5.6.0
+* Compatible with PHP 5.6.x
+* Compatible with Delphi 2011, XE8, Seattle, Berlin
+* Added unicode support
+
+## 7.3 Jan 2019
+
+* Compatible with PHP 5.4.0
+* Removed PHP 4 support
+
+## 7.2 Oct 2009
+
+* Compatible with Delphi 2010
+* Compatible with PHP 5.2.11
+* Compatible with PHP 5.3.0 (VC6 and VC9 editions : see PHP.INC for more details)
+
+## 7.1 Oct 2008
+
+* Compatible with Delphi 2009
+
+## 7.0 Apr 2007
+
+* Compatible with Delphi 2007
+* Compatible with PHP 5.2.1
+* Compatible with PHP 4.4.6
+* Thread safe TpsvPHP component
+* New component TPHPEngine introduced
+* RunCode method reimplemented to solve "black horror" of pipes.
+* Not fully compatible with previous version due to multithreading, but migration is easy.
+
+## 6.2 Feb 2006
+
+* Compatible with PHP 5.2.0
+* Compatible with Delphi 2006
+* Compatible with PHP 5.1.1
+* Compatible with PHP 5.1.2
+* Code reorganized, some crap was removed
+* Added headers support (Michael Maroszek)
+* New demo projects
+* PHP4Applications revisited
+
+## 6.1
+
+* Compatible with PHP 5.0.4
+* Compatible with PHP 5.1.0b3
+* Compatible with Delphi 2005
+
+## 6.0
+
+* Translated Zend II API
+* New PHP Object Model support
+* PHP classes support for PHP4 and PHP5
+* New demo projects
+* TPHPClass component compatible with PHP4 and PHP5
+* Added new property DLLFolder to psvPHP component
+* New component PHPSystemLibrary
+
+## 5.5 fix 1
+
+* New property RegisterGlobals (boolean) added to psvPHP component
+* New property MaxExecutionTime (integer) added to psvPHP component - Maximum execution time of each script, in seconds
+* New property MaxInputTime (integer) added to psvPHP component - Maximum amount of time each script may spend parsing request data
+* New property SafeMode (boolean) added to psvPHP component
+* New property SafeModeGid (boolean) added to psvPHP component - When safe_mode is on, UID/GID checks are bypassed when
+ including files from this directory and its subdirectories. (directory must also be in include_path or full path must
+ be used when including)
+* Memory leak fixed in phpModules unit
+* php_class demo project errors fixed
+* psvPHP can load now PHP modules using dl() function
+
+## 5.5
+
+* New component TPHPClass added (only for PHP 4)
+* Added support of PHP 5
+* Improved speed of unloading of the PHP extensions under Apache
+* Decreased size of the compiled modules (based on API only and developed using Visual FrameWork)
+* ZendAPI unit is splitted to ZendAPI and ZendTypes units
+* PHPAPI unit is splitted to PHPAPI and PHPTypes units
+* New version of php4App - php4Applications subproject.
+ php4Applications allows to use php scripts in VB, C, C++, etc applications.
+ Demo projects for Delphi, VC and MS Word included.
+* New property UseDelimiters added to TpsvPHP component. If UseDelimiters = true (by default) the
+ syntax of RunCode method parameter ACode should include standard script delimiters "" and "?>"
+ to make RunCode and Execute method compatible.
+* New parameters for OnScriptError event (error type, file name and line number)
+
+## 5.4
+
+* Minor bugs fixed
+* Documentation improved
+* New property IniPath (folder where php.ini located) added to TpsvPHP component
+* New functions translated in ZendAPI unit
+
+## 5.3
+* Added new public property ExecuteMethod to psvPHP component.
+ if ExecuteMethod is emGet, psvPHP receives variables as $_GET["variable"],
+ if ExecuteMethod is emServer (default), psvPHP receives variables as $variable.
+ Can be used to debug real PHP scripts with GET parameters.
+* Added possibility to access published property of Delphi components from PHP
+* Fixed problem with loading of PHP extension compiled wihout PHP4DELPHI_AUTOLOAD
+ option.
+
+## 5.2
+* Added dynamic attachement of all exported functions from php4ts.dll
+ in PHPAPI.pas
+* New function for safe dynamic functions linking PHPStubInit and ZendStubInit
+ This functions can be used if you are planning to work with beta-version of PHP,
+ for example
+* New unit zend_dynamic_array.pas
+* New unit logos.pas
+
+## 5.0.3
+* Fixed bug when php function without parameters does not return value.
+* New classes: TZendVariable and TZendValue in phpFunctions.pas
+* New subproject: php4App
+ Using php4App you can integrate PHP not only with Delphi, but with VB, for example
+
+## 5.0.2
+* Fixed problem with assembler code in ZENDAPI.pas for Delphi 7
+
+## 5.0.1
+* Fixed problem with number of parameters of zend_getparameters_ex function
+
+## 5.0
+* First version written in Delphi
+
+
+## 1.0 - 4.0
+* php4Delphi was written in C as a DLL with simple Delphi wrapper
+