Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

This commit was manufactured by cvs2svn to create tag 'dev'.

  • Loading branch information...
commit 2ccef75a1992e45f9b13cc7d7314a62bc9c0f2bd 1 parent d5ec9a9
SVN Migration authored
Showing with 0 additions and 46,268 deletions.
  1. +0 −9,554 Zend/ChangeLog
  2. +0 −186 Zend/FlexLexer.h
  3. +0 −56 Zend/LICENSE
  4. +0 −51 Zend/Makefile.am
  5. +0 −193 Zend/OBJECTS2_HOWTO
  6. +0 −136 Zend/RFCs/001.txt
  7. +0 −169 Zend/RFCs/002.txt
  8. +0 −72 Zend/RFCs/003.txt
  9. +0 −107 Zend/RFCs/004.txt
  10. +0 −669 Zend/ZEND_CHANGES
  11. +0 −510 Zend/Zend.dsp
  12. +0 −232 Zend/Zend.m4
  13. +0 −258 Zend/ZendCore.dep
  14. +0 −691 Zend/ZendTS.dsp
  15. +0 −81 Zend/acconfig.h
  16. +0 −47 Zend/acinclude.m4
  17. +0 −43 Zend/build.mk
  18. +0 −33 Zend/buildconf
  19. +0 −45 Zend/configure.in
  20. +0 −1,628 Zend/flex.skl
  21. +0 −339 Zend/tests/zend2.php
  22. +0 −877 Zend/zend.c
  23. +0 −572 Zend/zend.h
  24. BIN  Zend/zend.ico
  25. +0 −1,426 Zend/zend_API.c
  26. +0 −429 Zend/zend_API.h
  27. +0 −755 Zend/zend_alloc.c
  28. +0 −141 Zend/zend_alloc.h
  29. +0 −1,296 Zend/zend_builtin_functions.c
  30. +0 −26 Zend/zend_builtin_functions.h
  31. +0 −3,108 Zend/zend_compile.c
  32. +0 −713 Zend/zend_compile.h
  33. +0 −79 Zend/zend_config.nw.h
  34. +0 −90 Zend/zend_config.w32.h
  35. +0 −280 Zend/zend_constants.c
  36. +0 −64 Zend/zend_constants.h
  37. +0 −62 Zend/zend_dynamic_array.c
  38. +0 −38 Zend/zend_dynamic_array.h
  39. +0 −40 Zend/zend_errors.h
  40. +0 −3,146 Zend/zend_execute.c
  41. +0 −167 Zend/zend_execute.h
  42. +0 −950 Zend/zend_execute_API.c
  43. +0 −32 Zend/zend_execute_locks.h
  44. +0 −279 Zend/zend_extensions.c
  45. +0 −116 Zend/zend_extensions.h
  46. +0 −140 Zend/zend_fast_cache.h
  47. +0 −261 Zend/zend_globals.h
  48. +0 −109 Zend/zend_globals_macros.h
  49. +0 −1,326 Zend/zend_hash.c
  50. +0 −272 Zend/zend_hash.h
  51. +0 −247 Zend/zend_highlight.c
  52. +0 −52 Zend/zend_highlight.h
  53. +0 −147 Zend/zend_indent.c
  54. +0 −26 Zend/zend_indent.h
  55. +0 −487 Zend/zend_ini.c
  56. +0 −199 Zend/zend_ini.h
  57. +0 −236 Zend/zend_ini_parser.y
  58. +0 −12 Zend/zend_ini_scanner.h
  59. +0 −228 Zend/zend_ini_scanner.l
  60. +0 −15 Zend/zend_istdiostream.h
  61. +0 −851 Zend/zend_language_parser.y
  62. +0 −41 Zend/zend_language_scanner.h
  63. +0 −1,513 Zend/zend_language_scanner.l
  64. +0 −368 Zend/zend_list.c
  65. +0 −111 Zend/zend_list.h
  66. +0 −308 Zend/zend_llist.c
  67. +0 −79 Zend/zend_llist.h
  68. +0 −322 Zend/zend_mm.c
  69. +0 −63 Zend/zend_mm.h
  70. +0 −88 Zend/zend_modules.h
  71. 0  Zend/zend_multibyte.c
  72. +0 −256 Zend/zend_object_handlers.c
  73. +0 −79 Zend/zend_object_handlers.h
  74. +0 −122 Zend/zend_objects.c
  75. +0 −10 Zend/zend_objects.h
  76. +0 −263 Zend/zend_objects_API.c
  77. +0 −49 Zend/zend_objects_API.h
  78. +0 −411 Zend/zend_opcode.c
  79. +0 −1,812 Zend/zend_operators.c
  80. +0 −274 Zend/zend_operators.h
  81. +0 −110 Zend/zend_ptr_stack.c
  82. +0 −58 Zend/zend_ptr_stack.h
  83. +0 −127 Zend/zend_qsort.c
  84. +0 −26 Zend/zend_qsort.h
  85. +0 −40 Zend/zend_sprintf.c
  86. +0 −164 Zend/zend_stack.c
  87. +0 −47 Zend/zend_stack.h
  88. +0 −76 Zend/zend_static_allocator.c
  89. +0 −45 Zend/zend_static_allocator.h
  90. +0 −342 Zend/zend_ts_hash.c
  91. +0 −121 Zend/zend_ts_hash.h
  92. +0 −29 Zend/zend_types.h
  93. +0 −173 Zend/zend_variables.c
  94. +0 −57 Zend/zend_variables.h
  95. +0 −103 ext/imap/imap.h
  96. +0 −57 ext/pcre/config0.m4
  97. 0  ext/soap/EXPERIMENTAL
  98. +0 −13 ext/soap/Makefile
  99. +0 −8 ext/soap/Makefile.in
  100. +0 −36 ext/soap/TODO
  101. +0 −16 ext/soap/config.m4
  102. +0 −25 ext/soap/interop/base.php
  103. +0 −102 ext/soap/interop/client_round2.php
  104. +0 −796 ext/soap/interop/client_round2_interop.php
  105. +0 −636 ext/soap/interop/client_round2_params.php
  106. +0 −75 ext/soap/interop/client_round2_results.php
  107. +0 −54 ext/soap/interop/client_round2_run.php
  108. +0 −45 ext/soap/interop/database_round2.sql
  109. +0 −16 ext/soap/interop/echoheadersvc.wsdl
  110. +0 −85 ext/soap/interop/endpointdata.sql
  111. +0 −70 ext/soap/interop/index.php
  112. +0 −1  ext/soap/interop/info.php
  113. +0 −18 ext/soap/interop/interop.wsdl
  114. +0 −13 ext/soap/interop/interopB.wsdl
  115. +0 −35 ext/soap/interop/server_round2.php
  116. +0 −184 ext/soap/interop/server_round2_base.php
  117. +0 −87 ext/soap/interop/server_round2_groupB.php
  118. +0 −41 ext/soap/interop/server_round2_groupC.php
  119. +0 −258 ext/soap/interop/server_round2_test.php
  120. +0 −81 ext/soap/interop/test.utility.php
  121. +0 −17 ext/soap/interop/testclient.php
  122. +0 −17 ext/soap/interop/testserver.php
  123. +0 −7 ext/soap/libs.mk
  124. +0 −61 ext/soap/package.xml
  125. +0 −1,085 ext/soap/php_encoding.c
  126. +0 −248 ext/soap/php_encoding.h
Sorry, we could not display the entire diff because it was too big.
View
9,554 Zend/ChangeLog
0 additions, 9,554 deletions not shown
View
186 Zend/FlexLexer.h
@@ -1,186 +0,0 @@
-// $Header$
-
-// FlexLexer.h -- define interfaces for lexical analyzer classes generated
-// by flex
-
-// Copyright (c) 1993 The Regents of the University of California.
-// All rights reserved.
-//
-// This code is derived from software contributed to Berkeley by
-// Kent Williams and Tom Epperly.
-//
-// Redistribution and use in source and binary forms with or without
-// modification are permitted provided that: (1) source distributions retain
-// this entire copyright notice and comment, and (2) distributions including
-// binaries display the following acknowledgement: ``This product includes
-// software developed by the University of California, Berkeley and its
-// contributors'' in the documentation or other materials provided with the
-// distribution and in all advertising materials mentioning features or use
-// of this software. Neither the name of the University nor the names of
-// its contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-
-// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
-// WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-
-// This file defines FlexLexer, an abstract class which specifies the
-// external interface provided to flex C++ lexer objects, and yyFlexLexer,
-// which defines a particular lexer class.
-//
-// If you want to create multiple lexer classes, you use the -P flag
-// to rename each yyFlexLexer to some other xxFlexLexer. You then
-// include <FlexLexer.h> in your other sources once per lexer class:
-//
-// #undef yyFlexLexer
-// #define yyFlexLexer xxFlexLexer
-// #include <FlexLexer.h>
-//
-// #undef yyFlexLexer
-// #define yyFlexLexer zzFlexLexer
-// #include <FlexLexer.h>
-// ...
-
-#ifndef FLEXLEXER_H
-// Never included before - need to define base class.
-#define FLEXLEXER_H
-#include <iostream.h>
-
-extern "C++" {
-
-struct yy_buffer_state;
-typedef int yy_state_type;
-
-class FlexLexer {
-public:
- virtual ~FlexLexer() { }
-
- const char* YYText() { return yytext; }
- int YYLeng() { return yyleng; }
-
- virtual void
- yy_switch_to_buffer( struct yy_buffer_state* new_buffer ) = 0;
- virtual struct yy_buffer_state*
- yy_create_buffer( istream* s, int size ) = 0;
- virtual void yy_delete_buffer( struct yy_buffer_state* b ) = 0;
- virtual void yyrestart( istream* s ) = 0;
-
- virtual int yylex() = 0;
-
- // Call yylex with new input/output sources.
- int yylex( istream* new_in, ostream* new_out = 0 )
- {
- switch_streams( new_in, new_out );
- return yylex();
- }
-
- // Switch to new input/output streams. A nil stream pointer
- // indicates "keep the current one".
- virtual void switch_streams( istream* new_in = 0,
- ostream* new_out = 0 ) = 0;
-
- int lineno() const { return yylineno; }
-
- int debug() const { return yy_flex_debug; }
- void set_debug( int flag ) { yy_flex_debug = flag; }
-
-protected:
- char* yytext;
- int yyleng;
- int yylineno; // only maintained if you use %option yylineno
- int yy_flex_debug; // only has effect with -d or "%option debug"
-};
-
-}
-#endif
-
-#if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce)
-// Either this is the first time through (yyFlexLexerOnce not defined),
-// or this is a repeated include to define a different flavor of
-// yyFlexLexer, as discussed in the flex man page.
-#define yyFlexLexerOnce
-
-class yyFlexLexer : public FlexLexer {
-public:
- // arg_yyin and arg_yyout default to the cin and cout, but we
- // only make that assignment when initializing in yylex().
- yyFlexLexer( istream* arg_yyin = 0, ostream* arg_yyout = 0 );
-
- virtual ~yyFlexLexer();
-
- void yy_switch_to_buffer( struct yy_buffer_state* new_buffer );
- struct yy_buffer_state* yy_create_buffer( istream* s, int size );
- void yy_delete_buffer( struct yy_buffer_state* b );
- void yyrestart( istream* s );
-
- virtual int yylex();
- virtual void switch_streams( istream* new_in, ostream* new_out );
-
-protected:
- virtual int LexerInput( char* buf, int max_size );
- virtual void LexerOutput( const char* buf, int size );
- virtual void LexerError( const char* msg );
-
- void yyunput( int c, char* buf_ptr );
- int yyinput();
-
- void yy_load_buffer_state();
- void yy_init_buffer( struct yy_buffer_state* b, istream* s );
- void yy_flush_buffer( struct yy_buffer_state* b );
-
- int yy_start_stack_ptr;
- int yy_start_stack_depth;
- int* yy_start_stack;
-
- void yy_push_state( int new_state );
- void yy_pop_state();
- int yy_top_state();
-
- yy_state_type yy_get_previous_state();
- yy_state_type yy_try_NUL_trans( yy_state_type current_state );
- int yy_get_next_buffer();
-
- istream* yyin; // input source for default LexerInput
- ostream* yyout; // output sink for default LexerOutput
-
- struct yy_buffer_state* yy_current_buffer;
-
- // yy_hold_char holds the character lost when yytext is formed.
- char yy_hold_char;
-
- // Number of characters read into yy_ch_buf.
- int yy_n_chars;
-
- // Points to current character in buffer.
- char* yy_c_buf_p;
-
- int yy_init; // whether we need to initialize
- int yy_start; // start state number
-
- // Flag which is used to allow yywrap()'s to do buffer switches
- // instead of setting up a fresh yyin. A bit of a hack ...
- int yy_did_buffer_switch_on_eof;
-
- // The following are not always needed, but may be depending
- // on use of certain flex features (like REJECT or yymore()).
-
- yy_state_type yy_last_accepting_state;
- char* yy_last_accepting_cpos;
-
- yy_state_type* yy_state_buf;
- yy_state_type* yy_state_ptr;
-
- char* yy_full_match;
- int* yy_full_state;
- int yy_full_lp;
-
- int yy_lp;
- int yy_looking_for_trail_begin;
-
- int yy_more_flag;
- int yy_more_len;
- int yy_more_offset;
- int yy_prev_more_offset;
-};
-
-#endif
View
56 Zend/LICENSE
@@ -1,56 +0,0 @@
---------------------------------------------------------------------
- The Zend Engine License, version 2.00
-Copyright (c) 1999-2002 Zend Technologies Ltd. All rights reserved.
---------------------------------------------------------------------
-
-Redistribution and use in source and binary forms, with or without
-modification, is permitted provided that the following conditions
-are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
-
- 3. The names "Zend" and "Zend Engine" must not be used to endorse
- or promote products derived from this software without prior
- permission from Zend Technologies Ltd. For written permission,
- please contact license@zend.com.
-
- 4. Zend Technologies Ltd. may publish revised and/or new versions
- of the license from time to time. Each version will be given a
- distinguishing version number.
- Once covered code has been published under a particular version
- of the license, you may always continue to use it under the
- terms of that version. You may also choose to use such covered
- code under the terms of any subsequent version of the license
- published by Zend Technologies Ltd. No one other than Zend
- Technologies Ltd. has the right to modify the terms applicable
- to covered code created under this License.
-
- 5. Redistributions of any form whatsoever must retain the following
- acknowledgment:
- "This product includes the Zend Engine, freely available at
- http://www.zend.com"
-
- 6. All advertising materials mentioning features or use of this
- software must display the following acknowledgment:
- "The Zend Engine is freely available at http://www.zend.com"
-
-THIS SOFTWARE IS PROVIDED BY ZEND TECHNOLOGIES LTD. ``AS IS'' AND
-ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ZEND
-TECHNOLOGIES LTD. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
---------------------------------------------------------------------
View
51 Zend/Makefile.am
@@ -1,51 +0,0 @@
-## Process this file with automake to produce Makefile.in -*- makefile -*-
-
-#CLEANFILES = zend_language_parser.c zend_language_parser.h zend_language_scanner.c zend_language_parser.output zend_ini_parser.c zend_ini_parser.h zend_ini_scanner.c zend_ini_parser.output
-
-AUTOMAKE_OPTIONS=foreign
-noinst_LTLIBRARIES=libZend.la
-
-libZend_la_SOURCES=\
- zend_language_parser.y zend_language_scanner.l \
- zend_ini_parser.y zend_ini_scanner.l \
- zend_alloc.c zend_compile.c zend_constants.c zend_dynamic_array.c \
- zend_execute.c zend_execute_API.c zend_highlight.c zend_llist.c \
- zend_opcode.c zend_operators.c zend_ptr_stack.c zend_stack.c \
- zend_variables.c zend.c zend_API.c zend_extensions.c zend_hash.c \
- zend_list.c zend_indent.c zend_builtin_functions.c zend_sprintf.c \
- zend_ini.c zend_qsort.c zend_objects.c zend_object_handlers.c \
- zend_object_API.c
-
-libZend_la_LDFLAGS =
-libZend_la_LIBADD = @ZEND_EXTRA_LIBS@
-
-# automake isn't too clever about "non-standard" use of lex and yacc
-
-$(libZend_la_OBJECTS): zend_language_parser.h
-
-zend_ini_scanner.lo: zend_ini_parser.h
-
-# Language parser/scanner rules
-
-zend_language_scanner.c: $(srcdir)/zend_language_scanner.l
- $(LEX) -Pzend -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_language_scanner.l
-
-zend_language_parser.h: zend_language_parser.c
-zend_language_parser.c: $(srcdir)/zend_language_parser.y
- $(YACC) -p zend -v -d $(srcdir)/zend_language_parser.y -o zend_language_parser.c
-
-# INI parser/scanner rules
-
-zend_ini_parser.c: $(srcdir)/zend_ini_parser.y
- $(YACC) -p ini_ -v -d $(srcdir)/zend_ini_parser.y -o zend_ini_parser.c
-
-zend_ini_scanner.c: $(srcdir)/zend_ini_scanner.l
- $(LEX) -Pini_ -S$(srcdir)/flex.skl -o$@ -i $(srcdir)/zend_ini_scanner.l
-
-zend_ini_parser.h: zend_ini_parser.c
-
-depend:
-
-zend_execute.lo: $(srcdir)/zend_execute.c
- $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(INLINE_CFLAGS) -c $(srcdir)/zend_execute.c
-
View
193 Zend/OBJECTS2_HOWTO
@@ -1,193 +0,0 @@
-Creating an object
-------------------
-
-Object can be created in the following ways:
-
-1. As a result of a function call. E.g.:
-
-$foo = create_new_foo("parameter");
-$foo->run();
-
-The function should create a new zval, create new object and get the
-handle for it, set handle and handler table as needed. Note that the
-handle is the only ID of the object, so it should be enough to
-identify it.
-
-2. Overriding create_object handler for class. E.g.:
-
-$foo = new Java("some.Class.here", "parameter");
-$foo->run();
-
-The create_object handler function should create a new zval, create
-new object and get the handle for it, set handle and handler table as
-needed, and also provide constructor method that would handle
-constructor call. The get_constructor handler table entry should be
-used for that. Do not rely class entry's constructor, unless you refer
-to it from get_constructor handler.
-
-Object maintenance
-------------------
-
-The handlers add_ref and del_ref are called when a new zval referring
-to the object is created. This does not create a new object - both
-zvals still refer to the same object.
-
-clone_obj handler should create a new object, identical to an old one,
-but being a separate entity.
-
-delete_obj should destroy an object, all references to it become
-invalid.
-
-Object access - read
---------------------
-
-read_property is used to read object's property. This value is not
-meant to be changed. The handler returns zval * with the value.
-
-Object access - write
----------------------
-
-write_property is used to directly write object's property by
-name. This handler is used to assign property variables or to change them
-in operations like += or ++ (unless get_property_zval_ptr is also set).
-
-get_property_zval_ptr is used to obtain pointer to modifyable zval for
-operations like += or ++. This should be used only if your object model
-stores properties as real zval's that can be modified from outside.
-Otherwise this handler should be NULL and the engine will use
-read_property and write_property instead.
-
-get_property_ptr is used to obtain zval ** for future writing to
-it. If your object properties are stored as zval*, return real place
-where the property is stored. If the aren't, the best way is to create
-proxy object and handle it via get and set methods (see below).
-This method is meant to be used for send-by-reference and assign-by-reference
-use of object properties. If you don;t want to implement property
-referencing for your objects, you can set this handler to NULL.
-
-get and set handlers are used when engine needs to access the object
-as a value. E.g., in the following situation:
-
-$foo =& $obj->bar;
-$foo = 1;
-
-if $foo is an object (e.g., proxy object from get_property_ptr) it
-would be accessed using write handler.
-
-Object access - method call
----------------------------
-
-get_method handler is used to find method description by name. It
-should set right type, function name and parameter mask for the
-method. If the type is ZEND_OVERLOADED_FUNCTION, the method would be
-called via call_method handler, otherwise it would be called with
-standard Zend means.
-
-get_constructor performs the same function as get_method, but for the
-object constructor.
-
-call_method handler is used to perform method call. Parameters are
-passed like to any other Zend internal function.
-
-Object - comparison
--------------------
-
-Objects can be compared via compare_objects handler. This is used with
-== operation, === compares objects by handles, i.e., return true if
-and only if it's really the same object. Note that objects from
-different object types (i.e., having different handlers) can not be
-compared.
-
-Objects - reflection
---------------------
-
-get_class_name is used to retrieve class name of the object. No other
-reflection functions are currently implemented.
-
-Objects - data structures and handlers
----------------------------------------
-
-The object is represented by the following structure:
-
-struct _zend_object_value {
- zend_object_handle handle;
- zend_object_handlers *handlers;
-};
-
-handle is an ID of the object among the objects of the same type (not
-class!). The type of the object and how it behaves is determined by
-the handler table.
-
-typedef struct _zend_object_handlers {
- zend_object_add_ref_t add_ref;
- zend_object_del_ref_t del_ref;
- zend_object_delete_obj_t delete_obj;
- zend_object_clone_obj_t clone_obj;
- zend_object_read_property_t read_property;
- zend_object_write_property_t write_property;
- zend_object_get_property_ptr_t get_property_ptr;
- zend_object_get_property_zval_ptr_t get_property_zval_ptr;
- zend_object_get_t get;
- zend_object_set_t set;
- zend_object_has_property_t has_property;
- zend_object_unset_property_t unset_property;
- zend_object_get_properties_t get_properties;
- zend_object_get_method_t get_method;
- zend_object_call_method_t call_method;
- zend_object_get_constructor_t get_constructor;
- zend_object_get_class_entry_t get_class_entry;
- zend_object_get_class_name_t get_class_name;
- zend_object_compare_t compare_objects;
-} zend_object_handlers;
-
-See zend_object_handlers.h for prototypes. All objects are passed as zval's.
-
-Handlers explained:
-
-add_ref - called when a copy of the object handle is created.
-
-del_ref - called when a copy of the object handle is destroyed.
-
-delete_obj - called when an object needs to be destroyed.
-
-clone_obj - called when a new object identical to an old one should be
-created (unlike Zend Engine 1, this never happens unless explicitly
-asked for).
-
-read_property - returns zval *, containing the value of the
-property. Is used when value of the property should be retrieved for
-reading.
-
-write_property - assigns value to certain property of the object.
-
-get_property_zval_ptr - retrieves zval** for being directly modified by
-the engine. If your properties are not zval's, don't define it.
-
-get_property_ptr - retrieves zval** for the property of the value, to
-be used for read and write. If object properties are not zval's
-natively, this method should create and return proxy object for use
-with get and set methods.
-
-get - retrieves zval* for object contents. To be used mainly with
-proxy objects from get_property_ptr, but also may be used for
-convert_to_* functions.
-
-set - sets value for object contents. To be used mainly with
-proxy objects from get_property_ptr.
-
-has_property - checks if the object has certain property set.
-
-unset_property - removes value for the property of the object
-
-get_method - retrieves description of the method
-
-call_method - calls the method (parameters should be put on stack like
-for any other PHP internal function).
-
-get_constructor - get description for the object constructor method
-
-get_class_entry - should return the class entry
-
-get_class_name - get the name of the class the object belongs to
-
-compare_objects - compares if two objects are equal
View
136 Zend/RFCs/001.txt
@@ -1,136 +0,0 @@
-Revamped object model using object handles
-===========================================
-
-Background
-----------
-
-In the Zend Engine 1.0 (and its predecessor the PHP 3 scripting
-engine) the object model's design is that instantiated objects are
-language values. This means that when programmers are performing
-operations, such variable assignment and passing parameters to
-functions, objects are handled very similarly to the way other
-primitive types are handled such as integers and strings.
-Semantically this means that the whole object is being copied. The
-approach Java takes is different where one refers to objects by handle
-and not by value (one can think of a handle as an objects' ID).
-
-Need
-----
-
-Unfortunately, the approach taken up to now has severely limited the
-Zend Engine's object oriented model, both feature and simplicity
-wise. One of the main problems with the former approach is that object
-instantiation and duplication is very hard to control, a problem which
-can not only lead to inefficient development but also often to strange
-run-time behavior. Changing the object model to a handle oriented
-model will allow the addressing of many needs such as destructors,
-de-referencing method return values, tight control of object
-duplication and more.
-
-Overview
---------
-
-The proposed object model is very much influenced by the Java
-model. In general, when you create a new object you will be getting a
-handle to the object instead of the object itself. When this handle is
-sent to functions, assigned and copied it is only the handle which is
-copied/sent/assigned. The object itself is never copied nor
-duplicated. This results in all handles of this object to always point
-at the same object making it a very consistent solution and saving
-unnecessary duplication and confusing behavior.
-
-Functionality
--------------
-
-After this change the basic use of objects will be almost identical to
-previous versions of the scripting engine. However, you won't bump
-into awkward and confusing copying & destructing of objects. In order
-to create and use a new object instance you will do the following:
-$object = new MyClass(); $object->method();
-
-The previous code will assign $object the handle of a new instance of
-the class MyClass and call one of its methods.
-
-
-Consider the following code:
-
-1 class MyClass
-2 {
-3 function setMember($value)
-4 {
-5 $this->member = $value;
-6 }
-7
-8 function getMember()
-9 {
-10 return $this->member;
-11 }
-12 }
-13
-14 function foo($obj)
-15 {
-16 $obj->setMember("foo");
-17 }
-18
-19 $object = new MyClass();
-20 $object->setMember("bar");
-21 foo($object);
-22 print $object->getMember();
-
-Without the new Java-like handles, at line 20 the objects' data member
-member is set to the string value of "bar". Because of the internal
-representation of objects in the Zend Engine 1.0, the object is marked
-as a reference, and when it is sent by value to the function foo, it
-is duplicated (!). Therefore, the call to foo() on line 21 will
-result in the $obj->setMember("foo") call being called on a duplicate
-of $object. Line 22 will then result in "bar" being printed.
-
-This is how the scripting engine has worked until today. Most
-developers are probably unaware of the fact that they aren't always
-talking to the same object but often duplicates; others may have
-realized this can usually be solved by always passing objects by
-reference (unless a replica is actually desired, which is uncommon).
-
-The new object model will allow for a much more intuitive
-implementation of the code. On line 21, the object's handle (ID) is
-passed to foo() by value. Inside foo(), the object is fetched
-according to this handle and, therefore, the setMember() method is
-called on the originally instantiated object and not a copy. Line 22
-will therefore result in "foo" being printed. This approach gives
-developers tighter control of when objects are created and duplicated.
-An additional not-as-important benefit is that the object handle will
-be passed to foo() by value, which most probably will also save
-unnecessary duplication of the value containing the ID itself and thus
-additionally improving run-time performance.
-
-This was just a simple description of why the new object model solves
-awkward behavior and makes object handling much easier, intuitive and
-efficient. The importance of this change goes far beyond what is
-mentioned in this section as you will see in further sections which
-describe new features with a majority of them being based on this
-change.
-
-Compatibility Notes
---------------------
-
-Many PHP programmers aren't even aware of the copying quirks of the
-current object model and, therefore, there is a relatively good chance
-that the amount of PHP applications that will work out of the box or
-after a very small amount of modifications would be high.
-
-To simplify migration, version 2.0 will support an optional
-'auto-clone' feature, which will perform a cloning of the object
-whenever it would have been copied in version 1.0. Optionally, it
-will also be possible to request that the engine will emit an E_NOTICE
-message whenever such an automatic clone occurs, in order to allow
-developers to gradually migrate to the version 2.0-style behavior
-(without automatic clones).
-
-Dependencies
-------------
-
-The new object model is not dependent on other features. Many of the
-other Zend Engine 2.0 features, such as the $foo->bar()->barbara()
-syntax, destructors and others completely rely on this new object
-model.
-
View
169 Zend/RFCs/002.txt
@@ -1,169 +0,0 @@
-Title: Zend 2.0 Namespaces
-Version: $Revision$
-Status: draft
-Maintainer: Stig S. Bakken <ssb@fast.no>
-Created: 2001-09-08
-Modified: 2001-09-08
-
-
-1. Background/Need
-==================
-
-PHP and Zend 1.0 have come to a point where a lot of reusable code is
-being written; from simple functions and classes to entire application
-frameworks. It is becoming increasingly difficult to avoid symbol
-name collisions with the current scoping methods.
-
-The symbol scopes available in Zend 1.0 are the global scope, the
-class scope and the function scope. All scopes but classes may
-contain variables, only the class and global scopes may contain
-functions, while only the global scope may contain constants and
-classes. This means that all of Zend 1.0's scoping methods are
-inherently limited for solving symbol name collision problems.
-
-
-2. Overview
-===========
-
-Namespaces in Zend 2.0 provide a way to manage the symbol collision
-problem by making it possible to define multiple symbol tables able to
-contain all types of symbols. Zend will get the notion of a current
-namespace, defaulting to the current global one. The current name
-space may be changed on a file-by-file basis. Symbols in other name
-spaces than the current one may be referenced using a new namespace
-operator. It will be possible to "import" symbols from one namespace
-into another.
-
-
-3. Functionality
-================
-
-3.1. Namespace Syntax
-=====================
-
-The namespace operator ":" is used to refer to symbols in other
-namespaces than the current one:
-
-Class: Namespace:class
-Function: Namespace:function
-Static method: Namespace:class::method
-Variable: $Namespace:variable
-Constant: Namespace:CONSTANT
-Class variable: $Namespace:class::variable
-
-To refer to symbols in the global namespace, symbols are prefixed with
-only the namespace operator:
-
-Class: :class
-Function: :function
-Static method: :class::method
-Variable: $:variable
-Constant: :CONSTANT
-Class variable: $:class::variable
-
-Note: $:variable will effectively be just another syntax for
-$GLOBALS['variable'].
-
-A namespace may have a name containing a ":", it is always the last
-":" character in the symbol qualifier that is the actual namespace
-operator:
-
-Class: Name:Space:class
-Function: Name:Space:function
-Static method: Name:Space:class::method
-Variable: $Name:Space:variable
-Constant: Name:Space:CONSTANT
-Class variable: $Name:Space:class::variable
-
-(Here, the ":" between "Name" and "Space" is part of the name, it is
-the one after "Space" that is the namespace operator.)
-
-
-3.2. Defining Namespaces
-========================
-
-Individual files may define a namespace that will apply to the entire
-file. If no "namespace" operator occurs in the file, it will be in
-the global namespace:
-
- 1 namespace HTML;
- 2
- 3 class Form {
- 4 function Form() {
- 5 // constructor
- 6 }
- 7 // ...
- 8 }
-
-Or with the "nested" name syntax:
-
- 1 namespace HTML:Form;
- 2
- 3 class Image {
- 4 var $src;
- 5 function Image($src) {
- 6 $this->src = $src;
- 7 }
- 8 // ...
- 9 }
-
-Code executed within the "HTML" namespace may refer to the Form class
-as just "Form". Code executed from within other namespaces has to
-refer to it as "HTML:Form". The "namespace" statement must occur
-before any other statements in the file.
-
-# [ssb 2001-09-08]:
-# Should it be possible to "add" symbols to a namespace by including a
-# second file with the same namespace statement?
-
-
-3.3. Importing Symbols
-======================
-
-It is possible to import symbols from another namespace into the
-current one with the "import" statement:
-
- import * from HTML; // all symbols
-
- import Form from HTML; // single symbols
-
- import Form,Table from HTML; // multiple symbols
-
-There is a potential for name clashes between symols of different
-types that have the same qualifier syntax. These are resolved in this
-order: class, function, constant.
-
-Optionally, the symbol type may be explicitly given to import (as
-"class", "function", "variable" or "constant"):
-
- import class Form from HTML;
-
-And finally, you may import all symbols of a given type:
-
- import constant * from HTML:Table;
-
-The namespace with its symbols must already be defined before using
-"import".
-
-
-4. Compatibility Notes
-======================
-
-Old code that does not take advantage of namespaces will run without
-modifications.
-
-
-5. Dependencies
-===============
-
-The class variable syntax depends on this class variables being
-implemented in the new ZE2 object model.
-
-
-6. Acknowledgements
-===================
-
-Andi Gutmans <andi@zend.com> and Zeev Suraski <zeev@zend.com> for
-initial ZE2 namespaces proposal
-
-Dean Hall <php@apt7.com> for the initial symbol qualification syntax
View
72 Zend/RFCs/003.txt
@@ -1,72 +0,0 @@
-Title: Loose type requirements for functions
-Version: $Revision$
-Status: draft
-Maintainer: Brian Moon <brianm@dealnews.com>
-Created: 2001-09-17
-Modified: 2001-09-17
-
-
-1. Background/Need
-==================
-
-Many internal function of PHP will reject parameters because of their
-type (the array and variable function come to mind). For userland
-this is not an easy task as there is no uniform way to do it. An
-addition to the engine for requiring loose types would allow
-delevopers to know that the data passed to their functions is of the
-correct type and reduce the need for duplicating the same code in
-every function to check for the type of data.
-
-
-2. Overview
-===========
-
-Loose typing mostly means evaluating the contents of the variable and
-not the type of the variable itself. The requirements for this would
-and should work much like several of the is_* functions do now.
-
-The typing of parameters would be optional and those not typed would
-simply continue to be treated as they are now.
-
-3. Functionality
-================
-
-3.1. Allowed Types
-==================
-
-Only loose types should be needed to ensure the data is usable by the
-function. Duplicating the functionallity of is_scalar, is_resource,
-is_array and is_object should give developers all the information they
-need to use a variable correctly.
-
-3.2. Syntax
-===========
-
-The current function syntax should be expanded to allow typing of
-variables inline in a C style.
-
-function foo ($var){
-}
-
-could be changed to require an array such as:
-
-function foo (array $var){
-}
-
-3.3. Errors
-===========
-
-Mis-matches in type should be reported as fatal errors and should halt
-the execution of a script as that function can not be run and code
-following could not reliably run.
-
-
-4. Compatibility Notes
-======================
-
-Old code that does not take advantage of this will run without
-modifications.
-
-
-
-
View
107 Zend/RFCs/004.txt
@@ -1,107 +0,0 @@
-Title: Delegation
- (a/k/a. Object-Based Inheritance)
-Version: $Revision$
-Status: draft
-Maintainer: Sebastian Bergmann <sb@sebastian-bergmann.de>
-
-
-Dynamic Delegation
-
- Syntax / Example
-
- <?php
- class aDelegatee {
- function doSomething() {
- echo 'hubu';
- }
- }
-
- class anotherDelegatee {
- function doSomething() {
- echo 'tubu';
- }
- }
-
- class Foo {
- delegatee $bar;
-
- function setDelegatee($delegatee) {
- $this->delegatee = $delegatee;
- }
- }
-
- $foo = new Foo;
-
- $foo->setDelegatee(new aDelegatee);
- $foo->doSomething(); /* prints "hubu" */
-
- $foo->setDelegatee(new anotherDelegatee);
- $foo->doSomething(); /* prints "tubu" */
- ?>
-
- Semantics / Synopsis
-
- The "Foo" class may use all methods available in "$bar" as if they
- where locally defined or inherited from a superclass. The essential
- difference is that by assigning another object to "$bar" it is
- possible to dynamically switch between different implementations for
- these methods.
-
-
-Fixed Delegation
-
- Syntax / Example
-
- <?php
- class aDelegatee {
- function doSomething() {
- echo 'hubu';
- }
- }
-
- class Foo {
- final delegatee $bar = new aDelegatee;
- }
-
- $foo = new Foo;
-
- $foo->doSomething(); /* prints "hubu" */
- ?>
-
- Semantics / Synopsis
-
- The "Foo" class may use all methods available in "$bar" as if they
- where locally defined or inherited from a superclass. The difference
- to the dynamic delegation is that once the delegatee object is set,
- it cannot be changed.
-
-
-Default Delegation
-
- Syntax / Example
-
- <?php
- class Foo {
- function __delegate($name, $parameters = array()) {
- echo $name;
- }
- }
-
- $foo = new Foo;
- $foo->bar(); /* prints "bar" */
- ?>
-
- Semantics / Synopsis
-
- If a class has a __delegate() method, it is called whenever a
- method on an object of this class is called that is
-
- * Not defined in the class.
-
- * Not provided by a delegatee object.
-
- The __delegate() method is called with the name and parameters
- of the method call.
-
- This supersedes / obsoletes similar functionality introduced in
- Zend Engine 1 by ext/overload.
View
669 Zend/ZEND_CHANGES
@@ -1,669 +0,0 @@
-Changes in the Zend Engine 2.0
-
- * New Object Model.
-
- The Zend Engine's handling of objects has been completely
- changed in order to allow for new features, but also to increase
- its performance.
-
- Objects were handled in previous versions like primitive types
- (for instance integers and strings). The drawback of this method
- is, that semantically the whole object was copied when a
- variable was assigned or parameters were passed to a method. The
- new approach refers to objects by handle and not by value (one
- can think of a handle as an object's ID).
-
- Many PHP programmers aren't even aware of the copying quirks of
- the old object model and, therefore, there is a relatively good
- chance that the amount of PHP applications that will work out of
- the box or after a very small amount of modifications would be
- high.
-
- * Private and Protected Members.
-
- The Zend Engine 2.0 introduces private and protected member variables.
- Note that for performance reasons no error message is emitted in
- case of an illegal access to a private or protectecd member variable.
-
- Example:
-
- <?php
- class MyClass {
- private $Hello = "Hello, World!\n";
- protected $Bar = "Hello, Foo!\n";
- protected $Foo = "Hello, Bar!\n";
-
- function printHello() {
- print "MyClass::printHello() ".$this->Hello;
- print "MyClass::printHello() ".$this->Bar;
- print "MyClass::printHello() ".$this->Foo;
- }
- }
-
- class MyClass2 extends MyClass {
- protected $Foo;
-
- function printHello() {
- MyClass::printHello(); /* Should print */
- print "MyClass2::printHello() ".$this->Hello; /* Shouldn't print out anything */
- print "MyClass2::printHello() ".$this->Bar; /* Shouldn't print (not declared)*/
- print "MyClass2::printHello() ".$this->Foo; /* Should print */
- }
- }
-
- $obj = new MyClass();
- print $obj->Hello; /* Shouldn't print out anything */
- print $obj->Bar; /* Shouldn't print out anything */
- print $obj->Foo; /* Shouldn't print out anything */
- $obj->printHello(); /* Should print */
-
- $obj = new MyClass2();
- print $obj->Hello; /* Shouldn't print out anything */
- print $obj->Bar; /* Shouldn't print out anything */
- print $obj->Foo; /* Shouldn't print out anything */
- $obj->printHello();
- ?>
-
- Protected member variables can be accessed in classes extending the class
- they are declared in, whereas private member variables can only be accessed
- by the class they belong to.
-
- Note: Protected member variables have to be declared in every class they
- are used!
-
- * Object Cloning.
-
- The Zend Engine 1.0 offered no way a user could decide what copy
- constructor to run when an object is duplicated. During
- duplication, the Zend Engine 1.0 did a bitwise copy making an
- identical replica of all the object's properties.
-
- Creating a copy of an object with fully replicated properties is
- not always the wanted behavior. A good example of the need for
- copy constructors, is if you have an object which represents a
- GTK window and the object holds the resource of this GTK window,
- when you create a duplicate you might want to create a new
- window with the same properties and have the new object hold the
- resource of the new window. Another example is if your object
- holds a reference to another object which it uses and when you
- replicate the parent object you want to create a new instance of
- this other object so that the replica has its own separate copy.
-
- An object copy is created by calling the object's __clone()
- method.
-
- Example:
-
- <?php
- $copy_of_object = $object->__clone();
- ?>
-
- When the developer asks to create a new copy of an object, the
- Zend Engine will check if a __clone() method has been defined or
- not. If not, it will call a default __clone() which will copy
- all of the object's properties. If a __clone() method is
- defined, then it will be responsible to set the necessary
- properties in the created object. For convenience, the engine
- will supply a function that imports all of the properties from
- the source object, so that they can start with a by-value
- replica of the source object, and only override properties that
- need to be changed. [The function hasn't been implemented yet]
-
- Example:
-
- <?php
- class MyCloneable {
- static $id = 0;
-
- function MyCloneable() {
- $this->id = self::$id++;
- }
-
- function __clone() {
- $this->name = $clone->name;
- $this->address = 'New York';
- $this->id = self::$id++;
- }
- }
-
- $obj = new MyCloneable();
-
- $obj->name = 'Hello';
- $obj->address = 'Tel-Aviv';
-
- print $obj->id . "\n";
-
- $obj = $obj->__clone();
-
- print $obj->id . "\n";
- print $obj->name . "\n";
- print $obj->address . "\n";
- ?>
-
- * Nested classes (namespaces).
-
- The Zend Engine 1.0 provided only three scopes: the global
- scope, the class scope and the function scope. All scopes but
- classes could contain variables, only the class and global
- scopes could contain functions, while only the global scope
- could contain constants and classes. This means that all of the
- Zend Engine 1.0's scoping methods were inherently limited for
- solving symbol name collision problems.
-
- The Zend Engine 2.0 introduces the concept of nested classes
- to solve the symbol collision problem by making it possible to
- define multiple symbol tables able to contain all types of
- symbols. The Zend Engine is aware of a current class,
- defaulting to the global scope. Each class can contain it's
- own set of constants, functions and static variables. In order
- to access a class's local symbols you can use the self:: class
- accessor, for example, you can do self::$my_static_name = "Hello".
- You can also use the class's name such as
- MyClass::$my_static_name = "Hello". WIth both constants and
- functions, if you don't specify a class context the current class
- will be searched first and if the search fails then the global
- scope will be searched. If you want to force PHP to only check the
- global scope you can use the main:: accessor. For example,
- main::strlen() to make sure you're calling the strlen() in the main
- scope. You will only need to worry about this if you are defining
- methods which have the same name as global functions. For
- constants you can use the same notation such as self::MY_CONSTANT
- or main::MY_CONSTANT.
- Sometimes you will not want to access constants, functions or classes
- via the class accessor (i.e. MyClass::) because you use them very
- often and are an extremely slow typist. In this case, you can import
- functions, classes and constants from classes with the import keyword.
- It's quite self explanatory and there are a few examples below.
-
-
- * Classes may contain classes.
-
- Example:
-
- <?php
- class DB::MySQL {
- var $host = '';
-
- function db_connect($user) {
- print "Connecting to MySQL database '$this->host' as $user\n";
- }
- }
-
- class DB::Oracle {
- var $host = 'localhost';
-
- function db_connect($user) {
- print "Connecting to Oracle database '$this->host' as $user\n";
- }
- }
-
- $MySQL_obj = new DB::MySQL();
- $MySQL_obj->db_connect('Susan');
-
- $Oracle_obj = new DB::Oracle();
- $Oracle_obj->db_connect('Barbara');
- ?>
-
- * Classes may contain constants.
-
- Example:
-
- <?php
- class foo {
- const hey = 'hello';
- }
-
- print foo::hey;
- ?>
-
- * Current namespace's symbol tables are searched first for
- constants and functions.
-
- Example:
-
- The following code prints "foobar", not "foo", because
- the class constant overrides the "global" constant of
- the same name.
-
- <?php
- define('foo', 'bar');
-
- class FooClass {
- const foo = 'foobar';
-
- function printFoo() {
- print foo;
- }
- }
- ?>
-
- * In the scope of a function, the current namespace is that
- of the containing class/namespace.
-
- Example:
-
- <?php
- class FooClass {
- function foo() {
- $this->bar();
- bar();
- }
-
- function bar() {
- print "foobar\n";
- }
- }
-
- $obj = new FooClass;
- $obj->foo();
- $obj->foo();
- ?>
-
- This prints "foobar" two times, since a bar() method exists
- in the current namespace.
-
- * It is possible to "import" symbols from one namespace into
- another.
-
- Example:
-
- <?php
- class MyClass {
- class MyClass2 {
- function hello() {
- print "Hello, World in MyClass2\n";
- }
- }
-
- function hello() {
- print "Hello, World\n";
- }
- }
-
- import function hello, class MyClass2 from MyClass;
-
- MyClass2::hello();
- hello();
- ?>
-
- Example:
-
- <?php
- class MyOuterClass {
- class MyInnerClass {
- function func1() {
- print "func1()\n";
- }
-
- function func2() {
- print "func2()\n";
- }
- }
- }
-
- import class * from MyOuterClass;
- import function func2 from MyOuterClass::MyInnerClass;
-
- MyInnerClass::func1();
- func2();
- ?>
-
- Example:
-
- <?php
- class MyOuterClass {
- const Hello = "Hello, World\n";
- }
-
- import const Hello from MyOuterClass;
- print Hello;
- ?>
-
- Old code that does not take advantage of namespaces will run
- without modifications.
-
- * Unified Constructors.
-
- The Zend Engine allows developers to declare constructor methods
- for classes. Classes which have a constructor method call this
- method on each newly-created object, so it is suitable for any
- initialization that the object may need before it can be used.
-
- With the Zend Engine 1.0, constructor methods were class methods
- that had the same name as the class itself. Since it is very
- common to call parent constructors from derived classes, the way
- the Zend Engine 1.0 worked made it a bit cumbersome to move
- classes around in a large class hierarchy. If a class is moved
- to reside under a different parent, the constructor name of that
- parent changes as well, and the code in the derived class that
- calls the parent constructor has to be modified.
-
- The Zend Engine 2.0 introduces a standard way of declaring
- constructor methods by calling them by the name __construct().
-
- Example:
-
- <?php
- class BaseClass {
- function __construct() {
- print "In BaseClass constructor\n";
- }
- }
-
- class SubClass extends BaseClass {
- function __construct() {
- parent::__construct();
- print "In SubClass constructor\n";
- }
- }
-
- $obj = new BaseClass();
- $obj = new SubClass();
- ?>
-
- For backwards compatibility, if the Zend Engine 2.0 cannot find
- a __construct() function for a given class, it will search for
- the old-style constructor function, by the name of the class.
- Effectively, it means that the only case that would have
- compatibility issues is if the class had a method named
- __construct() which was used for different semantics.
-
- * Destructors.
-
- Having the ability to define destructors for objects can be very
- useful. Destructors can log messages for debugging, close
- database connections and do other clean-up work.
-
- No mechanism for object destructors existed in the Zend Engine
- 1.0, although PHP had already support for registering functions
- which should be run on request shutdown.
-
- The Zend Engine 2.0 introduces a destructor concept similar to
- that of other object-oriented languages, such as Java: When the
- last reference to an object is destroyed the object's
- destructor, which is a class method name __destruct() that
- recieves no parameters, is called before the object is freed
- from memory.
-
- Example:
-
- <?php
- class MyDestructableClass {
- function __construct() {
- print "In constructor\n";
- $this->name = 'MyDestructableClass';
- }
-
- function __destruct() {
- print 'Destroying ' . $this->name . "\n";
- }
- }
-
- $obj = new MyDestructableClass();
- ?>
-
- Like constructors, parent destructors will not be called
- implicitly by the engine. In order to run a parent destructor,
- one would have to explicitly call parent::__destruct() in the
- destructor body.
-
- * Exceptions.
-
- The Zend Engine 1.0 had no exception handling. The Zend Engine 2.0
- introduces a exception model similar to that of other programming
- languages.
-
- Example:
-
- <?php
- class MyException {
- function __construct($exception) {
- $this->exception = $exception;
- }
-
- function Display() {
- print "MyException: $this->exception\n";
- }
- }
-
- class MyExceptionFoo extends MyException {
- function __construct($exception) {
- $this->exception = $exception;
- }
-
- function Display() {
- print "MyException: $this->exception\n";
- }
- }
-
- try {
- throw new MyExceptionFoo('Hello');
- }
-
- catch (MyException $exception) {
- $exception->Display();
- }
- ?>
-
- Old code that has no user-defined functions 'catch', 'throw' and
- 'try' will run without modifications.
-
- * Dereferencing objects returned from functions.
-
- Example:
-
- <?php
- class Circle {
- function draw() {
- print "Circle\n";
- }
- }
-
- class Square {
- function draw() {
- print "Square\n";
- }
- }
-
- function ShapeFactoryMethod($shape) {
- switch ($shape) {
- case 'Circle': return new Circle();
- case 'Square': return new Square();
- }
- }
-
- ShapeFactoryMethod('Circle')->draw();
- ShapeFactoryMethod('Square')->draw();
- ?>
-
- * Static member variables of static classes can now be
- initialized.
-
- Example:
-
- <?php
- class foo {
- static $my_static = 5;
- }
-
- print foo::$my_static;
- ?>
-
- * Parameters that are passed by reference to a function
- may now have default values.
-
- Example:
-
- <?php
- function my_function(&$var = null) {
- if ($var === null) {
- die('$var needs to have a value');
- }
- }
- ?>
-
- * Built-In Backtracing.
-
- Example:
-
- <?php
- $backtrace = debug_backtrace();
-
- foreach ($backtrace as $step) {
- $class = isset($step['class']) ? $step['class'] . '::' : '';
-
- printf(
- "%s [%s:%s]\n",
- $step['function'],
- $step['file'],
- $step['line']
- );
- }
- ?>
-
- * __autoload(). TBD.
-
-Changes in the Zend Engine 1.0
-
- The Zend Engine was designed from the ground up for increased speed,
- reduced memory consumption and more reliable execution. We dare say
- it meets all of these goals and does so pretty well. Beyond that,
- there are several improvements in the language engine features:
-
- * References support.
-
- $foo = &$a; would make $foo and $a be two names to the same
- variable. This works with arrays as well, on either side; e.g.,
- $foo = &$a[7]; would make $foo and $a[7] be two names to the
- same variable. Changing one would change the other and vice
- versa.
-
- * Object overloading support.
-
- This feature allows various OO libraries to use the OO notation
- of PHP to access their functionality. Right now, no use is made
- of that feature, but we'd have a COM module ready by the time
- PHP 4.0 is released. A CORBA module would probably follow.
-
- * include() and eval() are now functions, and not statements.
-
- That means they return a value. The default return value from
- include() and eval() is 1, so that you can do if (include())
- without further coding. The return value may be changed by
- returning a value from the global scope of the included file or
- the evaluated string. For example, if 'return 7;' is executed in
- the global scope of foo.inc, include('foo.inc') would evaluate
- to 7.
-
- * Automatic resource deallocation.
-
- Several people have been bitten by the fact that PHP 3.0 had no
- concept of reference counting. The Zend Engine adds full
- reference counting for every value in the system, including
- resources. As soon as a resource is no longer referenced from
- any variable, it is automatically destroyed to save memory and
- resources. The most obvious example for the advantage in this is
- a loop that has an SQL query inside it, something like '$result
- = sql_query(...);'. In PHP 3.0, every iteration resulted in
- another SQL result-set allocated in the memory, and all of the
- result sets weren't destroyed until the end of the script's
- execution. With the Zend Engine, as soon as we overwrite an old
- result set with a new one, the old result set which is no longer
- referenced, is destroyed.
-
- * Full support for nesting arrays and objects within each other,
- in as many levels as you want.
-
- * true and false are now constants of type boolean.
-
- Comparing any other value to them would convert that value to a
- boolean first, and conduct the comparison later. That means, for
- example, that 5==true would evaluate to true (in PHP 3.0, true
- was nothing but a constant for the integer value of 1, so
- 5==true was identical to 5==1, which was false).
-
- * Runtime binding of function names.
-
- This complex name has a simple explanation - you can now call
- functions before they're declared!
-
- * Added here-docs support.
-
- * Added foreach.
-
- Two syntaxes supported:
-
- foreach(array_expr as $val) statement
- foreach(array_expr as $key => $val) statement
-
- * A true unset() implementation.
-
- A variable or element that is unset(), is now sent to oblivion
- in its entirely, no trace remains from it.
-
- * Output buffering support.
-
- Use ob_start() to begin output buffering, ob_end_flush() to end
- buffering and send out the buffered contents, ob_end_clean() to
- end buffering without sending the buffered contents, and
- ob_get_contents() to retreive the current contents of the output
- buffer. Header information (header(), content type, cookies) are
- not buffered. By turning on output buffering, you can
- effectively send header information all throughout your file,
- regardless of whether you've emitted body output or not.
-
- * Full variable reference within quoted strings:
-
- ${expr} - full indirect reference support for scalar
- variables
- {variable} - full variable support
-
- For example:
-
- $foo[5]['bar'] = 'foobar';
- print "{$foo[5]["bar"]}"; // would print "foobar"
-
- * Ability to call member functions of other classes from within
- member functions or from the global scope.
-
- You can now, for example, override a parent function with a
- child function, and call the parent function from it.
-
- * Runtime information for classes (class name, parent, available
- functions, etc.).
-
- * Much more efficient syntax highlighter - runs much quicker,
- performs more reliably, and generates much tighter HTML.
-
- * A full-featured debugger has been integrated with the language
- (supports breakpoints, expression evaluation, step-in/over,
- function call backtrace, and more).
-
- The Zend Engine claims 100% compatability with the engine of PHP
- 3.0, and is shamelessly lying about it. Here's why:
-
- * Static variable initializers only accept scalar values
- (in PHP 3.0 they accepted any valid expression). The impact
- should be somewhere in between void and non existent, since
- initializing a static variable with anything but a simple
- static value makes no sense at all.
-
- * The scope of break and continue is local to that of an
- include()'d file or an eval()'d string. The impact should
- be somewhat smaller of the one above.
-
- * The return statement no longer works from a require()'d file. It
- hardly worked in PHP 3.0, so the impact should be fairly small. If
- you want this functionality - use include() instead.
-
- * unset() is no longer a function, but a statement.
-
- * The following letter combination is not supported within
- encapsulated strings: "{$". If you have a string that includes
- this letter combination, for example, print "{$somevar"; (which
- printed the letter { and the contents of the variable $somevar in
- PHP 3.0), it will result in a parse error with the Zend Engine.
- In this case, you would have to change the code to print
- "\{$somevar"; This incompatability is due to the full variable
- reference within quoted strings feature added in the Zend
- Engine.
View
510 Zend/Zend.dsp
@@ -1,510 +0,0 @@
-# Microsoft Developer Studio Project File - Name="Zend" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=Zend - Win32 Release_inline
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "Zend.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "Zend.mak" CFG="Zend - Win32 Release_inline"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Zend - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "Zend - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE "Zend - Win32 Release_inline" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Zend - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDebug" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D ZEND_DEBUG=0 /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /FR /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x40d /d "NDebug"
-# ADD RSC /l 0x40d /d "NDebug"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_Debug" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /D "_Debug" /D "_LIB" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=1 /D "ZEND_WIN32" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x40d /d "_Debug"
-# ADD RSC /l 0x40d /d "_Debug"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Output_Dir "Zend___Win32_Release_inline"
-# PROP BASE Intermediate_Dir "Zend___Win32_Release_inline"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Output_Dir "Release_inline"
-# PROP Intermediate_Dir "Release_inline"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D ZEND_DEBUG=0 /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D "WIN32" /D "_MBCS" /FR /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /D "NDebug" /D "_LIB" /D "Zend_EXPORTS" /D "LIBZEND_EXPORTS" /D "TSRM_EXPORTS" /D ZEND_DEBUG=0 /D "ZEND_WIN32_FORCE_INLINE" /D "WIN32" /D "_MBCS" /D "ZEND_WIN32" /FR /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x40d /d "NDebug"
-# ADD RSC /l 0x40d /d "NDebug"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF
-
-# Begin Target
-
-# Name "Zend - Win32 Release"
-# Name "Zend - Win32 Debug"
-# Name "Zend - Win32 Release_inline"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\zend.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_alloc.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_API.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_builtin_functions.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_compile.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_constants.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_execute.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_execute_API.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_extensions.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_hash.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_highlight.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_indent.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_ini.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_ini_parser.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_ini_scanner.c
-# End Source File
-# Begin Source File
-
-SOURCE=".\zend_language_parser.c"
-# End Source File
-# Begin Source File
-
-SOURCE=".\zend_language_scanner.c"
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_list.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_llist.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_objects.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_objects_API.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_opcode.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_operators.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_ptr_stack.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_qsort.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_sprintf.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_stack.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_variables.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\FlexLexer.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_alloc.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_API.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_builtin_functions.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_compile.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_config.w32.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_constants.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_errors.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_execute.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_extensions.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_fast_cache.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_globals.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_hash.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_highlight.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_indent.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_ini.h
-# End Source File
-# Begin Source File
-
-SOURCE=".\zend_language_parser.h"
-# End Source File
-# Begin Source File
-
-SOURCE=".\zend_language_scanner.h"
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_list.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_llist.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_modules.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_operators.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_ptr_stack.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_qsort.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_stack.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_variables.h
-# End Source File
-# End Group
-# Begin Group "Parsers"
-
-# PROP Default_Filter "y"
-# Begin Source File
-
-SOURCE=.\zend_ini_parser.y
-
-!IF "$(CFG)" == "Zend - Win32 Release"
-
-!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
-
-# Begin Custom Build
-InputDir=.
-InputPath=.\zend_ini_parser.y
-
-BuildCmds= \
- bison --output=zend_ini_parser.c -v -d -p ini_ zend_ini_parser.y
-
-"$(InputDir)\zend_ini_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputDir)\zend_ini_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=".\zend_language_parser.y"
-
-!IF "$(CFG)" == "Zend - Win32 Release"
-
-# Begin Custom Build
-InputDir=.
-InputPath=".\zend_language_parser.y"
-
-BuildCmds= \
- bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
-
-"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
-
-# Begin Custom Build
-InputDir=.
-InputPath=".\zend_language_parser.y"
-
-BuildCmds= \
- bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
-
-"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
-
-# Begin Custom Build
-InputDir=.
-InputPath=".\zend_language_parser.y"
-
-BuildCmds= \
- bison --output=zend_language_parser.c -v -d -p zend zend_language_parser.y
-
-"$(InputDir)\zend_language_parser.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputDir)\zend_language_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Group
-# Begin Group "Scanners"
-
-# PROP Default_Filter "l"
-# Begin Source File
-
-SOURCE=.\flex.skl
-# End Source File
-# Begin Source File
-
-SOURCE=.\zend_ini_scanner.l
-
-!IF "$(CFG)" == "Zend - Win32 Release"
-
-!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
-
-# Begin Custom Build
-InputPath=.\zend_ini_scanner.l
-
-"zend_ini_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- flex -B -i -Sflex.skl -Pini_ -ozend_ini_scanner.c zend_ini_scanner.l
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=".\zend_language_scanner.l"
-
-!IF "$(CFG)" == "Zend - Win32 Release"
-
-# Begin Custom Build
-InputPath=".\zend_language_scanner.l"
-
-"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "Zend - Win32 Debug"
-
-# Begin Custom Build
-InputPath=".\zend_language_scanner.l"
-
-"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "Zend - Win32 Release_inline"
-
-# Begin Custom Build
-InputPath=".\zend_language_scanner.l"
-
-"zend_language_scanner.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- flex -i -Pzend -ozend_language_scanner.c zend_language_scanner.l
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Group
-# Begin Group "Text Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\ZEND_BUGS
-# End Source File
-# Begin Source File
-
-SOURCE=.\ZEND_CHANGES
-# End Source File
-# Begin Source File
-
-SOURCE=.\ZEND_TODO
-# End Source File
-# End Group
-# Begin Group "Resources"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\zend.ico
-# End Source File
-# End Group
-# End Target
-# End Project
View
232 Zend/Zend.m4
@@ -1,232 +0,0 @@
-dnl
-dnl $Id$
-dnl
-dnl This file contains Zend specific autoconf functions.
-dnl
-
-AC_DEFUN(LIBZEND_BISON_CHECK,[
-
-if test "$YACC" != "bison -y"; then
- AC_MSG_WARN(You will need bison if you want to regenerate the Zend parser.)
-else
- AC_MSG_CHECKING(bison version)
- set `bison --version| grep 'GNU Bison' | cut -d ' ' -f 4 | sed -e 's/\./ /'`
- if test "${1}" = "1" -a "${2}" -lt "28"; then
- AC_MSG_WARN(You will need bison 1.28 if you want to regenerate the Zend parser (found ${1}.${2}).)
- fi
- AC_MSG_RESULT(${1}.${2} (ok))
-fi
-
-])
-
-AC_DEFUN(LIBZEND_BASIC_CHECKS,[
-
-AC_REQUIRE([AC_PROG_YACC])
-AC_REQUIRE([AC_PROG_CC])
-AC_REQUIRE([AC_PROG_CC_C_O])
-AC_REQUIRE([AC_PROG_LEX])
-AC_REQUIRE([AC_HEADER_STDC])
-AC_REQUIRE([AC_PROG_LIBTOOL])
-
-LIBZEND_BISON_CHECK
-
-dnl Ugly hack to get around a problem with gcc on AIX.
-if test "$CC" = "gcc" -a "$ac_cv_prog_cc_g" = "yes" -a \
- "`uname -sv`" = "AIX 4"; then
- CFLAGS=`echo $CFLAGS | sed -e 's/-g//'`
-fi
-
-dnl Hack to work around a Mac OS X cpp problem
-dnl Known versions needing this workaround are 5.3 and 5.4
-if test "$ac_cv_prog_gcc" = "yes" -a "`uname -s`" = "Rhapsody"; then
- CPPFLAGS="$CPPFLAGS -traditional-cpp"
-fi
-
-AC_CHECK_HEADERS(
-limits.h \
-malloc.h \
-string.h \
-unistd.h \
-stdarg.h \
-sys/types.h \
-sys/time.h \
-signal.h \
-unix.h \
-dlfcn.h)
-
-AC_TYPE_SIZE_T
-AC_TYPE_SIGNAL
-
-AC_CHECK_LIB(dl, dlopen, [LIBS="-ldl $LIBS"])
-AC_CHECK_FUNC(dlopen,[AC_DEFINE(HAVE_LIBDL, 1,[ ])])
-
-dnl
-dnl Ugly hack to check if dlsym() requires a leading underscore in symbol name.
-dnl
-AC_MSG_CHECKING([whether dlsym() requires a leading underscore in symbol names])
-_LT_AC_TRY_DLOPEN_SELF([
- AC_MSG_RESULT(no)
-], [
- AC_MSG_RESULT(yes)
- AC_DEFINE(DLSYM_NEEDS_UNDERSCORE, 1, [Define if dlsym() requires a leading underscore in symbol names. ])
-], [
- AC_MSG_RESULT(no)
-], [])
-
-dnl This is required for QNX and may be some BSD derived systems
-AC_CHECK_TYPE( uint, unsigned int )
-AC_CHECK_TYPE( ulong, unsigned long )
-
-dnl Checks for library functions.
-AC_FUNC_VPRINTF
-AC_FUNC_MEMCMP
-AC_FUNC_ALLOCA
-AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite fpclass)
-AC_ZEND_BROKEN_SPRINTF
-
-AC_CHECK_FUNCS(finite isfinite isinf isnan)
-
-ZEND_FP_EXCEPT
-
-])
-
-AC_DEFUN(LIBZEND_ENABLE_DEBUG,[
-
-AC_ARG_ENABLE(debug,
-[ --enable-debug Compile with debugging symbols],[
- ZEND_DEBUG=$enableval
-],[
- ZEND_DEBUG=no
-])
-
-])
-
-AC_DEFUN(LIBZEND_OTHER_CHECKS,[
-
-AC_ARG_ENABLE(experimental-zts,
-[ --enable-experimental-zts This will most likely break your build],[
- ZEND_EXPERIMENTAL_ZTS=$enableval
-],[
- ZEND_EXPERIMENTAL_ZTS=no
-])
-
-AC_ARG_ENABLE(inline-optimization,
-[ --disable-inline-optimization If building zend_execute.lo fails, try
- this switch.],[
- ZEND_INLINE_OPTIMIZATION=$enableval
-],[
- ZEND_INLINE_OPTIMIZATION=yes
-])
-
-AC_ARG_ENABLE(memory-limit,
-[ --enable-memory-limit Compile with memory limit support. ], [
- ZEND_MEMORY_LIMIT=$enableval
-],[
- ZEND_MEMORY_LIMIT=no
-])
-
-AC_MSG_CHECKING(whether to enable thread-safety)
-AC_MSG_RESULT($ZEND_EXPERIMENTAL_ZTS)
-
-AC_MSG_CHECKING(whether to enable inline optimization for GCC)
-AC_MSG_RESULT($ZEND_INLINE_OPTIMIZATION)
-
-AC_MSG_CHECKING(whether to enable a memory limit)
-AC_MSG_RESULT($ZEND_MEMORY_LIMIT)
-
-AC_MSG_CHECKING(whether to enable Zend debugging)
-AC_MSG_RESULT($ZEND_DEBUG)
-
-if test "$ZEND_DEBUG" = "yes"; then
- AC_DEFINE(ZEND_DEBUG,1,[ ])
- echo " $CFLAGS" | grep ' -g' >/dev/null || DEBUG_CFLAGS="-g"
- if test "$CFLAGS" = "-g -O2"; then
- CFLAGS=-g
- fi
- test -n "$GCC" && DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall"
- test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \
- DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
-else
- AC_DEFINE(ZEND_DEBUG,0,[ ])
-fi
-
-test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
-
-if test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then
- AC_DEFINE(ZTS,1,[ ])
- CFLAGS="$CFLAGS -DZTS"
- LIBZEND_CPLUSPLUS_CHECKS
-fi
-
-if test "$ZEND_MEMORY_LIMIT" = "yes"; then
- AC_DEFINE(MEMORY_LIMIT, 1, [Memory limit])
-else
- AC_DEFINE(MEMORY_LIMIT, 0, [Memory limit])
-fi
-
-
-changequote({,})
-if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then
- INLINE_CFLAGS=`echo $ac_n "$CFLAGS $ac_c" | sed s/-O[0-9s]*//`
-else
- INLINE_CFLAGS="$CFLAGS"
-fi
-changequote([,])
-
-AC_C_INLINE
-
-AC_SUBST(INLINE_CFLAGS)
-
-
-dnl test and set the alignment define for ZEND_MM
-dnl this also does the logarithmic test for ZEND_MM.
-AC_MSG_CHECKING(for MM alignment and log values)
-
-AC_TRY_RUN([
-#include <stdio.h>
-
-typedef union _mm_align_test {
- void *ptr;
- double dbl;
- long lng;
-} mm_align_test;
-
-#if (defined (__GNUC__) && __GNUC__ >= 2)
-#define ZEND_MM_ALIGNMENT (__alignof__ (mm_align_test))
-#else
-#define ZEND_MM_ALIGNMENT (sizeof(mm_align_test))
-#endif
-
-int main()
-{
- int i = ZEND_MM_ALIGNMENT;
- int zeros = 0;
- FILE *fp;
-
- while (i & ~0x1) {
- zeros++;
- i = i >> 1;
- }
-
- fp = fopen("conftest.zend", "w");
- fprintf(fp, "%d %d", ZEND_MM_ALIGNMENT, zeros);
- fclose(fp);
-
- exit(0);
-}
-], [
- LIBZEND_MM_ALIGN=`cat conftest.zend | cut -d ' ' -f 1`
- LIBZEND_MM_ALIGN_LOG2=`cat conftest.zend | cut -d ' ' -f 2`
- AC_DEFINE_UNQUOTED(ZEND_MM_ALIGNMENT, $LIBZEND_MM_ALIGN, [ ])
- AC_DEFINE_UNQUOTED(ZEND_MM_ALIGNMENT_LOG2, $LIBZEND_MM_ALIGN_LOG2, [ ])
-])
-
-AC_MSG_RESULT(done)
-
-])
-
-
-AC_DEFUN(LIBZEND_CPLUSPLUS_CHECKS,[
-
-])
-
View
258 Zend/ZendCore.dep
@@ -1,258 +0,0 @@
-# Microsoft Developer Studio Generated Dependency File, included by ZendCore.mak
-
-.\zend_alloc.c : \
- "..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
- ".\zend_alloc.h"\
- ".\zend_compile.h"\
- ".\zend_config.w32.h"\
- ".\zend_execute.h"\
- ".\zend_llist.h"\
- ".\zend_ptr_stack.h"\
- ".\zend_stack.h"\
- ".\zend.h"\
- ".\zend_errors.h"\
- ".\zend_globals.h"\
- ".\zend_hash.h"\
-
-
-.\alloca.c : \
- "..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
- ".\zend_config.w32.h"\
- ".\zend.h"\
- ".\zend_errors.h"\
- ".\zend_hash.h"\
-
-
-.\zend_compile.c : \
- "..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
- ".\zend_alloc.h"\
- ".\zend_compile.h"\
- ".\zend_config.w32.h"\
- ".\zend_execute.h"\
- ".\zend_llist.h"\
- ".\zend_modules.h"\
- ".\zend_operators.h"\
- ".\zend_ptr_stack.h"\
- ".\zend_stack.h"\
- ".\zend_variables.h"\
- ".\zend.h"\
- ".\zend_API.h"\
- ".\zend_errors.h"\
- ".\zend_globals.h"\
- ".\zend_hash.h"\
- ".\zend_ini.h"\
-
-
-.\zend_constants.c : \
- "..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
- ".\zend_alloc.h"\
- ".\zend_config.w32.h"\
- ".\zend_constants.h"\
- ".\zend_operators.h"\
- ".\zend_variables.h"\
- ".\zend.h"\
- ".\zend_errors.h"\
- ".\zend_hash.h"\
-
-
-.\zend_execute.c : \
- "..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
- ".\zend_alloc.h"\
- ".\zend_compile.h"\
- ".\zend_config.w32.h"\
- ".\zend_constants.h"\
- ".\zend_execute.h"\
- ".\zend_llist.h"\
- ".\zend_modules.h"\
- ".\zend_operators.h"\
- ".\zend_ptr_stack.h"\
- ".\zend_stack.h"\
- ".\zend_variables.h"\
- ".\zend.h"\
- ".\zend_API.h"\
- ".\zend_errors.h"\
- ".\zend_globals.h"\
- ".\zend_hash.h"\
- ".\zend_ini.h"\
-
-
-.\zend_highlight.c : \
- "..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
- ".\zend_alloc.h"\
- ".\zend_compile.h"\
- ".\zend_config.w32.h"\
- ".\zend_execute.h"\
- ".\zend_highlight.h"\
- ".\zend_llist.h"\
- ".\zend_ptr_stack.h"\
- ".\zend_stack.h"\
- ".\zend_language_parser.tab.h"\
- ".\zend.h"\
- ".\zend_errors.h"\
- ".\zend_globals.h"\
- ".\zend_hash.h"\
-
-
-.\zend_llist.c : \
- "..\..\..\program files\microsoft visual studio\vc98\include\basetsd.h"\
- ".\zend_alloc.h"\
- ".\zend_config.w32.h"\
- ".\zend_llist.h"\
- ".\zend.h"\
- ".\zend_errors.h"\
- ".\zend_hash.h"\
-