-
Notifications
You must be signed in to change notification settings - Fork 16
/
ZENDAPI.pas
2062 lines (1525 loc) · 89.1 KB
/
ZENDAPI.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{*******************************************************}
{ PHP4Delphi }
{ ZEND - Delphi interface }
{ }
{ Author: }
{ Serhiy Perevoznyk }
{ serge_perevoznyk@hotmail.com }
{ http://users.chello.be/ws36637 }
{*******************************************************}
{$I PHP.INC}
{ $Id: ZENDAPI.pas,v 6.2 02/2006 delphi32 Exp $ }
unit zendAPI;
interface
uses
Windows, SysUtils, ZendTypes;
type
EPHP4DelphiException = class(Exception)
constructor Create(const Msg: string);
end;
align_test = record
case Integer of
1: (ptr: Pointer; );
2: (dbl: Double; );
3: (lng: Longint; );
end;
const
PLATFORM_ALIGNMENT = (SizeOf(align_test));
{$IFDEF PHP5}
function LoadZEND(const DllFilename: string = 'php5ts.dll') : boolean;
{$ELSE}
function LoadZEND(const DllFilename: string = 'php4ts.dll') : boolean;
{$ENDIF}
procedure UnloadZEND;
function ZENDLoaded: boolean;
{Memory management functions}
var
zend_strndup : function(s: PChar; length: Integer): PChar; cdecl;
_emalloc : function(size: size_t; __zend_filename: PChar; __zend_lineno: uint; __zend_orig_filename: PChar; __zend_orig_line_no: uint): pointer; cdecl;
_efree : procedure(ptr: pointer; __zend_filename: PChar; __zend_lineno: uint; __zend_orig_filename: PChar; __zend_orig_line_no: uint); cdecl;
_ecalloc : function(nmemb: size_t; size: size_t; __zend_filename: PChar; __zend_lineno: uint; __zend_orig_filename: PChar; __zend_orig_line_no: uint): pointer; cdecl;
_erealloc : function(ptr: pointer; size: size_t; allow_failure: integer; __zend_filename: PChar; __zend_lineno: uint; __zend_orig_filename: PChar; __zend_orig_line_no: uint): pointer; cdecl;
_estrdup : function(const s: PChar; __zend_filename: PChar; __zend_lineno: uint; __zend_orig_filename: PChar; __zend_orig_line_no: uint): pointer; cdecl;
_estrndup : function(s: PChar; Len: Cardinal; __zend_filename: PChar; __zend_lineno: uint; __zend_orig_filename: PChar; __zend_orig_line_no: uint): PChar; cdecl;
function emalloc(size: size_t): pointer;
procedure efree(ptr: pointer);
function ecalloc(nmemb: size_t; size: size_t): pointer;
function erealloc(ptr: pointer; size: size_t; allow_failure: integer): pointer;
function estrdup(const s: PChar): PChar;
function estrndup(s: PChar; len: Cardinal): PChar;
function STR_EMPTY_ALLOC : PChar;
var
zend_set_memory_limit : function(memory_limit: uint): integer; cdecl;
start_memory_manager : procedure(TSRMLS_D: pointer); cdecl;
shutdown_memory_manager : procedure(silent: integer; clean_cache: integer; TSRMLS_DC: pointer); cdecl;
{ startup/shutdown }
var
zend_register_resource : function (rsrc_result : pzval; rsrc_pointer : pointer; rsrc_type : integer) : integer; cdecl;
zend_fetch_resource : function (passed_id : ppzval; TSRMLS_DC : pointer; default_id : integer; resource_type_name : PChar; found_resource_type : pointer; num_resource_types: integer; resource_type: integer) : pointer; cdecl;
zend_list_insert : function (ptr : pointer; _type: integer) : integer; cdecl;
_zend_list_addref : function (id : integer; TSRMLS_DC : pointer) : integer; cdecl;
_zend_list_delete : function (id : integer; TSRMLS_DC : pointer) : integer; cdecl;
_zend_list_find : function (id : integer; _type : pointer; TSRMLS_DC : pointer) : pointer; cdecl;
zend_rsrc_list_get_rsrc_type : function (resource: integer; TSRMLS_DC : pointer) : PChar; cdecl;
zend_fetch_list_dtor_id : function (type_name : PChar) : integer; cdecl;
zend_register_list_destructors_ex : function (ld : pointer; pld : pointer; type_name : pChar; module_number : integer) : integer; cdecl;
{disable functions}
var
zend_disable_function : function(function_name : pchar; function_name_length : uint; TSRMLS_DC : pointer) : integer; cdecl;
zend_disable_class : function(class_name : pchar; class_name_length : uint; TSRMLS_DC : pointer) : integer; cdecl;
zend_hash_add_or_update : function(ht: PHashTable; arKey: PChar;
nKeyLength: uint; pData: Pointer; nDataSize: uint; pDest: Pointer;
flag: Integer): 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: 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;
{$ENDIF}
zend_hash_destroy : procedure(ht: PHashTable); cdecl;
zend_hash_clean : procedure(ht: PHashTable); cdecl;
{ additions/updates/changes }
zend_hash_add_empty_element : function(ht: PHashTable; arKey: PChar;
nKeyLength: uint): Integer; cdecl;
var
zend_hash_graceful_destroy : procedure(ht: PHashTable); cdecl;
zend_hash_graceful_reverse_destroy : zend_hash_graceful_reverse_destroy_t;
zend_hash_apply : procedure(ht: PHashTable; apply_func: pointer; TSRMLS_DC: Pointer); cdecl;
zend_hash_apply_with_argument : procedure(ht: PHashTable;
apply_func: pointer; _noname1: Pointer; TSRMLS_DC: Pointer); cdecl;
{ This function should be used with special care (in other words,
* it should usually not be used). When used with the ZEND_HASH_APPLY_STOP
* return value, it assumes things about the order of the elements in the hash.
* Also, it does not provide the same kind of reentrancy protection that
* the standard apply functions do.
}
zend_hash_reverse_apply : procedure(ht: PHashTable;
apply_func: pointer; TSRMLS_DC: Pointer); cdecl;
{ Deletes }
zend_hash_del_key_or_index : function(ht: PHashTable; arKey: PChar;
nKeyLength: uint; h: ulong; flag: Integer): Integer; cdecl;
zend_get_hash_value : function(ht: PHashTable; arKey: PChar;
nKeyLength: uint): Longint; cdecl;
{ Data retreival }
zend_hash_find : function(ht: PHashTable; arKey: PChar; nKeyLength: uint;
pData: Pointer): Integer; cdecl;
zend_hash_quick_find : function(ht: PHashTable; arKey: PChar;
nKeyLength: uint; h: ulong; pData: Pointer): Integer; cdecl;
zend_hash_index_find : function(ht: PHashTable; h: ulong; pData: Pointer): Integer; cdecl;
{ Misc }
zend_hash_exists : function(ht: PHashTable; arKey: 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;
{ traversing }
zend_hash_move_forward_ex : function(ht: PHashTable; pos: HashPosition): Integer; cdecl;
zend_hash_move_backwards_ex : function(ht: PHashTable; pos: HashPosition): Integer; cdecl;
zend_hash_get_current_key_ex : function(ht: PHashTable;
var str_index: 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_data_ex : function(ht: PHashTable; pData: Pointer; pos: HashPosition): Integer; cdecl;
zend_hash_internal_pointer_reset_ex : procedure(ht: PHashTable; pos: HashPosition); cdecl;
zend_hash_internal_pointer_end_ex : procedure(ht: PHashTable; pos: HashPosition); cdecl;
{ Copying, merging and sorting }
zend_hash_copy : procedure(target: PHashTable; source: PHashTable;
pCopyConstructor: pointer; tmp: Pointer; size: uint); cdecl;
zend_hash_sort : function(ht: PHashTable; sort_func: pointer;
compare_func: pointer; renumber: Integer; TSRMLS_DC: Pointer): Integer; cdecl;
zend_hash_compare : function(ht1: PHashTable; ht2: PHashTable;
compar: pointer; ordered: boolean; TSRMLS_DC: Pointer): Integer; cdecl;
zend_hash_minmax : function(ht: PHashTable; 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;
zend_hash_func : function(arKey: 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;
var
zend_get_constant : function(name: PChar; name_len: uint; var result: zval;
TSRMLS_DC: Pointer): Integer; cdecl;
zend_register_long_constant : procedure(name: PChar; name_len: uint;
lval: Longint; flags: Integer; module_number: Integer; TSRMLS_DC: Pointer); cdecl;
zend_register_double_constant : procedure(name: PChar; name_len: uint; dval: Double; flags: Integer; module_number: Integer;
TSRMLS_DC: Pointer); cdecl;
zend_register_string_constant : procedure(name: PChar; name_len: uint; strval: PChar; flags: Integer; module_number: Integer;
TSRMLS_DC: Pointer); cdecl;
zend_register_stringl_constant : procedure(name: PChar; name_len: uint;
strval: 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;
procedure REGISTER_MAIN_LONG_CONSTANT(name: PChar; lval: longint; flags: integer; TSRMLS_DC: Pointer);
procedure REGISTER_MAIN_DOUBLE_CONSTANT(name: PChar; dval: double; flags: integer; TSRMLS_DC: Pointer);
procedure REGISTER_MAIN_STRING_CONSTANT(name: PChar; str: PChar; flags: integer; TSRMLS_DC: Pointer);
procedure REGISTER_MAIN_STRINGL_CONSTANT(name: PChar; str: PChar; len: uint; flags: integer; TSRMLS_DC: Pointer);
var
tsrm_startup : function(expected_threads: integer;
expected_resources: integer; debug_level: integer; debug_filename: pchar): integer; cdecl;
ts_allocate_id : function(rsrc_id: pts_rsrc_id; size: size_t; ctor: pointer; dtor: pointer): ts_rsrc_id; cdecl;
// deallocates all occurrences of a given id
ts_free_id : procedure(id: ts_rsrc_id); 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: PChar); cdecl;
zend_error_cb : procedure; cdecl;
zend_eval_string : function(str: pchar; val: pointer; strname: pchar; tsrm: pointer): integer; cdecl;
zend_make_compiled_string_description : function(a: Pchar; tsrm: pointer): PChar; cdecl;
_zval_dtor : procedure(val: pzval; __zend_filename: PChar; __zend_lineno: uint); cdecl;
_zval_copy_ctor : function(val: pzval; __zend_filename: PChar; __zend_lineno: uint): integer; cdecl;
zend_print_variable : function(val: pzval): integer; cdecl;
zend_get_compiled_filename : function(TSRMLS_DC: Pointer): PChar; cdecl;
zend_get_compiled_lineno : function(TSRMLS_DC: Pointer): integer; cdecl;
function zval_copy_ctor(val : pzval) : integer;
function ts_resource(id : integer) : pointer;
procedure zenderror(Error : PChar);
var
zend_stack_init : function(stack: Pzend_stack): Integer; cdecl;
zend_stack_push : function(stack: Pzend_stack; element: Pointer; size: Integer): Integer; cdecl;
zend_stack_top : function(stack: Pzend_stack; element: Pointer): Integer; cdecl;
zend_stack_del_top : function(stack: Pzend_stack): Integer; cdecl;
zend_stack_int_top : function(stack: Pzend_stack): Integer; cdecl;
zend_stack_is_empty : function(stack: Pzend_stack): Integer; cdecl;
zend_stack_destroy : function(stack: Pzend_stack): Integer; cdecl;
zend_stack_base : function(stack: Pzend_stack): Pointer; cdecl;
zend_stack_count : function(stack: Pzend_stack): Integer; cdecl;
zend_stack_apply : procedure(stack: Pzend_stack; _type: Integer; apply_function: Integer); cdecl;
zend_stack_apply_with_argument : procedure(stack: Pzend_stack; _type: Integer; apply_function: Integer; arg: Pointer); cdecl;
//zend_operators.h
var
_convert_to_string : procedure(op: pzval; __zend_filename: PChar; __zend_lineno: uint); cdecl;
procedure convert_to_string(op: pzval);
var
add_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
sub_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
mul_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
div_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
mod_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
boolean_xor_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
boolean_not_function : function(_result: Pzval; op1: Pzval): Integer; cdecl;
bitwise_not_function : function(_result: Pzval; op1: Pzval): Integer; cdecl;
bitwise_or_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
bitwise_and_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
bitwise_xor_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
shift_left_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
shift_right_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
concat_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
is_equal_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
is_identical_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
is_not_identical_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
is_not_equal_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
is_smaller_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
is_smaller_or_equal_function : function(_result: Pzval; op1: Pzval; var op2: zval; TSRMLS_DC: Pointer): Integer; cdecl;
increment_function : function(op1: Pzval): Integer; cdecl;
decrement_function : function(op2: Pzval): Integer; cdecl;
convert_scalar_to_number : procedure(op: Pzval; TSRMLS_DC: Pointer); cdecl;
convert_to_long : procedure(op: Pzval); cdecl;
convert_to_double : procedure(op: Pzval); cdecl;
convert_to_long_base : procedure(op: Pzval; base: Integer); 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;
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;
zend_string_to_double : function(number: PChar; length: zend_uint): Double; cdecl;
zval_is_true : function(op: Pzval): Integer; cdecl;
compare_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
numeric_compare_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
string_compare_function : function(_result: Pzval; op1: Pzval; op2: Pzval; TSRMLS_DC: Pointer): Integer; cdecl;
zend_str_tolower : procedure(str: PChar; length: Integer); cdecl;
zend_binary_zval_strcmp : function(s1: Pzval; s2: Pzval): Integer; cdecl;
zend_binary_zval_strncmp : function(s1: Pzval; s2: Pzval; s3: Pzval): Integer; cdecl;
zend_binary_zval_strcasecmp : function(s1: Pzval; s2: Pzval): Integer; cdecl;
zend_binary_zval_strncasecmp : function(s1: Pzval; s2: Pzval; s3: Pzval): Integer; cdecl;
zend_binary_strcmp : function(s1: PChar; len1: uint; s2: PChar; len2: uint): Integer; cdecl;
zend_binary_strncmp : function(s1: PChar; len1: uint; s2: PChar; len2: uint; length: uint): Integer; cdecl;
zend_binary_strcasecmp : function(s1: PChar; len1: uint; s2: PChar; len2: uint): Integer; cdecl;
zend_binary_strncasecmp : function(s1: PChar; len1: uint; s2: PChar; len2: uint; length: uint): Integer; cdecl;
zendi_smart_strcmp : procedure(_result: zval; s1: Pzval; s2: Pzval); cdecl;
zend_compare_symbol_tables : procedure(_result: Pzval; ht1: PHashTable; ht2: PHashTable; TSRMLS_DC: Pointer); cdecl;
zend_compare_arrays : procedure(_result: zval; a1: Pzval; a2: Pzval; TSRMLS_DC: Pointer); cdecl;
zend_compare_objects : procedure(_result: Pzval; o1: Pzval; o2: Pzval; TSRMLS_DC: Pointer); cdecl;
zend_atoi : function(str: PChar; str_len: Integer): Integer; cdecl;
//zend_execute.h
get_active_function_name : function(TSRMLS_D: pointer): PChar; cdecl;
zend_get_executed_filename : function(TSRMLS_D: pointer): PChar; cdecl;
zend_set_timeout : procedure(seconds: Longint); cdecl;
zend_unset_timeout : procedure(TSRMLS_D: pointer); cdecl;
zend_timeout : procedure(dummy: Integer); cdecl;
var
zend_highlight : procedure(syntax_highlighter_ini: Pzend_syntax_highlighter_ini; TSRMLS_DC: Pointer); cdecl;
zend_strip : procedure(TSRMLS_D: pointer); cdecl;
highlight_file : function(filename: PChar; syntax_highlighter_ini: Pzend_syntax_highlighter_ini; TSRMLS_DC: Pointer): Integer; cdecl;
highlight_string : function(str: Pzval; syntax_highlighter_ini: Pzend_syntax_highlighter_ini; str_name: PChar; TSRMLS_DC: Pointer): Integer; cdecl;
zend_html_putc : procedure(c: Char); cdecl;
zend_html_puts : procedure(s: PChar; len: uint; TSRMLS_DC: Pointer); cdecl;
zend_indent : procedure; cdecl;
ZendGetParameters : function: integer; cdecl;
function zend_get_parameters_ex(number: integer; var Params: pzval_array): integer;
function zend_get_parameters(ht: integer; param_count: integer; Params: array of ppzval): integer;
var
_zend_get_parameters_array_ex : function(param_count: integer; argument_array: pppointer; TSRMLS_CC: pointer): integer; cdecl;
procedure dispose_pzval_array(Params: pzval_array);
var
zend_ini_refresh_caches : procedure(stage: Integer; TSRMLS_DC: Pointer); cdecl;
var
_zend_bailout : procedure (filename : PChar; lineno : uint); cdecl;
zend_alter_ini_entry : function(name: PChar; name_length: uint; new_value: PChar; new_value_length: uint; modify_type: Integer; stage: Integer): Integer; cdecl;
zend_restore_ini_entry : function(name: PChar; name_length: uint; stage: Integer): Integer; cdecl;
zend_ini_long : function(name: PChar; name_length: uint; orig: Integer): Longint; cdecl;
zend_ini_double : function(name: PChar; name_length: uint; orig: Integer): Double; cdecl;
zend_ini_string : function(name: PChar; name_length: uint; orig: Integer): PChar; cdecl;
compile_string : function(source_string: pzval; filename: PChar; TSRMLS_DC: Pointer): pointer; cdecl;
execute : procedure(op_array: pointer; TSRMLS_DC: Pointer); cdecl;
zend_wrong_param_count : procedure(TSRMLS_D: pointer); cdecl;
{$IFDEF PHP4}
add_property_long_ex : function(arg: pzval; key: PChar; key_len: uint; l: longint): integer; cdecl;
{$ELSE}
add_property_long_ex : function(arg: pzval; key: PChar; key_len: uint; l: longint; TSRMLS_DC : pointer): integer; cdecl;
{$ENDIF}
{$IFDEF PHP4}
add_property_null_ex : function(arg: pzval; key: PChar; key_len: uint): integer; cdecl;
add_property_bool_ex : function(arg: pzval; key: PChar; key_len: uint; b: integer): integer; cdecl;
add_property_resource_ex : function(arg: pzval; key: PChar; key_len: uint; r: integer): integer; cdecl;
add_property_double_ex : function(arg: pzval; key: PChar; key_len: uint; d: double): integer; cdecl;
add_property_string_ex : function(arg: pzval; key: PChar; key_len: uint; str: PChar; duplicate: integer): integer; cdecl;
add_property_stringl_ex : function(arg: pzval; key: PChar; key_len: uint; str: PChar; len: uint; duplicate: integer): integer; cdecl;
add_property_zval_ex : function(arg: pzval; key: PChar; key_len: uint; value: pzval): integer; cdecl;
{$ELSE}
add_property_null_ex : function(arg: pzval; key: PChar; key_len: uint; TSRMLS_DC: Pointer): integer; cdecl;
add_property_bool_ex : function(arg: pzval; key: PChar; key_len: uint; b: integer; TSRMLS_DC: Pointer): integer; cdecl;
add_property_resource_ex : function(arg: pzval; key: PChar; key_len: uint; r: integer; TSRMLS_DC: Pointer): integer; cdecl;
add_property_double_ex : function(arg: pzval; key: PChar; key_len: uint; d: double; TSRMLS_DC: Pointer): integer; cdecl;
add_property_string_ex : function(arg: pzval; key: PChar; key_len: uint; str: PChar; duplicate: integer; TSRMLS_DC: Pointer): integer; cdecl;
add_property_stringl_ex : function(arg: pzval; key: PChar; key_len: uint; str: PChar; len: uint; duplicate: integer; TSRMLS_DC: Pointer): integer; cdecl;
add_property_zval_ex : function(arg: pzval; key: PChar; key_len: uint; value: pzval; TSRMLS_DC: Pointer): integer; cdecl;
{$ENDIF}
add_assoc_long_ex : function(arg: pzval; key: PChar; key_len: uint; n: longint): integer; cdecl;
add_assoc_null_ex : function(arg: pzval; key: PChar; key_len: uint): integer; cdecl;
add_assoc_bool_ex : function(arg: pzval; key: PChar; key_len: uint; b: integer): integer; cdecl;
add_assoc_resource_ex : function(arg: pzval; key: PChar; key_len: uint; r: integer): integer; cdecl;
add_assoc_double_ex : function(arg: pzval; key: PChar; key_len: uint; d: double): integer; cdecl;
add_assoc_string_ex : function(arg: pzval; key: PChar; key_len: uint; str: PChar; duplicate: integer): integer; cdecl;
add_assoc_stringl_ex : function(arg: pzval; key: PChar; key_len: uint; str: PChar; len: uint; duplicate: integer): integer; cdecl;
add_assoc_zval_ex : function(arg: pzval; key: PChar; key_len: uint; value: pzval): integer; cdecl;
add_index_long : function(arg: pzval; idx: uint; n: longint): integer; cdecl;
add_index_null : function(arg: pzval; idx: uint): integer; cdecl;
add_index_bool : function(arg: pzval; idx: uint; b: integer): integer; cdecl;
add_index_resource : function(arg: pzval; idx: uint; r: integer): integer; cdecl;
add_index_double : function(arg: pzval; idx: uint; d: double): integer; cdecl;
add_index_string : function(arg: pzval; idx: uint; str: PChar; duplicate: integer): integer; cdecl;
add_index_stringl : function(arg: pzval; idx: uint; str: PChar; len: uint; duplicate: integer): integer; cdecl;
add_index_zval : function(arg: pzval; index: uint; value: pzval): integer; cdecl;
add_next_index_long : function(arg: pzval; n: longint): integer; cdecl;
add_next_index_null : function(arg: pzval): integer; cdecl;
add_next_index_bool : function(arg: pzval; b: integer): integer; cdecl;
add_next_index_resource : function(arg: pzval; r: integer): integer; cdecl;
add_next_index_double : function(arg: pzval; d: double): integer; cdecl;
add_next_index_string : function(arg: pzval; str: PChar; duplicate: integer): integer; cdecl;
add_next_index_stringl : function(arg: pzval; str: PChar; len: uint; duplicate: integer): integer; cdecl;
add_next_index_zval : function(arg: pzval; value: pzval): integer; cdecl;
add_get_assoc_string_ex : function(arg: pzval; key: PChar; key_len: uint; str: PChar; dest: pointer; duplicate: integer): integer; cdecl;
add_get_assoc_stringl_ex : function(arg: pzval; key: PChar; key_len: uint; str: PChar; len: uint; dest: pointer; duplicate: integer): integer; cdecl;
add_get_index_long : function(arg: pzval; idx: uint; l: longint; dest: pointer): integer; cdecl;
add_get_index_double : function(arg: pzval; idx: uint; d: double; dest: pointer): integer; cdecl;
add_get_index_string : function(arg: pzval; idx: uint; str: PChar; dest: pointer; duplicate: integer): integer; cdecl;
add_get_index_stringl : function(arg: pzval; idx: uint; str: PChar; len: uint; dest: pointer; duplicate: integer): integer; cdecl;
_array_init : function(arg: pzval; __zend_filename: pchar; __zend_lineno: uint): integer; cdecl;
{$IFDEF PHP4}
_object_init : function(arg: pzval; __zend_filename: 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: 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: pchar; __zend_lineno: uint; TSRMLS_DC: pointer): integer; cdecl;
{$IFDEF PHP5}
zend_destroy_file_handle : procedure(file_handle : PZendFileHandle; TSRMLS_DC : pointer); cdecl;
{$ENDIF}
var
zend_write : zend_write_t;
procedure ZEND_PUTS(str: PChar);
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: Pchar; TSRMLS_DC: pointer): Pzend_class_entry; cdecl;
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_STRING(z: pzval; s: pchar; duplicate: boolean);
procedure ZVAL_STRINGL(z: pzval; s: pchar; l: integer; duplicate: boolean);
procedure ZVAL_EMPTY_STRING(z: pzval);
procedure ZVAL_TRUE(z: pzval);
procedure ZVAL_FALSE(z: pzval);
procedure INIT_CLASS_ENTRY(var class_container: Tzend_class_entry; class_name: pchar; functions: pointer);
var
get_zend_version : function(): PChar; cdecl;
zend_make_printable_zval : procedure(expr: pzval; expr_copy: pzval; use_copy: pint); cdecl;
zend_print_zval : function(expr: pzval; indent: integer): integer; cdecl;
zend_print_zval_r : procedure(expr: pzval; indent: integer); cdecl;
zend_output_debug_string : procedure(trigger_break: boolean; Msg: PChar); cdecl;
{$IFDEF PHP5}
zend_objects_new : function (_object : pointer; class_type : pointer; TSRMLS_DC : pointer) : _zend_object_value; cdecl;
{$ENDIF}
//Microsoft C++ functions
function setjmp(buf : jump_buf) : integer; cdecl; external 'msvcrt.dll' name '_setjmp3';
function pipe(phandles : pointer; psize : uint; textmode : integer) : integer; cdecl; external 'msvcrt.dll' name '_pipe';
procedure close(AHandle : THandle); cdecl; external 'msvcrt.dll' name '_close';
function _write(AHandle : integer; ABuffer : pointer; count : uint) : integer; cdecl; external 'msvcrt.dll' name '_write';
function ZEND_FAST_ALLOC: pzval;
function ALLOC_ZVAL: pzval;
procedure INIT_PZVAL(p: pzval);
function MAKE_STD_ZVAL: pzval;
{$IFNDEF QUIET_LOAD}
procedure CheckZendErrors;
{$ENDIF}
var
PHPLib : THandle = 0;
var
zend_ini_deactivate : function(TSRMLS_D : pointer) : integer; cdecl;
function GetGlobalResource(resource_name: string; TSRMLS_DC : pointer) : pointer;
function GetCompilerGlobals(TSRMLS_DC : pointer) : Pzend_compiler_globals;
function GetExecutorGlobals(TSRMLS_DC : pointer) : pzend_executor_globals;
function GetAllocGlobals(TSRMLS_DC : pointer) : 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;
{$IFDEF PHP5}
var
zend_get_std_object_handlers : function() : pzend_object_handlers;
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 : zval) : longint;
function Z_BVAL(z : zval) : boolean;
function Z_DVAL(z : zval) : double;
function Z_STRVAL(z : zval) : string;
function Z_STRLEN(z : zval) : longint;
function Z_ARRVAL(z : zval ) : PHashTable;
function Z_OBJ_HANDLE(z :zval) : zend_object_handle;
function Z_OBJ_HT(z : zval) : pzend_object_handlers;
function Z_OBJPROP(z : zval) : PHashtable;
{$ENDIF}
implementation
function STR_EMPTY_ALLOC : PChar;
begin
Result := estrndup('', 0);
end;
function estrndup(s: PChar; len: Cardinal): PChar;
begin
if assigned(s) then
Result := _estrndup(s, len, nil, 0, nil, 0)
else
Result := nil;
end;
function emalloc(size: size_t): pointer;
begin
Result := _emalloc(size, nil, 0, nil, 0);
end;
procedure efree(ptr: pointer);
begin
_efree(ptr, nil, 0, nil, 0);
end;
function ecalloc(nmemb: size_t; size: size_t): pointer;
begin
Result := _ecalloc(nmemb, size, nil, 0, nil, 0);
end;
function erealloc(ptr: pointer; size: size_t; allow_failure: integer): pointer;
begin
Result := _erealloc(ptr, size, allow_failure, nil, 0, nil, 0);
end;
function estrdup(const s: PChar): PChar;
begin
if assigned(s) then
Result := _estrdup(s, nil, 0, nil, 0)
else
Result := nil;
end;
procedure REGISTER_MAIN_LONG_CONSTANT(name: PChar; lval: longint; flags: integer; TSRMLS_DC: Pointer);
begin
zend_register_long_constant(name, length(name) + 1, lval, flags, 0, TSRMLS_DC);
end;
procedure REGISTER_MAIN_DOUBLE_CONSTANT(name: PChar; dval: double; flags: integer; TSRMLS_DC: Pointer);
begin
zend_register_double_constant(name, length(name) + 1, dval, flags, 0, TSRMLS_DC);
end;
procedure REGISTER_MAIN_STRING_CONSTANT(name: PChar; str: PChar; flags: integer; TSRMLS_DC: Pointer);
begin
zend_register_string_constant(name, length(name) + 1, str, flags, 0, TSRMLS_DC);
end;
procedure REGISTER_MAIN_STRINGL_CONSTANT(name: PChar; str: PChar; len: uint; flags: integer; TSRMLS_DC: Pointer);
begin
zend_register_stringl_constant(name, length(name) + 1, str, len, flags, 0, TSRMLS_DC);
end;
procedure ZVAL_RESOURCE(value: pzval; l: longint);
begin
value^._type := 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;
end;
procedure ZVAL_DOUBLE(z: pzval; d: double);
begin
z^._type := IS_DOUBLE;
z^.value.dval := d;
end;
procedure ZVAL_STRING(z: pzval; s: pchar; duplicate: boolean);
var
__s : pchar;
begin
if not assigned(s) then
__s := ''
else
__s := s;
z^.value.str.len := strlen(__s);
if duplicate then
z^.value.str.val := estrndup(__s, z^.value.str.len)
else
z^.value.str.val := __s;
z^._type := IS_STRING;
end;
procedure ZVAL_STRINGL(z: pzval; s: pchar; l: integer; duplicate: boolean);
var
__s : pchar;
__l : integer;
begin
if not assigned(s) then
__s := ''
else
__s := s;
__l := l;
z^.value.str.len := __l;
if duplicate then
z^.value.str.val := estrndup(__s, __l)
else
z^.value.str.val := __s;
z^._type := 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;
end;
procedure ZVAL_TRUE(z: pzval);
begin
z^._type := IS_BOOL;
z^.value.lval := 1;
end;
procedure ZVAL_FALSE(z: pzval);
begin
z^._type := IS_BOOL;
z^.value.lval := 0;
end;
function ZENDLoaded: boolean;
begin
Result := PHPLib <> 0;
end;
procedure UnloadZEND;
var
H : THandle;
begin
H := InterlockedExchange(Integer(PHPLib), 0);
if H > 0 then
begin
FreeLibrary(H);
end;
end;
function LoadZEND(const DllFilename: string) : boolean;
var
WriteFuncPtr : pointer;
begin
Result := false;
PHPLib := LoadLibrary(PChar(DllFileName));
{$IFNDEF QUIET_LOAD}
if PHPLib = 0 then raise Exception.CreateFmt('%s not found', [DllFileName]);
{$ELSE}
if PHPLib = 0 then Exit;
{$ENDIF}
{$IFDEF PHP5}
zend_objects_new := GetProcAddress(PHPLib, 'zend_objects_new');
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');
{$ENDIF}
_zend_bailout := GetProcAddress(PHPLib, '_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');
_zend_list_addref := GetProcAddress(PHPLib, '_zend_list_addref');
_zend_list_delete := GetProcAddress(PHPLib, '_zend_list_delete');
_zend_list_find := GetProcAddress(PHPLib, '_zend_list_find');
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');
zend_get_compiled_filename := GetProcAddress(PHPLib, 'zend_get_compiled_filename');
zend_get_compiled_lineno := GetProcAddress(PHPLib, 'zend_get_compiled_lineno');
zend_ini_deactivate := GetProcAddress(PHPLib, 'zend_ini_deactivate');
// -- tsrm_startup
tsrm_startup := GetProcAddress(PHPLib, 'tsrm_startup');
// -- ts_allocate_id
ts_allocate_id := GetProcAddress(PHPLib, 'ts_allocate_id');
// -- ts_free_id
ts_free_id := GetProcAddress(PHPLib, 'ts_free_id');
// -- zend_strndup
zend_strndup := GetProcAddress(PHPLib, 'zend_strndup');
// -- _emalloc
_emalloc := GetProcAddress(PHPLib, '_emalloc');
// -- _efree
_efree := GetProcAddress(PHPLib, '_efree');
// -- _ecalloc
_ecalloc := GetProcAddress(PHPLib, '_ecalloc');
// -- _erealloc
_erealloc := GetProcAddress(PHPLib, '_erealloc');
// -- _estrdup
_estrdup := GetProcAddress(PHPLib, '_estrdup');
// -- _estrndup
_estrndup := GetProcAddress(PHPLib, '_estrndup');
// -- zend_set_memory_limit
zend_set_memory_limit := GetProcAddress(PHPLib, 'zend_set_memory_limit');
// -- start_memory_manager
start_memory_manager := GetProcAddress(PHPLib, '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');
// -- 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');
{$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}
// -- zend_hash_destroy
zend_hash_destroy := GetProcAddress(PHPLib, 'zend_hash_destroy');
// -- zend_hash_clean
zend_hash_clean := GetProcAddress(PHPLib, 'zend_hash_clean');
// -- zend_hash_add_empty_element
zend_hash_add_empty_element := GetProcAddress(PHPLib, 'zend_hash_add_empty_element');
// -- zend_hash_graceful_destroy
zend_hash_graceful_destroy := GetProcAddress(PHPLib, 'zend_hash_graceful_destroy');
// -- zend_hash_graceful_reverse_destroy
zend_hash_graceful_reverse_destroy := GetProcAddress(PHPLib, 'zend_hash_graceful_reverse_destroy');
// -- zend_hash_apply
zend_hash_apply := GetProcAddress(PHPLib, 'zend_hash_apply');
// -- zend_hash_apply_with_argument
zend_hash_apply_with_argument := GetProcAddress(PHPLib, 'zend_hash_apply_with_argument');
// -- zend_hash_reverse_apply
zend_hash_reverse_apply := GetProcAddress(PHPLib, 'zend_hash_reverse_apply');
// -- zend_hash_del_key_or_index
zend_hash_del_key_or_index := GetProcAddress(PHPLib, 'zend_hash_del_key_or_index');
// -- zend_get_hash_value
zend_get_hash_value := GetProcAddress(PHPLib, 'zend_get_hash_value');
// -- zend_hash_find
zend_hash_find := GetProcAddress(PHPLib, 'zend_hash_find');
// -- zend_hash_quick_find
zend_hash_quick_find := GetProcAddress(PHPLib, 'zend_hash_quick_find');
// -- zend_hash_index_find
zend_hash_index_find := GetProcAddress(PHPLib, 'zend_hash_index_find');
// -- zend_hash_exists
zend_hash_exists := GetProcAddress(PHPLib, 'zend_hash_exists');
// -- zend_hash_index_exists
zend_hash_index_exists := GetProcAddress(PHPLib, 'zend_hash_index_exists');
// -- zend_hash_next_free_element
zend_hash_next_free_element := GetProcAddress(PHPLib, 'zend_hash_next_free_element');
// -- zend_hash_move_forward_ex
zend_hash_move_forward_ex := GetProcAddress(PHPLib, 'zend_hash_move_forward_ex');
// -- zend_hash_move_backwards_ex
zend_hash_move_backwards_ex := GetProcAddress(PHPLib, 'zend_hash_move_backwards_ex');
// -- zend_hash_get_current_key_ex
zend_hash_get_current_key_ex := GetProcAddress(PHPLib, 'zend_hash_get_current_key_ex');
// -- zend_hash_get_current_key_type_ex
zend_hash_get_current_key_type_ex := GetProcAddress(PHPLib, 'zend_hash_get_current_key_type_ex');
// -- zend_hash_get_current_data_ex
zend_hash_get_current_data_ex := GetProcAddress(PHPLib, 'zend_hash_get_current_data_ex');
// -- zend_hash_internal_pointer_reset_ex
zend_hash_internal_pointer_reset_ex := GetProcAddress(PHPLib, 'zend_hash_internal_pointer_reset_ex');
// -- zend_hash_internal_pointer_end_ex
zend_hash_internal_pointer_end_ex := GetProcAddress(PHPLib, 'zend_hash_internal_pointer_end_ex');
// -- zend_hash_copy
zend_hash_copy := GetProcAddress(PHPLib, 'zend_hash_copy');
// -- zend_hash_sort
zend_hash_sort := GetProcAddress(PHPLib, 'zend_hash_sort');
// -- zend_hash_compare
zend_hash_compare := GetProcAddress(PHPLib, 'zend_hash_compare');
// -- zend_hash_minmax
zend_hash_minmax := GetProcAddress(PHPLib, 'zend_hash_minmax');