diff --git a/appendices/migration55.xml b/appendices/migration55.xml
index 3262429bd489..d946b7738b2d 100644
--- a/appendices/migration55.xml
+++ b/appendices/migration55.xml
@@ -1734,27 +1734,27 @@ Name\Space\ClassName
Opcodes
- INIT_METHOD_CALL,
- ZEND_INIT_STATIC_METHOD_CALL,
- ZEND_INIT_FCALL_BY_NAME
+ INIT_METHOD_CALL,
+ ZEND_INIT_STATIC_METHOD_CALL,
+ ZEND_INIT_FCALL_BY_NAME
and
- ZEND_INIT_NS_FCALL_BY_NAME
+ ZEND_INIT_NS_FCALL_BY_NAME
use result.num as an index in
EX(call_slots).
- Opcode ZEND_NEW uses
+ Opcode ZEND_NEW uses
extended_value as an index in
EX(call_slots).
- Opcodes ZEND_DO_FCALL
+ Opcodes ZEND_DO_FCALL
and
- ZEND_DO_FCALL_BY_NAME
+ ZEND_DO_FCALL_BY_NAME
use op2.num as an index in
EX(call_slots).
diff --git a/internals2/apiref/index.xml b/internals2/apiref/index.xml
deleted file mode 100644
index 71b9fd0e88a3..000000000000
--- a/internals2/apiref/index.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- Zend Engine 2 API reference
-
-
-
-
diff --git a/internals2/buildsys/configunix.xml b/internals2/buildsys/configunix.xml
deleted file mode 100644
index 09b20cdbcf46..000000000000
--- a/internals2/buildsys/configunix.xml
+++ /dev/null
@@ -1,374 +0,0 @@
-
-
-
- Talking to the UNIX build system: config.m4
-
- The config.m4 file for an extension tells the UNIX
- build system what configure options your extension
- supports, what external libraries and includes you require, and what source
- files are to be compiled as part of it. A reference to all the commonly used
- autoconf macros, both PHP-specific and those built into autoconf, is given
- in the section.
-
-
-
-
- The version of autoconf you have installed makes a difference
- when developing an extension. For PHP 5.3 and earlier, you will have the best results
- with autoconf version 2.13 but versions up to and including 2.59
- will work. For PHP 5.4 and later the oldest autoconf version you can
- use is 2.59 and you will have better results with later versions.
-
-
-
-
- An example config.m4 file
-
-dnl $Id$
-dnl config.m4 for extension example
- /dev/null 2>&1; then
- AC_MSG_RESULT([$EXAMPLE_PATH])
- EXAMPLE_LIB_NAME=`$EXAMPLE_PATH --libname`
- EXAMPLE_INCDIRS=`$EXAMPLE_PATH --incdirs`
- EXAMPLE_LIBS=`$EXAMPLE_PATH --libs`
-
- dnl Check that the library works properly
- PHP_CHECK_LIBRARY($EXAMPLE_LIB_NAME, example_critical_function,
- [
- dnl Add the necessary include dirs
- PHP_EVAL_INCLINE($EXAMPLE_INCDIRS)
- dnl Add the necessary libraries and library dirs
- PHP_EVAL_LIBLINE($EXAMPLE_LIBS, EXAMPLE_SHARED_LIBADD)
- ],[
- dnl Bail out
- AC_MSG_ERROR([example library not found. Check config.log for more information.])
- ],[$EXAMPLE_LIBS]
- )
- else
- dnl No usable example-config, bail
- AC_MSG_RESULT([not found])
- AC_MSG_ERROR([Please check your example installation.])
- fi
-
- dnl Check whether to enable debugging
- if test "$PHP_EXAMPLE_DEBUG" != "no"; then
- dnl Yes, so set the C macro
- AC_DEFINE(USE_EXAMPLE_DEBUG,1,[Include debugging support in example])
- fi
-
- dnl Check for the extra support
- if test "$PHP_EXAMPLE_EXTRA" != "no"; then
- if test "$PHP_EXAMPLE_EXTRA" == "yes"; then
- AC_MSG_ERROR([You must specify a path when using --with-example-extra])
- fi
-
- PHP_CHECK_LIBRARY(example-extra, example_critical_extra_function,
- [
- dnl Add the neccessary paths
- PHP_ADD_INCLUDE($PHP_EXAMPLE_EXTRA/include)
- PHP_ADD_LIBRARY_WITH_PATH(example-extra, $PHP_EXAMPLE_EXTRA/lib, EXAMPLE_SHARED_LIBADD)
- AC_DEFINE(HAVE_EXAMPLEEXTRALIB,1,[Whether example-extra support is present and requested])
- EXAMPLE_SOURCES="$EXAMPLE_SOURCES example_extra.c"
- ],[
- AC_MSG_ERROR([example-extra lib not found. See config.log for more information.])
- ],[-L$PHP_EXAMPLE_EXTRA/lib]
- )
- fi
-
- dnl Finally, tell the build system about the extension and what files are needed
- PHP_NEW_EXTENSION(example, example.c $EXAMPLE_SOURCES, $ext_shared)
- PHP_SUBST(EXAMPLE_SHARED_LIBADD)
-fi
-]]>
-
-
-
-
- A short introduction to autoconf syntax
-
- config.m4 files are written using the GNU
- autoconf syntax. It can be described in a nutshell as
- shell scripting augmented by a powerful macro language. Comments are
- delimited by the string dnl, and strings are quoted
- using left and right brackets (e.g. [ and
- ]). Quoting of strings can be nested as many times as
- needed. A full reference to the syntax can be found in the
- autoconf manual at
- .
-
-
-
-
- PHP_ARG_*: Giving users the option
-
- The very first thing seen in the example config.m4
- above, aside from a couple of comments, are three lines using
- PHP_ARG_WITH and PHP_ARG_ENABLE.
- These provide configure with the options and help text
- seen when running ./configure --help. As the names
- suggest, the difference between the two is whether they create a
- option or an
- option. Every extension should
- provide at least one or the other with the extension name, so that users
- can choose whether or not to build the extension into PHP. By convention,
- PHP_ARG_WITH is used for an option which takes a
- parameter, such as the location of a library or program required by an
- extension, while PHP_ARG_ENABLE is used for an option
- which represents a simple flag.
-
-
- Sample configure output
-
-
-
-
-
-
- Regardless of the order in which options are specified on the command line
- when configure is called, the checks will be run in the
- order they are specified in config.m4.
-
-
-
-
-
- Processing the user's choices
-
- Now that config.m4 can provide the user with some
- choices of what to do, it's time to act upon those choices. In the example
- above, the obvious default for all three options, if any of them are
- unspecified, is "no". As a matter of convention, it is best to
- use this as the default for the option which enables the extension, as it
- will be overridden by phpize for extensions built
- separately, and should not clutter the extension space by default when
- being built into PHP. The code to process the three options is by far the
- most complicated.
-
-
-
- Handling the --with-example[=FILE] option
-
- The first check made of the
- option is whether
- it was set at all. As this option controls the inclusion of the entire
- extension, if it was unspecified, given in the negative form
- (), or given the value
- "no", nothing else is done at all. In the example above, it is
- specified with the value
- /some/library/path/example-config, so the first test
- succeeds.
-
-
-
- Next, the code calls AC_MSG_CHECKING, an
- autoconf macro which outputs a standard
- "checking for something" line, and checks whether the user gave
- an explicit path to the fictional example-config. In
- this example, PHP_EXAMPLE got the value
- /some/library/path/example-config, which is now copied
- into the EXAMPLE_PATH variable. Had the user specified only
- , the code would have
- executed $php_shtool path $EXAMPLE_CONFIG, which would
- try to guess the location of example-config using the
- user's current PATH. Either way, the next step is to
- check whether the chosen EXAMPLE_PATH is a regular
- file, is executable, and can be run successfully. If so,
- AC_MSG_RESULT is called, which completes the output
- line started by AC_MSG_CHECKING. Otherwise,
- AC_MSG_ERROR is called, which prints the given
- message and halts configure immediately.
-
-
-
- The code now determines some site-specific configuration information by
- running example-config several times. The next call is
- to PHP_CHECK_LIBRARY, a macro provided by the PHP
- buildsystem as a wrapper around autoconf's
- AC_CHECK_LIB. PHP_CHECK_LIBRARY
- attempts to compile, link, and run a program which calls the symbol
- specified by the second parameter in the library specified by the first,
- using the string given in the fifth as extra linker options. If the
- attempt succeeds, the script given in the third parameter is run. This
- script tells the PHP buildsystem to extract include paths, library paths,
- and library names from the raw option strings
- example-config provided. If the attempt fails, the
- script in the fourth parameter is run instead. In this case,
- AC_MSG_ERROR is called to stop processing.
-
-
-
-
- Handling the --enable-example-debug option
-
- Processing the is
- much simpler. A simple check for its truth value is performed. If that
- check succeeds, AC_DEFINE is called to make the C
- macro USE_EXAMPLE_DEBUG available to the source of the
- extension. The third parameter is a comment string for
- config.h; it is safe to leave this empty, and often is.
-
-
-
-
- Handling the --with-example-extra=DIR option
-
- For the sake of this example, the fictional "extra"
- functionality requested by the
- option does not
- share the fictional example-config program, nor does it
- have any default paths to search. Therefore, the user is required to
- provide the installation prefix of the necessary library. This setup is
- somewhat unlikely in a real-world extension, but is considered
- illustrative.
-
-
-
- The code begins in a now-familiar way by checking the truth value of
- PHP_EXAMPLE_EXTRA. If a negative form was provided, no
- further processing is done; the user did not request extra functionality.
- If a positive form was provided without a parameter,
- AC_MSG_ERROR is called to halt processing. The next
- step is another invocation of PHP_CHECK_LIBRARY. This
- time, since there is no set of predefined compiler options provided,
- PHP_ADD_INCLUDE and
- PHP_ADD_LIBRARY_WITH_PATH are used to construct the
- necessary include paths, library paths, and library flags for the extra
- functionality. AC_DEFINE is also called to indicate
- to the code that the extra functionality was both requested and available,
- and a variable is set to tell later code that there are extra source files
- to build. If the check fails, the familiar
- AC_MSG_ERROR is called. A different way to handle the
- failure would have been to call AC_MSG_WARNING
- instead, e.g.:
-
-
-
-
-
-
-
- In this case, configure would print a warning message
- rather than an error, and continue processing. Which way such failures are
- handled is a design decision left to the extension developer.
-
-
-
-
-
- Telling the buildsystem what was decided
-
- With all the necessary includes and libraries specified, with all the
- options processed and macros defined, one more thing remains to be done:
- The build system must be told to build the extension itself, and which
- files are to be used for that. To do this, the
- PHP_NEW_EXTENSION macro is called. The first parameter
- is the name of the extension, which is the same as the name of the
- directory containing it. The second parameter is the list of all source
- files which are part of the extension. See
- PHP_ADD_BUILD_DIR for information about adding source
- files in subdirectories to the build process. The third parameter should
- always be $ext_shared, a value which was determined by
- configure when PHP_ARG_WITH was
- called for . The
- fourth parameter specifies a "SAPI class", and is only useful for
- extensions which require the CGI or CLI SAPIs specifically. It should be
- left empty in all other cases. The fifth parameter specifies a list of
- flags to be added to CFLAGS while building the
- extension; the sixth is a boolean value which, if "yes", will
- force the entire extension to be built using $CXX
- instead of $CC. All parameters after the third are
- optional. Finally, PHP_SUBST is called to enable
- shared builds of the extension. See for
- more information on disabling support for building an extension in shared
- mode.
-
-
-
-
- The counter extension's config.m4 file
-
- The counter extension previously documented has a much simpler
- config.m4 file than that described above, as it doesn't
- make use of many buildsystem features. This is a preferred method of
- operation for any extension that doesn't use an external or bundled library.
-
-
- counter's config.m4 file
-
-$
-
-
-
-
-
-
-
diff --git a/internals2/buildsys/configwin.xml b/internals2/buildsys/configwin.xml
deleted file mode 100644
index 883376dc8dbf..000000000000
--- a/internals2/buildsys/configwin.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
- Talking to the Windows build system: config.w32
-
- An extension's config.w32 file is similar in usage to
- the config.m4 file, with two critical differences:
- first, it is used for Windows builds, and second, it is written in
- JavaScript. This section makes no attempt to cover JavaScript syntax. For
- the moment, this section is incomplete in lieu of a Win32 testbed, and an
- experimental-only port of the example config.m4 is the
- only example provided.
-
-
-
- An example config.w32 file
-
-// $Id$
-// vim:ft=javascript
-
-
-
-
-
- The counter extension's config.w32 file
-
- The counter extension previously documented has a much simpler
- config.w32 file than that described above, as it
- doesn't make use of many buildsystem features.
-
-
- counter's config.w32 file
-
-// $Id$
-// vim:ft=javascript
-
-
-
-
-
-
-
-
diff --git a/internals2/buildsys/environment.xml b/internals2/buildsys/environment.xml
deleted file mode 100644
index 586e0e27ba68..000000000000
--- a/internals2/buildsys/environment.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
- Building PHP for extension development
-
- In a typical PHP installation, the need for high performance almost always
- results in optimization at the cost of debugging facilities. This is a
- reasonable tradeoff for production use, but when developing an extension it
- falls short. What we need is a build of PHP which will give us some hints
- what has gone wrong when something does.
-
-
-
- The Zend Engine provides a memory manager which is capable of tracking
- memory leaks in extensions and providing detailed debugging information.
- This tracking is disabled by default, as is thread-safety. To turn them
- on, pass the and
- --enable-maintainer-zts options to
- configure, along with whatever options you typically
- use. For instructions on building PHP from source, see the instructions at
- . A typical configure
- line might look like this:
-
-
-
-
-
-
-
-
-
diff --git a/internals2/buildsys/index.xml b/internals2/buildsys/index.xml
deleted file mode 100644
index 939c482afc13..000000000000
--- a/internals2/buildsys/index.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
- The PHP 5 build system
-
-
- With all the functionality and flexibility available in PHP 5, it is no
- surprise that it consists of several thousand files and over one million
- lines of source code. Equally unsurprising is the necessity of a build
- system to manage so much data. This section describes how to set PHP up for
- extension development, the layout of an extension within the PHP source
- tree, and how to interface your extension with the build system.
-
-
- &internals2.buildsys.environment;
- &internals2.buildsys.skeleton;
- &internals2.buildsys.configunix;
- &internals2.buildsys.configwin;
-
-
-
-
diff --git a/internals2/buildsys/skeleton.xml b/internals2/buildsys/skeleton.xml
deleted file mode 100644
index 4540572af1a6..000000000000
--- a/internals2/buildsys/skeleton.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
- The ext_skel script
-
- A PHP extension is composed of several files common to all extensions. As
- the details of many of those files are similar from extension to extension,
- it can be laborious to duplicate the content for each one. Fortunately, there
- is a script which can do all of the initial setup for you. It's called
- ext_skel, and it's been distributed with PHP since 4.0.
-
-
-
- Running ext_skel with no parameters produces this
- output in PHP 5.2.2:
-
-
- Generally, when developing a new extension the only parameters you will be
- interested in are --extname and
- --no-help. Unless you are already experienced with the
- structure of an extension, you will not want to use
- --no-help; specifying it causes
- ext_skel to leave out many helpful comments in the
- files it generates.
-
-
-
- This leaves you with --extname, which tells
- ext_skel what the name of your extension is. This
- "name" is an all-lowercase identifier containing only letters and
- underscores which is unique among everything in the
- ext/ folder of your PHP distribution.
-
-
-
- The --proto option is intended to allow the developer to
- specify a header file from which a set of PHP functions will be created,
- ostensibly for the purpose of developing an extension based on a library,
- but it often functions poorly with most modern header files. A test run on
- the zlib.h header resulted in a very large number of
- empty and nonsense prototypes in the ext_skel output
- files. The --xml and --full-xml
- options are entirely nonfunctional thus far. The --skel
- option can be used to specify a modified set of skeleton files to work from,
- a topic which is beyond the scope of this section.
-
-
-
-
diff --git a/internals2/counter.xml b/internals2/counter.xml
deleted file mode 100644
index a836c0778fc9..000000000000
--- a/internals2/counter.xml
+++ /dev/null
@@ -1,1124 +0,0 @@
-
-
-
- The "counter" Extension - A Continuing Example
-
-
- Preface
-
- Throughout this Zend documentation, references are made to an example module
- in order to illustrate various concepts. The "counter" extension is this
- example, a fictional yet functional Zend module which strives to use as much
- of the Zend API as is reasonably possible. This short chapter describes the
- userland interface to the completed extension.
-
-
-
-
- "counter" serves no practical purpose whatsoever, as the functionality it
- provides is far more effectively implemented by appropriate userland code.
-
-
-
-
-
- &reftitle.setup;
-
-
- &reftitle.intro;
-
-
- The "counter" extension provides any number of counters to PHP code using it
- which reset at times determined by the caller.
-
-
-
- There are three interfaces to "counter": basic, extended, and objective. The
- basic interface provides a single counter controlled by INI settings and
- function calls. The extended interface provides an arbitrary number of named
- counter resources which may optionally persist beyond the lifetime of a
- single PHP request. The objective interface combines both the basic and
- extended interfaces into a Counter class.
-
-
-
-
- &reftitle.runtime;
-
- &extension.runtime;
-
- &ini.php.constants;
-
-
-
-
- counter.reset_time
- integer
-
-
-
- counter.reset_time tells "counter" to reset the
- counter used by the basic interface. It may be any of the
- COUNTER_RESET_* constants (see below).
-
-
-
-
-
- counter.save_path
- string
-
-
-
- Tells "counter" where to save data that has to persist between
- invocations of PHP (i.e. any counter that has COUNTER_RESET_NEVER or
- COUNTER_FLAG_SAVE). A file will be created at this path, which must be
- readable and writable to whatever user PHP is running as.
-
-
-
-
-
- counter.initial_value
- integer
-
-
-
- Sets the initial value of the counter used by the basic interface
- whenever it is reset.
-
-
-
-
-
-
-
-
- &reftitle.resources;
-
-
- The "counter" extension defines one resource type: a counter.
-
-
-
-
-
-
- &reftitle.constants;
- &extension.constants;
-
-
-
-
- COUNTER_FLAG_PERSIST
- (integer)
-
-
-
- A counter with this flag will be created as a persistent resource.
-
-
-
-
-
- COUNTER_FLAG_SAVE
- (integer)
-
-
-
- A counter with this flag will be saved between invocations of PHP.
-
-
-
-
-
- COUNTER_FLAG_NO_OVERWRITE
- (integer)
-
-
-
- This flag causes counter_create to avoid overwriting
- an existing named counter with a new one.
-
-
-
-
-
- COUNTER_META_NAME
- (string)
-
-
-
- Pass this constant to get the name of a counter resource or object.
-
-
-
-
-
- COUNTER_META_IS_PERISTENT
- (string)
-
-
-
- Pass this constant to determine whether a counter resource or object is
- persistent (has the COUNTER_FLAG_PERSIST flag).
-
-
-
-
-
- COUNTER_RESET_NEVER
- (integer)
-
-
-
- The counter will never be reset.
-
-
-
-
-
- COUNTER_RESET_PER_LOAD
- (integer)
-
-
-
- The counter will be reset on each invocation of PHP.
-
-
-
-
-
- COUNTER_RESET_PER_REQUEST
- (integer)
-
-
-
- The counter will be reset on each request.
-
-
-
-
-
-
-
- &reftitle.examples;
-
-
- Basic interface
-
-
- The basic interface provides three simple functions, illustrated here:
-
-
-
- "counter"'s basic interface
-
-
-]]>
-
-
- &example.outputs;
-
-
-
-
- The basic interface also provides a number of
- INI settings.
-
-
-
-
- Extended interface
-
-
- The extended interface provides a small suite of functions that allow the
- user to define an arbitrary number of named counters with unique settings.
- The basic interface can be used in parallel with the extended interface.
-
-
-
- "counter"'s extended interface
-
-
-]]>
-
-
- When run once, the above example outputs:
-
-
-
-
- If run a second time within the same instance of PHP, it outputs:
-
-
-
-
- If then run a third time in a different instance of
- PHP, it outputs:
-
-
-
-
-
-
-
- Objective interface
-
-
- The objective interface provides an object-oriented way to access the
- extended interfaces. The following example shows how the above one would be
- implemented using the objective interface. The output of this example is
- exactly the same, except that instead of printing "Not a valid counter!",
- this will instead issue a PHP warning that the variable
- $counter_three is not an object. This example shows that
- it is possible to subclass the Counter class defined
- by the extension, as well as that the counter's value is maintained using
- an instance variable rather than method access.
-
-
-
- "counter"'s objective interface
-
-
-getMeta(COUNTER_META_NAME),
- $this->getMeta(COUNTER_META_IS_PERSISTENT) ? '' : ' not',
- $this->value);
- }
-}
-
-Counter::setCounterClass("MyCounter");
-if (($counter_one = Counter::getNamed("one")) === NULL) {
- $counter_one = new Counter("one", 0, COUNTER_FLAG_PERSIST);
-}
-$counter_one->bumpValue(2); // we aren't allowed to "set" the value directly
-$counter_two = new Counter("two", 5);
-$counter_three = Counter::getNamed("three");
-$counter_four = new Counter("four", 2, COUNTER_FLAG_PERSIST | COUNTER_FLAG_SAVE | COUNTER_FLAG_NO_OVERWRITE);
-$counter_four->bumpValue(1);
-
-$counter_one->printCounterInfo();
-$counter_two->printCounterInfo();
-$counter_three->printCounterInfo();
-$counter_four->printCounterInfo();
-?>
-]]>
-
-
-
-
-
-
-
- The Counter class
- Counter
-
-
-
- &reftitle.intro;
-
- Represents a single counter object.
-
-
-
-
- &reftitle.classsynopsis;
-
-
- Counter
-
-
- Counter
-
-
-
-
-
-
-
-
-
-
- Counter::__construct
-
- Creates an instance of a Counter which maintains a single numeric value
-
-
-
- &reftitle.description;
-
- Counter::__construct
- stringname
- intinitial_value
- intflags
-
-
- Creates an instance of a Counter which maintains a single numeric value.
-
-
-
- &reftitle.parameters;
-
-
- name
-
-
- The new counter's name.
-
-
-
-
- initial_value
-
-
- The initial value of the counter. Defaults to zero (0).
-
-
-
-
- flags
-
-
- Flags for the new counter, chosen from the
- COUNTER_FLAG_* constants.
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- Returns a Counter object on success.
-
-
-
- &reftitle.errors;
-
- Counter::__construct throws an Exception if something
- goes wrong.
-
-
-
-
-
-
- Counter::getValue
-
- Get the current value of a counter
-
-
-
- &reftitle.description;
-
- intCounter::getValue
-
-
-
- Counter::getValue returns the current value of a
- counter.
-
-
-
- &reftitle.returnvalues;
-
- Counter::getValue returns an integer.
-
-
-
- &reftitle.seealso;
-
- Counter::bumpValue
- Counter::resetValue
-
-
-
-
-
-
- Counter::bumpValue
-
- Change the current value of a counter
-
-
-
- &reftitle.description;
-
- Counter::bumpValue
- intoffset
-
-
- Counter::bumpValue updates the current value of a
- counter.
-
-
-
- &reftitle.parameters;
-
-
- offset
-
-
- The amount by which to change the counter's value. Can be negative.
-
-
-
-
-
-
- &reftitle.seealso;
-
- Counter::getValue
- Counter::resetValue
-
-
-
-
-
-
- Counter::resetValue
-
- Reset the current value of a counter
-
-
-
- &reftitle.description;
-
- voidCounter::resetValue
-
-
-
- Counter::resetValue resets the current value of a
- counter to its original initial value.
-
-
-
- &reftitle.seealso;
-
- Counter::getValue
- Counter::bumpValue
-
-
-
-
-
-
- Counter::getMeta
-
- Return a piece of metainformation about a counter
-
-
-
- &reftitle.description;
-
- mixedCounter::getMeta
- intattribute
-
-
- Counter::getMeta returns metainformation about a
- counter.
-
-
-
- &reftitle.parameters;
-
-
- attribute
-
-
- The metainformation to retrieve.
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- Counter::getMeta returns values of varying types
- based on which metainformation was requested.
-
-
-
-
-
-
- Counter::getNamed
-
- Retrieve an existing named counter
-
-
-
- &reftitle.description;
-
- static
- CounterCounter::getNamed
- stringname
-
-
- Counter::getNamed returns an existing counter by name
- if that name exists, or &null; otherwise. This is a static function.
-
-
-
- &reftitle.parameters;
-
-
- name
-
-
- The counter name to search for.
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- Counter::getNamed returns an existing counter by name
- if that name exists, or &null; otherwise.
-
-
-
-
-
-
- Counter::setCounterClass
-
- Set the class returned by Counter::getNamed
-
-
-
- &reftitle.description;
-
- static
- voidCounter::setCounterClass
- stringname
-
-
- Counter::setCounterClass changes the class of objects
- returned by Counter::getNamed. The class being set
- must not have a public constructor and must be a subclass of
- Counter. If these conditions are not met, a fatal
- error is raised. This is a static function.
-
-
-
- &reftitle.parameters;
-
-
- name
-
-
- The name of the class to use.
-
-
-
-
-
-
-
-
-
-
- The basic interface
- Basic
-
-
-
- counter_get
-
- Get the current value of the basic counter
-
-
-
- &reftitle.description;
-
- intcounter_get
-
-
-
- counter_get returns the current value of the basic
- interface's counter.
-
-
-
- &reftitle.returnvalues;
-
- counter_get returns an integer.
-
-
-
- &reftitle.seealso;
-
- counter_bump
- counter_reset
-
-
-
-
-
-
- counter_bump
-
- Update the current value of the basic counter
-
-
-
- &reftitle.description;
-
- voidcounter_bump
- intoffset
-
-
- counter_bump updates the current value of the basic
- interface's counter.
-
-
-
- &reftitle.parameters;
-
-
- offset
-
-
- The amount by which to change the counter's value. Can be negative.
-
-
-
-
-
-
- &reftitle.seealso;
-
- counter_get
- counter_reset
-
-
-
-
-
-
- counter_reset
-
- Reset the current value of the basic counter
-
-
-
- &reftitle.description;
-
- voidcounter_reset
-
-
-
- counter_reset resets the current value of the basic
- interface's counter to its original initial value.
-
-
-
- &reftitle.seealso;
-
- counter_get
- counter_bump
-
-
-
-
-
-
-
- The extended interface
- Extended
-
-
-
- counter_create
-
- Creates a counter which maintains a single numeric value
-
-
-
- &reftitle.description;
-
- resourcecounter_create
- stringname
- intinitial_value
- intflags
-
-
- Creates a counter which maintains a single numeric value.
-
-
-
- &reftitle.parameters;
-
-
- name
-
-
- The new counter's name.
-
-
-
-
- initial_value
-
-
- The initial value of the counter. Defaults to zero (0).
-
-
-
-
- flags
-
-
- Flags for the new counter, chosen from the
- COUNTER_FLAG_* constants.
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- Returns a counter resource.
-
-
-
-
-
-
- counter_get_value
-
- Get the current value of a counter resource
-
-
-
- &reftitle.description;
-
- intcounter_get_value
- resourcecounter
-
-
- counter_get_value returns the current value of a
- counter resource.
-
-
-
- &reftitle.parameters;
-
-
- counter
-
-
- The counter resource to operate on.
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- counter_get_value returns an integer.
-
-
-
- &reftitle.seealso;
-
- counter_bump_value
- counter_reset_value
-
-
-
-
-
-
- counter_bump_value
-
- Change the current value of a counter resource
-
-
-
- &reftitle.description;
-
- voidcounter_bump_value
- resourcecounter
- intoffset
-
-
- counter_bump_value updates the current value of a
- counter resource.
-
-
-
- &reftitle.parameters;
-
-
- counter
-
-
- The counter resource to operate on.
-
-
-
-
- offset
-
-
- The amount by which to change the counter's value. Can be negative.
-
-
-
-
-
-
- &reftitle.seealso;
-
- counter_get_value
- counter_reset_value
-
-
-
-
-
-
- counter_reset_value
-
- Reset the current value of a counter resource
-
-
-
- &reftitle.description;
-
- voidcounter_reset_value
- resourcecounter
-
-
- counter_reset_value resets the current value of a
- counter resource to its original initial value.
-
-
-
- &reftitle.parameters;
-
-
- counter
-
-
- The counter resource to operate on.
-
-
-
-
-
-
- &reftitle.seealso;
-
- counter_get_value
- counter_bump_value
-
-
-
-
-
-
- counter_get_meta
-
- Return a piece of metainformation about a counter resource
-
-
-
- &reftitle.description;
-
- mixedcounter_get_meta
- resourcecounter
- intattribute
-
-
- counter_get_meta returns metainformation about a
- counter resource.
-
-
-
- &reftitle.parameters;
-
-
- counter
-
-
- The counter resource to operate on.
-
-
-
-
- attribute
-
-
- The metainformation to retrieve.
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- counter_get_meta returns values of varying types
- based on which metainformation was requested.
-
-
-
-
-
-
- counter_get_named
-
- Retrieve an existing named counter as a resource
-
-
-
- &reftitle.description;
-
- resourceCounter::getNamed
- stringname
-
-
- counter_get_named returns an existing counter by name
- if that name exists, or &null; otherwise.
-
-
-
- &reftitle.parameters;
-
-
- name
-
-
- The counter name to search for.
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- counter_get_name returns an existing counter by name
- if that name exists, or &null; otherwise.
-
-
-
-
-
-
-
-
-
diff --git a/internals2/faq/index.xml b/internals2/faq/index.xml
deleted file mode 100644
index 551002f05cda..000000000000
--- a/internals2/faq/index.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
- Extension FAQs
-
-
-
-
-
diff --git a/internals2/funcs/index.xml b/internals2/funcs/index.xml
deleted file mode 100644
index 6295050073b3..000000000000
--- a/internals2/funcs/index.xml
+++ /dev/null
@@ -1,358 +0,0 @@
-
-
-
- Writing Functions
-
- Functions and Methods in PHP take much the same form, a method is simply a function with a specific scope; the scope of their class entry.
- The Hacker will read about class entries in other sections of the Hacker's guide.
- The purpose of this section is to introduce the Hacker to the anatomy of a function or method;
- the Hacker will learn how to define functions, how to accept variables and how to return variables to the programmer of PHP.
-
-
-
- The anatomy of a function could not be simpler:
-
-
-
-
-
-
-
- The PHP_FUNCTION(hackers_function) preprocessor instruction will result in the following declaration:
-
-
-
-
-
-
-
- INTERNAL_FUNCTION_PARAMETERS is defined as a macro and explained in the following table:
-
-
-
- INTERNAL_FUNCTION_PARAMETERS
-
-
-
- Name and type
- Description
- Access macros
-
-
-
-
-
- int ht
- Number of actual parameters passed by user
- ZEND_NUM_ARGS()
-
-
-
- zval *return_value
-
- Pointer to a PHP variable that can be filled with the return value
- passed to the user. The default type is IS_NULL.
-
- RETVAL_*, RETURN_*
-
-
-
- zval **return_value_ptr
- When returning references to PHP set this to a pointer to
- your variable. It is not suggested to return references.
-
-
-
-
- zval *this_ptr
-
- If this is a method call, points to the PHP variable
- holding the $this object.
-
- getThis()
-
-
-
- int return_value_used
-
- Flag indicating whether the returned value will be used by the
- caller.
-
-
-
-
-
-
-
-
-
- For clarity, the fully expanded declaration for PHP_FUNCTION(hackers_function) looks like:
-
-
-
-
-
-
-
- The presence of this_ptr may be confusing, classes are covered in detail in later sections,
- suffice to say that PHP_METHOD(MyClass, hackersFunction) would result in the following declaration:
-
-
-
-
-
-
-
- hackers_function doesn't do anything useful, it accepts a number using the zend_parse_parameters API, doubles it, and returns it to the engine.
- It is obvious that a normal function would have to do something more complex than double the input, for the purposes of education we are keeping it simple.
- On entry to the function return_value is allocated and initialized to null, making null the default return value of any function in PHP.
-
-
-
- If zend_parse_parameters does not recieve what is specified by the Hacker as the correct arguments, and the arguments recieved cannot be converted
- to conform with type_spec an error will be raised, and by convention, the Hacker should return immediately.
-
-
-
- Arrays, Objects, and Resources cannot be converted.
-
-
-
- Parsing Parameters Prototypes
-
-
-
- int zend_parse_parameters(int num_args TSRMLS_DC, char *type_spec, ...)
-
-
- int zend_parse_parameters_ex(int flags, int num_args TSRMLS_DC, char *type_spec, ...)
-
-
- int zend_parse_parameter(int flags, int arg_num TSRMLS_DC, zval **arg, const char *spec, ...)
-
-
-
-
-
-
-
- zend_parse_parameter is available from version 5.5, it behaves like zend_parse_parameters_ex
- except that instead of reading the arguments from the stack, it receives a single zval to convert, which may be changed in place.
-
-
-
-
-
- flags is intended to be a mask, currently only ZEND_PARSE_PARAMS_QUIET will have any impact (supress warnings)
-
-
-
-
- The variable arguments recieved by these API functions are expected to be the address of C variables, and should be considered the output of the zend_parse_parameters API functions.
-
-
-
- Type Specifiers
-
-
-
- Spec
- Type
- Locals
-
-
-
-
- a
- array
- zval*
-
-
- A
- array or object
- zval*
-
-
- b
- boolean
- zend_bool
-
-
- C
- class
- zend_class_entry*
-
-
- d
- double
- double
-
-
- f
- function
- zend_fcall_info*, zend_fcall_info_cache*
-
-
- h
- array
- HashTable*
-
-
- H
- array or object
- HashTable*
-
-
- l
- long
- long
-
-
- L
- long (limits out-of-range LONG_MAX/LONG_MIN)
- long
-
-
- o
- object
- zval*
-
-
- O
- object (of specified zend_class_entry)
- zval*, zend_class_entry*
-
-
- p
- string (a valid path)
- char*, int
-
-
- r
- resource
- zval*
-
-
- s
- string
- char*, int
-
-
- z
- mixed
- zval*
-
-
- Z
- mixed
- zval**
-
-
-
-
-
-
-
- Where the type specifier is O, the local zend_class_entry* is to be
- considered input (part of the type spec) to zend_parse_parameter
-
-
-
-
- Advanced Type Specifiers
-
-
-
- Spec
- Description
-
-
-
-
- *
- a variable number of argument of the preceeding type, 0 or more
-
-
- +
- a variable number of argument of the preceeding type, 1 or more
-
-
- |
- indicates that the remaining parameters are optional
-
-
- /
- SEPARATE_ZVAL_IF_NOT_REF on the parameter it follows
-
-
- !
-
- the preceeding parameter can be of the specified type or null
- For 'b', 'l' and 'd', an extra argument of type zend_bool* must be passed after
- the corresponding bool*, long* or double*
- addresses which will be set true if null is recieved.
-
-
-
-
-
-
- Consult README.PARAMETER_PARSING_API included in source distributions for more information on parsing parameters
-
-
-
- Once the Hacker's function has executed whatever it was implemented to execute, it is time to set the return_value for the engine.
- The RETURN_ and RETVAL_ macros are just wrappers around Z_*_P macros that work with return_value.
-
-
-
- RETURN_ macros cause execution to leave the function immediately (ie: return;), while RETVAL_ macros allow execution to continue after return_value has been set.
-
-
-
- The Hacker should now have a reasonable understanding of the anatomy of a function, and to some degree, the anatomy of a method.
-
-
-
-
-
diff --git a/internals2/ini/index.xml b/internals2/ini/index.xml
deleted file mode 100644
index c08b59daee05..000000000000
--- a/internals2/ini/index.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
- Working with INI settings
-
-
-
-
-
diff --git a/internals2/intro.xml b/internals2/intro.xml
deleted file mode 100644
index ae2b523fdbff..000000000000
--- a/internals2/intro.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
-
-
- Preface
-
-
- This section of the manual is written for the Hacker: someone thinking about getting their hands dirty, someone who wants an understanding of internals in order to advance their PHP skills, or maybe someone looking to write the next best extension. Whatever the reason, this section will seek to provide a good understanding of the internals of PHP, how to write extensions, how to understand existing code containing mystical macros. All of the important internal functionality is documented here, enough anyway to convince you to read the source.
-
-
-
- Out of necessity, this section assumes the reader has a working knowledge of the C programming language, and associated tools, like compilers and terminal emulators and the like. You don't need to be the next Alan Turing, but a working knowledge is none the less essential for this section to be of any use. With just that working knowledge, this section should be enough to get you well on the way to earning the title Hacker, and you do have to earn it.
-
-
-
- The documentation in this section is current as of PHP 5.3.3, deviations in API functionality are duly noted in the appropriate sections.
-
-
-
-
- This documentation is still under development. The original Zend documentation is preserved in its entirety in the
- Zend Engine 1 section for those who
- need it before this documentation is completed.
-
-
-
-
-
-
diff --git a/internals2/memory/TSRM.xml b/internals2/memory/TSRM.xml
deleted file mode 100644
index 92131413d9b0..000000000000
--- a/internals2/memory/TSRM.xml
+++ /dev/null
@@ -1,166 +0,0 @@
-
-
-
- Thread-Safe Resource Manager
-
-
- When PHP is built with Thread Safety enabled, the engine requires a way to isolate contexts from one another, such that the threads of a process may service individual requests without interference. TSRM is omnipotent within PHP, extension authors have to do very little in order to make sure their extensions can function in both a Thread Safe and Non Thread Safe architecture.
-
-
-
- Accessor macros for per-module globals
-
-
-
-
-
-
- The snippet above shows how an extension author is expected to define their global accessors. The TSRMG macro takes an identifier, type cast and element name. The identifier is assigned by TSRM during initialization of the module. Declaring global accessors in this way ensures that an extension can operate safely in a Thread Safe and Non Thread Safe architecture using the same logic.
-
-
-
- TSRM manages the isolation and safety of all global structures within PHP, from executor globals to extension globals, a pointer to the isolated storage is also passed around with most, or many of the API functions. The macros TSRMLS_C and TSRMLS_CC translate to "thread safe local storage" and "thread safe local storage prefixed with a comma" respectively.
-
-
-
- If a function requires a pointer to TSRM, it is declared with the macro TSRMLS_D or TSRMLS_DC in it's prototype, which translates to "thread safe local storage only" and "thread safe local storage prefixed with a comma" respectively. Many macros within the engine reference TSRM, so it is a good idea to declare most things to accept TSRM, such that if they need to call upon TSRM they do not have to fetch a pointer during execution.
-
-
-
- Because TSRM is thread local, and some functions (for compatibility reasons) are not able to accept TSRM directly, the macro TSRMLS_FETCH exists, which requests that TSRM fetches the pointer to the thread local storage. This should be avoided wherever it can be, as it is not without cost in a Thread Safe setup.
-
-
-
-
- While developing extensions, build errors that contain "tsrm_ls is undefined" or errors to that effect stem from the fact that TSRMLS is undefined in the current scope, to fix this, declare the function to accept TSRMLS with the appropriate macro, if the prototype of the function in question cannot be changed, you must call TSRMLS_FETCH within the function body.
-
-
-
-
- The functionality documented hereafter is aimed at advanced use of TSRM. It is not ordinary for extensions to have to interact with TSRM directly, the pecl programmer should use API's above TSRM such as the Module Globals API.
-
-
-
- TSRM Internals
-
-
-
- Prototype
- Description
-
-
-
-
-
- typedef int ts_rsrc_id
- The type definition to represent a resource by numeric identifiers
-
-
-
- int tsrm_startup(int expected_threads, int expected_resources, int debug_level, char *debug_filename)
- expected_threads and expected_resources are not hard limits. debug_level and debug_filename only have an effect on windows in Debug mode or when TSRM_DEBUG is defined. Called once per process in ZTS mode during server startup.
-
-
-
- void tsrm_shutdown(void)
-
- Should be the last thing called in the process to destroy and free all storage TSRM storage in ZTS mode.
-
-
-
-
- ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_id, size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor)
-
- Allocates and thread safe pointer of size bytes, calling ctor on the pointer, assigning (and returning) the id to rsrc_id, the dtor is called when the resource is free'd. Module globals are isolated in ZTS mode using this API.
-
-
-
-
- void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
-
- Fetches a resource by previously allocated id from the entries created by the specified thread identifed by th_id.
-
-
-
-
-
- void *ts_resource(ts_rsrc_id id)
-
-
- Fetches a resource by previously allocated id from the entries created by the calling thread.
-
-
-
-
- void ts_free_thread(void)
-
- Destroys and frees the entries for the calling thread, currently this API is only used by ISAPI module.
-
-
-
-
-
- void ts_free_id(ts_rsrc_id id)
-
-
- Destroys the resource identified by previously allocated id. Module globals are cleaned up in ZTS mode using this API.
-
-
-
-
-
-
-
- There are more TSRM API functions to enable the creation and destruction of interpreter contexts, the usage of such functionality is out of the scope of this documentation, please see TSRM/TSRM.h for more information.
-
-
-
- TSRM Mutex API
-
-
-
- Prototype
- Description
-
-
-
-
-
- MUTEX_T tsrm_mutex_alloc(void)
- Allocates and returns a suitable MUTEX_T for the environment.
-
-
-
- int tsrm_mutex_lock(MUTEX_T mutexp)
-
- Locks mutexp for the calling thread.
-
-
-
-
- int tsrm_mutex_unlock(MUTEX_T mutexp)
-
- Unlocks mutexp for the calling thread.
-
-
-
-
- void tsrm_mutex_free(MUTEX_T mutexp);
-
- Destroys and frees the (unlocked) and previously allocated mutexp.
-
-
-
-
-
-
-
- The mutex API is exposed by TSRM. However, its internal usage is far too wide to document usefully here, none the less, basic functionality and prototypes are documented here.
-
-
\ No newline at end of file
diff --git a/internals2/memory/index.xml b/internals2/memory/index.xml
deleted file mode 100644
index 7ae7059db7a5..000000000000
--- a/internals2/memory/index.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
- Memory management
-
-
- Memory management in the Zend Engine is deceptively simple. There are some
- APIs to learn, and some concepts behind them to understand, but that's about
- all.
-
-
- &internals2.memory.management;
- &internals2.memory.persistence;
- &internals2.memory.TSRM;
-
-
-
-
diff --git a/internals2/memory/management.xml b/internals2/memory/management.xml
deleted file mode 100644
index 4ac6b1b556eb..000000000000
--- a/internals2/memory/management.xml
+++ /dev/null
@@ -1,167 +0,0 @@
-
-
-
- Basic memory management
-
-
- The engine's memory management is implemented with features important to a system like PHP. The exact functionality of the engine's memory management and the optimizations performed are out of the scope of this document. However, a good understanding of its functionality provides a basis for a good understanding of the rest of the Hacker's Guide, and introduce you to terminology and functionality used throughout PHP.
-
-
-
- The most important of its features for the Hacker, and the first thing to mention is tracking allocations. Tracking allocations allow the memory manager to avoid leaks, a thorn in the side of most Hackers. When PHP is built in debug mode (--enable-debug), detected leaks are reported, in a perfect world they would never get to deployment.
-
-
- While tracking allocations is an important, and highly useful feature, the Hacker should not become lazy! Always attempt to resolve leaks before deploying your code, a memory leak in a SAPI environment can become a very big problem, very quickly.
-
- Another, perhaps more incidental but still noteworthy, feature is that the memory manager is the part that allows a hard limit on memory usage for each instance of PHP. As we all know, there is no such thing as unlimited. If some code is running out of memory, it is likely to be written wrong, either by the Hacker, or the programmer of PHP. Limiting the memory therefore is not a restriction on the language that is supposed to be experienced in production, it is simply a way from stopping development environments from spiraling out of control when mistakes are made, and equally, when bugs are found in production.
-
- From the Hacker's perspective, the memory management API looks very much like libc's (or whoever the Hacker prefers !) malloc implementation.
-
-
- Main memory APIs
-
-
-
- Prototype
- Description
-
-
-
-
-
- void *emalloc(size_t size)
- Allocate size bytes of memory.
-
-
-
- void *ecalloc(size_t nmemb, size_t size)
-
- Allocate a buffer for nmemb elements of
- size bytes and makes sure it is initialized with zeros.
-
-
-
-
- void *erealloc(void *ptr, size_t size)
-
- Resize the buffer ptr, which was allocated using
- emalloc to hold size bytes of memory.
-
-
-
-
- void efree(void *ptr)
-
- Free the buffer pointed by ptr. The buffer had to be
- allocated by emalloc.
-
-
-
-
-
- void *safe_emalloc(size_t nmemb, size_t size, size_t offset)
-
-
- Allocate a buffer for holding nmemb blocks of each
- size bytes and an additional offset bytes.
- This is similar to emalloc(nmemb * size + offset) but adds
- a special protection against overflows.
-
-
-
-
- char *estrdup(const char *s)
-
- Allocate a buffer that can hold the NULL-terminated string
- s and copy the s into that buffer.
-
-
-
-
-
- char *estrndup(const char *s, unsigned int length)
-
-
- Similar to estrdup while the length of the
- NULL-terminated string is already known.
-
-
-
-
-
-
-
-
- The engine's memory management functions do not return NULL upon failure, if memory cannot be allocated at runtime, the engine bails and raises an error.
-
-
-
-
-
- Always use valgrind before deploying code and as a normal part of the Hacker's process. The engine can only report and detect leaks where it has allocated the memory. All of PHP is only a thin wrapper around third parties, those third parties do not use the engines memory management. Additionally, valgrind will catch errors that do not always halt or even have an apparent effect at execution time, it is just as important that there should be no errors, as it is important that avoidable leaks should be avoided.
-
-
-
-
- Some leaks are unavoidable, some libraries rely on the end of a process to free some of their structures, this is normal under some circumstances and acceptable where it is out of the Hacker's control.
-
-
- While executing in a debug environment, configured with --enable-debug and --enable-zend-test, the leak function used in the next example is actually implemented by the engine and is available to call in userland.
-
-
- Leak Detection in Action
-
-
-
- &example.outputs.similar;
-
-
-
-
-
-
-
- USE_ZEND_ALLOC=0 in the environment will stop the memory manager from functioning,
- all allocations fall back on the default system allocators which can be useful for debugging leaks,
- and should only be used for this purpose.
-
-
-
-
-
-
diff --git a/internals2/memory/persistence.xml b/internals2/memory/persistence.xml
deleted file mode 100644
index 16e33fcbc370..000000000000
--- a/internals2/memory/persistence.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-
-
-
- Data persistence
-
-
- In this context, data persistence is taken to mean any data that is intended to survive the current request. The memory management within the engine is very focused on request bound allocations, but this is not always practical or appropriate. Persistent memory is sometimes required in order to satisfy requirements of external libraries, it can also be useful while Hacking.
-
-
-
- A common use of persistent memory is to enable persistent SQL server connections, though this practice is frowned upon, it is none the less the most common use of this feature.
-
-
-
-
- All of the following functions take the additional persistent parameter, should this be false, the engine will use its regular allocators (emalloc) and the memory should not be considered persistent. Where memory is allocated as persistent, system allocators are invoked, under most circumstances they are still not able to return NULL pointers just as the Main memory APIs.
-
-
-
-
- Persistent memory APIs
-
-
-
- Prototype
- Description
-
-
-
-
-
- void *pemalloc(size_t size, zend_bool persistent)
- Allocate size bytes of memory.
-
-
-
- void *pecalloc(size_t nmemb, size_t size, zend_bool persistent)
-
- Allocate a buffer for nmemb elements of
- size bytes and makes sure it is initialized with zeros.
-
-
-
-
- void *perealloc(void *ptr, size_t size, zend_bool persistent)
-
- Resize the buffer ptr, which was allocated using
- emalloc to hold size bytes of memory.
-
-
-
-
- void pefree(void *ptr, zend_bool persistent)
-
- Free the buffer pointed by ptr. The buffer had to be
- allocated by pemalloc.
-
-
-
-
-
- void *safe_pemalloc(size_t nmemb, size_t size, size_t offset, zend_bool persistent)
-
-
- Allocate a buffer for holding nmemb blocks of each
- size bytes and an additional offset bytes.
- This is similar to pemalloc(nmemb * size + offset) but adds
- a special protection against overflows.
-
-
-
-
- char *pestrdup(const char *s, zend_bool persistent)
-
- Allocate a buffer that can hold the NULL-terminated string
- s and copy the s into that buffer.
-
-
-
-
-
- char *pestrndup(const char *s, unsigned int length, zend_bool persistent)
-
-
- Similar to pestrdup while the length of the
- NULL-terminated string is already known.
-
-
-
-
-
-
-
-
- It is important to remember that memory allocated to be persistent is not optimized or tracked by the engine; it is not subject to memory_limit, additionally, all variables that are created by the Hacker for the engine must not use persistent memory.
-
-
-
diff --git a/internals2/objects/index.xml b/internals2/objects/index.xml
deleted file mode 100644
index 653cb62d334b..000000000000
--- a/internals2/objects/index.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
- Writing Classes
-
-
-
-
-
diff --git a/internals2/opcodes.xml b/internals2/opcodes.xml
deleted file mode 100644
index 36314b7bff15..000000000000
--- a/internals2/opcodes.xml
+++ /dev/null
@@ -1,388 +0,0 @@
-
-
-
- Zend Engine 2 Opcodes
-
-
- When parsing PHP files, Zend Engine 2 generates a series of operation
- codes, commonly known as "opcodes", representing the function of the
- code. This part of the manual details those opcodes and their behaviour.
-
-
- Opcodes may be dumped for a given PHP file using the vld extension (see
- &url.pecl.package;vld).
-
-
-
- Database and Statement Attributes Table
-
-
-
-
-
-
- Attribute
-
-
- Valid value(s)
-
-
-
-
- PDO_ATTR_AUTOCOMMIT
-
-
- BOOL
- TRUE if autocommit is set, FALSE otherwise.
- dbh->auto_commit contains value. Processed by PDO directly.
-
-
-
-
- PDO_ATTR_PREFETCH
-
-
- LONG
- Value of the prefetch size in drivers that support it.
-
-
-
-
- PDO_ATTR_TIMEOUT
-
-
- LONG
- How long to wait for a db operation before timing out.
-
-
-
-
- PDO_ATTR_ERRMODE
-
-
- LONG
- Processed and handled by PDO
-
-
-
-
- PDO_ATTR_SERVER_VERSION
-
-
- STRING
- The human-readable string representing the
- Server/Version this driver is currently connected to.
-
-
-
-
- PDO_ATTR_CLIENT_VERSION
-
-
- STRING
- The human-readable string representing the Client/Version this driver supports.
-
-
-
-
- PDO_ATTR_SERVER_INFO
-
-
- STRING
- The human-readable description of the Server.
-
-
-
-
- PDO_ATTR_CONNECTION_STATUS
-
-
- LONG
- Values not yet defined
-
-
-
-
- PDO_ATTR_CASE
-
-
- LONG
- Processed and handled by PDO.
-
-
-
-
- PDO_ATTR_CURSOR_NAME
-
-
- STRING
-
- String representing the name for a database cursor for use in
- where current in <name> SQL statements.
-
-
-
-
-
- PDO_ATTR_CURSOR
-
-
- LONG
-
-
- PDO_CURSOR_FWDONLY
-
- Forward only cursor
-
-
-
- PDO_CURSOR_SCROLL
-
- Scrollable cursor
-
-
-
-
-
-
-
-
-
- The values for the attributes above are all defined in terms of the Zend
- API. The Zend API contains macros that can be used to convert a *zval to a
- value. These macros are defined in the Zend header file, zend_API.h in the
- Zend directory of your PHP build directory. Some of these attributes can be
- used with the statement attribute handlers such as the PDO_ATTR_CURSOR and
- PDO_ATTR_CURSOR_NAME. See the statement attribute handling functions for
- more information.
-
-
-
diff --git a/internals2/pdo/error-handling.xml b/internals2/pdo/error-handling.xml
deleted file mode 100644
index f4028e23788c..000000000000
--- a/internals2/pdo/error-handling.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
- Error handling
-
- Error handling is implemented using a hand-shaking protocol between
- PDO and the database driver code. The database driver code
- signals PDO that an error has occurred via a failure
- (0) return from any of the interface functions. If a zero
- is returned, set the field error_code in the control
- block appropriate to the context (either the pdo_dbh_t or pdo_stmt_t block).
- In practice, it is probably a good idea to set the field in both blocks to
- the same value to ensure the correct one is getting used.
-
-
-
- The error_mode field is a six-byte field containing a 5 character ASCIIZ
- SQLSTATE identifier code. This code drives the error message process. The
- SQLSTATE code is used to look up an error message in the internal PDO error
- message table (see pdo_sqlstate.c for a list of error codes and their
- messages). If the code is not known to PDO, a default
- Unknown Message value will be used.
-
-
-
- In addition to the SQLSTATE code and error message, PDO will
- call the driver-specific fetch_err() routine to obtain supplemental data
- for the particular error condition. This routine is passed an array into
- which the driver may place additional information. This array has slot
- positions assigned to particular types of supplemental info:
-
-
-
-
-
- A native error code. This will frequently be an error code obtained
- from the database API.
-
-
-
-
- A descriptive string. This string can contain any additional
- information related to the failure. Database drivers typically include
- information such as an error message, code location of the failure, and
- any additional descriptive information the driver developer feels
- worthy of inclusion. It is generally a good idea to include all
- diagnostic information obtainable
- from the database interface at the time of the failure. For
- driver-detected errors (such as memory allocation problems), the driver
- developer can define whatever error information that seems appropriate.
-
-
-
-
-
diff --git a/internals2/pdo/implementing.xml b/internals2/pdo/implementing.xml
deleted file mode 100644
index 7f1e3d883964..000000000000
--- a/internals2/pdo/implementing.xml
+++ /dev/null
@@ -1,1293 +0,0 @@
-
-
-
- Fleshing out your skeleton
-
- Major Structures and Attributes
-
- The major structures, pdo_dbh_t and pdo_stmt_t are defined and explained in
- Appendix A and B respectively. Database and Statement attributes are
- defined in Appendix C. Error handling is explained in Appendix D.
-
-
-
-
- pdo_SKEL.c: PHP extension glue
-
- function entries
-
-
- This structure is used to register functions into the global php function
- namespace. PDO drivers should try to avoid doing this, so it is
- recommended that you leave this structure initialized to NULL, as shown in
- the synopsis above.
-
-
-
- Module entry
- = 220050617
-static zend_module_dep pdo_SKEL_deps[] = {
- ZEND_MOD_REQUIRED("pdo")
- {NULL, NULL, NULL}
-};
-#endif
-/* }}} */
-
-zend_module_entry pdo_SKEL_module_entry = {
-#if ZEND_EXTENSION_API_NO >= 220050617
- STANDARD_MODULE_HEADER_EX, NULL,
- pdo_SKEL_deps,
-#else
- STANDARD_MODULE_HEADER,
-#endif
- "pdo_SKEL",
- pdo_SKEL_functions,
- PHP_MINIT(pdo_SKEL),
- PHP_MSHUTDOWN(pdo_SKEL),
- NULL,
- NULL,
- PHP_MINFO(pdo_SKEL),
- PHP_PDO__MODULE_VERSION,
- STANDARD_MODULE_PROPERTIES
-};
-/* }}} */
-
-#ifdef COMPILE_DL_PDO_
-ZEND_GET_MODULE(pdo_db)
-#endif]]>
-
- A structure of type zend_module_entry called
- pdo_SKEL_module_entry must be declared and should include reference to
- the pdo_SKEL_functions table defined previously.
-
-
-
-
- Standard PHP Module Extension Functions
-
- PHP_MINIT_FUNCTION
-
-
- This standard PHP extension function should be used to register your
- driver with the PDO layer. This is done by calling the
- php_pdo_register_driver function passing a pointer to
- a structure of type pdo_driver_t typically named
- pdo_SKEL_driver. A pdo_driver_t
- contains a header that is generated using the
- PDO_DRIVER_HEADER(SKEL) macro and
- pdo_SKEL_handle_factory function pointer. The
- actual function is described during the discussion of the
- SKEL_dbh.c unit.
-
-
-
-
- PHP_MSHUTDOWN_FUNCTION
-
-
- This standard PHP extension function is used to unregister your driver
- from the PDO layer. This is done by calling the
- php_pdo_unregister_driver function, passing the same
- pdo_SKEL_driver structure that was passed in the
- init function above.
-
-
-
- PHP_MINFO_FUNCTION
-
- This is again a standard PHP extension function. Its purpose is to
- display information regarding the module when the
- phpinfo is called from a script. The convention is
- to display the version
- of the module and also what version of the db you are dependent on, along
- with any other configuration style information that might be relevant.
-
-
-
-
-
- SKEL_driver.c: Driver implementation
-
-
- This unit implements all of the database handling methods that support the
- PDO database handle object. It also contains the error fetching routines.
- All of these functions will typically need to access the global variable
- pool. Therefore, it is necessary to use the Zend macro TSRMLS_DC macro at
- the end of each of these statements. Consult the Zend programmer
- documentation for more information on this macro.
-
-
-
- pdo_SKEL_error
-
-
-
-
- The purpose of this function is to be used as a generic error handling
- function within the driver. It is called by the driver when an error occurs
- within the driver. If an error occurs that is not related to SQLSTATE, the
- driver should set either dbh->error_code or
- stmt->error_code to an
- SQLSTATE that most closely matches the error or the generic SQLSTATE error
- HY000. The file pdo_sqlstate.c in the PDO source contains a table
- of commonly used SQLSTATE codes that the PDO code explicitly recognizes.
- This setting of the error code should be done prior to calling this
- function.; This function should set the global
- pdo_err variable to the error found in either the
- dbh or the stmt (if the variable stmt is not NULL).
-
-
-
-
- dbh
-
- Pointer to the database handle initialized by the handle factory
-
-
-
- stmt
-
- Pointer to the current statement or NULL. If NULL, the error is derived by error code found in the dbh.
-
-
-
- file
-
- The source file where the error occurred or NULL if not available.
-
-
-
- line
-
- The line number within the source file if available.
-
-
-
-
- If the dbh member methods is NULL (which implies that the error is being
- raised from within the PDO constructor), this function should call the
- zend_throw_exception_ex() function otherwise it should return the error
- code. This function is usually called using a helper macro that customizes
- the calling sequence for either database handling errors or statement
- handling errors.
-
-
-
- Example macros for invoking pdo_SKEL_error
-
-
-
-
- For more info on error handling, see .
-
-
-
- Despite being documented here, the PDO driver interface does not specify
- that this function be present; it is merely a convenient way to handle
- errors, and it just happens to be equally convenient for the majority of
- database client library APIs to structure your driver implementation in
- this way.
-
-
-
-
- pdo_SKEL_fetch_error_func
-
-
-
- The purpose of this function is to obtain additional information about the
- last error that was triggered. This includes the driver specific error
- code and a human readable string. It may also include additional
- information if appropriate. This function is called as a result of the PHP
- script calling the PDO::errorInfo method.
-
-
-
-
- dbh
-
- Pointer to the database handle initialized by the handle factory
-
-
-
- stmt
-
-
- Pointer to the most current statement or NULL. If NULL, the error
- translated is derived by error code found in the dbh.
-
-
-
-
- info
-
- A hash table containing error codes and messages.
-
-
-
-
-
- The error_func should return two pieces of information as successive array
- elements. The first item is expected to be a numeric error code, the second
- item is a descriptive string. The best way to set this item is by using
- add_next_index. Note that the type of the first argument need not be
- long; use whichever type most closely matches the error code
- returned by the underlying database API.
-
-
-
-
-
- This function should return 1 if information is available, 0 if the driver
- does not have additional info.
-
-
-
- SKEL_handle_closer
-
-
-
- This function will be called by PDO to close an open
- database.
-
-
-
-
- dbh
-
- Pointer to the database handle initialized by the handle factory
-
-
-
-
- This should do whatever database specific activity that needs to be
- accomplished to close the open database. PDO ignores the return
- value from this function.
-
-
-
-
- SKEL_handle_preparer
-
-
-
- This function will be called by PDO in response to
- PDO::query and PDO::prepare
- calls from the PHP script. The purpose of the function is to prepare
- raw SQL for execution, storing whatever state is appropriate into the
- stmt that is passed in.
-
-
-
-
- dbh
-
- Pointer to the database handle initialized by the handle factory
-
-
-
- sql
-
- Pointer to a character string containing the SQL statement to be prepared.
-
-
-
- sql_len
-
- The length of the SQL statement.
-
-
-
- Stmt
-
- Pointer to the returned statement or NULL if an error occurs.
-
-
-
- driver_options
-
- Any driver specific/defined options.
-
-
-
-
- This function is essentially the constructor for a stmt object. This
- function is responsible for processing statement options, and setting
- driver-specific option fields in the pdo_stmt_t structure.
-
-
- PDO does not process any statement options on the driver's
- behalf before calling the preparer function. It is your responsibility to
- process them before you return, raising an error for any unknown options that
- are passed.
-
-
- One very important responsibility of this function is the processing of SQL
- statement parameters. At the time of this call, PDO does not know if your
- driver supports binding parameters into prepared statements, nor does it
- know if it supports named or positional parameter naming conventions.
-
-
- Your driver is responsible for setting
- stmt->supports_placeholders as appropriate for the
- underlying database. This may involve some run-time determination on the
- part of your driver, if this setting depends on the version of the database
- server to which it is connected. If your driver doesn't directly support
- both named and positional parameter conventions, you should use the
- pdo_parse_params API to have PDO rewrite the query to
- take advantage of the support provided by your database.
-
-
- Using pdo_parse_params
- supports_placeholders = PDO_PLACEHOLDER_POSITIONAL;
- ret = pdo_parse_params(stmt, (char*)sql, sql_len, &nsql, &nsql_len TSRMLS_CC);
-
- if (ret == 1) {
- /* query was re-written */
- sql = nsql;
- } else if (ret == -1) {
- /* couldn't grok it */
- strcpy(dbh->error_code, stmt->error_code);
- return 0;
- }
-
- /* now proceed to prepare the query in "sql" */
-]]>
-
-
- Possible values for supports_placeholders are:
- PDO_PLACEHOLDER_NAMED,
- PDO_PLACEHOLDER_POSITIONAL and
- PDO_PLACEHOLDER_NONE. If the driver doesn't support prepare statements at all, then this function should simply allocate any state that it might need, and then return:
-
-
- Implementing preparer for drivers that don't support native prepared statements
- driver_data;
- pdo_SKEL_stmt *S = ecalloc(1, sizeof(pdo_SKEL_stmt));
-
- S->H = H;
- stmt->driver_data = S;
- stmt->methods = &SKEL_stmt_methods;
- stmt->supports_placeholders = PDO_PLACEHOLDER_NONE;
-
- return 1;
-}
-]]>
-
-
- This function returns 1 on success or 0 on failure.
-
-
- SKEL_handle_doer
-
-
-
- This function will be called by PDO to execute a raw SQL
- statement. No pdo_stmt_t is created.
-
-
-
-
- dbh
-
- Pointer to the database handle initialized by the handle factory
-
-
-
- sql
-
- Pointer to a character string containing the SQL statement to be prepared.
-
-
-
- sql_len
-
- The length of the SQL statement.
-
-
-
-
-
- This function returns 1 on success or 0 on failure.
-
-
-
-
- SKEL_handle_quoter
-
-
-
- This function will be called by PDO to turn an unquoted
- string into a quoted string for use in a query.
-
-
-
-
- dbh
-
- Pointer to the database handle initialized by the handle factory
-
-
-
- unquoted
-
- Pointer to a character string containing the string to be quoted.
-
-
-
- unquoted_len
-
- The length of the string to be quoted.
-
-
-
- quoted
-
- Pointer to the address where a pointer to the newly quoted string will be returned.
-
-
-
- quoted_len
-
- The length of the new string.
-
-
-
- param_type
-
- A driver specific hint for driver that have alternate quoting styles
-
-
-
-
- This function is called in response to a call to
- PDO::quote or when the driver has set
- supports_placeholder to
- PDO_PLACEHOLDER_NONE. The purpose is to quote a
- parameter when building SQL statements.
-
-
- If your driver does not support native prepared statements, implementation
- of this function is required.
-
-
- This function returns 1 if the quoting process reformatted the string, and
- 0 if it was not necessary to change the string. The original string will be
- used unchanged with a 0 return.
-
-
-
- SKEL_handle_begin
-
-
-
- This function will be called by PDO to begin a database transaction.
-
-
-
- dbh
-
- Pointer to the database handle initialized by the handle factory
-
-
-
-
- This should do whatever database specific activity that needs to be
- accomplished to begin a transaction. This function returns 1 for success or
- 0 if an error occurred.
-
-
-
- SKEL_handle_commit
-
-
- This function will be called by PDO to end a database
- transaction.
-
-
-
-
- dbh
-
- Pointer to the database handle initialized by the handle factory
-
-
-
-
-
- This should do whatever database specific activity that needs to be
- accomplished to commit a transaction. This function returns 1 for success or 0 if an error occurred.
-
-
-
- SKEL_handle_rollback
-
- This function will be called by PDO to rollback a database transaction.
-
-
- dbh
-
- Pointer to the database handle initialized by the handle factory
-
-
-
-
- This should do whatever database specific activity that needs to be
- accomplished to rollback a transaction. This function returns 1 for
- success or 0 if an error occurred.
-
-
-
- SKEL_handle_get_attribute
-
- This function will be called by PDO to retrieve a database attribute.
-
-
-
- dbh
-
- Pointer to the database handle initialized by the handle factory
-
-
-
- attr
-
-
- long value of one of the PDO_ATTR_xxxx types. See for valid attributes.
-
-
-
-
- return_value
-
- The returned value for the attribute.
-
-
-
-
- It is up to the driver to decide which attributes will be supported for a
- particular implementation. It is not necessary for a driver to supply this
- function. PDO driver handles the PDO_ATTR_PERSISTENT, PDO_ATTR_CASE,
- PDO_ATTR_ORACLE_NULLS, and PDO_ATTR_ERRMODE attributes directly.
-
-
- This function returns 1 on success or 0 on failure.
-
-
-
- SKEL_handle_set_attribute
- static int SKEL_handle_set_attribute(pdo_dbh_t *dbh, long attr, zval *val TSRMLS_DC)
-
- This function will be called by PDO to set a database attribute, usually in
- response to a script calling PDO::setAttribute.
-
-
-
- dbh
-
- Pointer to the database handle initialized by the handle factory
-
-
-
- attr
-
-
- long value of one of the PDO_ATTR_xxxx types. See for valid attributes.
-
-
-
-
- val
-
- The new value for the attribute.
-
-
-
-
-
- It is up to the driver to decide which attributes will be supported for a
- particular implementation. It is not necessary for a driver to provide this
- function if it does not need to support additional attributes. The PDO
- driver handles the PDO_ATTR_CASE, PDO_ATTR_ORACLE_NULLS, and
- PDO_ATTR_ERRMODE attributes directly.
-
-
-
- This function returns 1 on success or 0 on failure.
-
-
-
-
- SKEL_handle_last_id
-
-
- This function will be called by PDO to retrieve the ID of the last inserted
- row.
-
-
-
-
- dbh
-
- Pointer to the database handle initialized by the handle factory
-
-
-
- name
-
-
- string representing a table or sequence name.
-
-
-
-
- len
-
- the length of the name parameter.
-
-
-
-
-
- This function returns a character string containing the id of the last
- inserted row on success or NULL on failure. This is an optional function.
-
-
-
-
- SKEL_check_liveness
-
-
-
-
- This function will be called by PDO to test whether or not a persistent
- connection to a database is alive and ready for use.
-
-
-
-
- dbh
-
- Pointer to the database handle initialized by the handle factory
-
-
-
-
-
- This function returns 1 if the database connection is alive and ready
- for use, otherwise it should return 0 to indicate failure or lack
- of support.
-
-
-
-
- This is an optional function.
-
-
-
-
-
-
- SKEL_get_driver_methods
-
-
- This function will be called by PDO in response to a call to any method
- that is not a part of either the PDO or
- PDOStatement classes. It's purpose is to allow the
- driver to provide additional driver specific methods to those classes.
-
-
-
-
- dbh
-
- Pointer to the database handle initialized by the handle factory
-
-
-
- kind
-
- One of the following:
-
-
- PDO_DBH_DRIVER_METHOD_KIND_DBH
-
-
- Set when the method call was attempted on an instance of the
- PDO class. The driver should return a pointer
- a function_entry table for any methods it wants to add to that class,
- or NULL if there are none.
-
-
-
-
- PDO_DBH_DRIVER_METHOD_KIND_STMT
-
-
- Set when the method call was attempted on an instance of the
- PDOStatement class. The driver should return
- a pointer to a function_entry table for any methods it wants to add
- to that class, or NULL if there are none.
-
-
-
-
-
-
-
-
-
- This function returns a pointer to the function_entry table requested,
- or NULL there are no driver specific methods.
-
-
-
-
- SKEL_handle_factory
-
-
- This function will be called by PDO to create a database handle. For most
- databases this involves establishing a connection to the database. In some
- cases, a persistent connection may be requested, in other cases connection
- pooling may be requested. All of these are database/driver dependent.
-
-
-
-
- dbh
-
- Pointer to the database handle initialized by the handle factory
-
-
-
- driver_options
-
-
- An array of driver options, keyed by integer option number. See for a list of possible attributes.
-
-
-
-
-
-
-
- This function should fill in the passed database handle structure with its
- driver specific information on success and return 1, otherwise it should
- return 0 to indicate failure.
-
-
- PDO processes the AUTOCOMMIT and PERSISTENT driver options
- before calling the handle_factory. It is the handle factory's
- responsibility to process other options.
-
-
-
-
- Driver method table
-
- A static structure of type pdo_dbh_methods named SKEL_methods must be
- declared and initialized to the function pointers for each defined
- function. If a function is not supported or not implemented the value for
- that function pointer should be set to NULL.
-
-
-
-
- pdo_SKEL_driver
-
- A structure of type pdo_driver_t named pdo_SKEL_driver should be declared.
- The PDO_DRIVER_HEADER(SKEL) macro should be used to declare the header and
- the function pointer to the handle factory function should set.
-
-
-
-
- SKEL_statement.c: Statement implementation
-
- This unit implements all of the database statement handling methods that
- support the PDO statement object.
-
-
- SKEL_stmt_dtor
-
-
-
- This function will be called by PDO to destroy a previously constructed statement object.
-
-
-
- stmt
-
- Pointer to the statement structure initialized by SKEL_handle_preparer.
-
-
-
-
-
- This should do whatever is necessary to free up any driver specific storage
- allocated for the statement. The return value from this function is
- ignored.
-
-
-
-
- SKEL_stmt_execute
-
-
- This function will be called by PDO to execute the prepared SQL statement
- in the passed statement object.
-
-
-
- stmt
-
- Pointer to the statement structure initialized by SKEL_handle_preparer.
-
-
-
-
-
- This function returns 1 for success or 0 in the event of failure.
-
-
-
- SKEL_stmt_fetch
- static int SKEL_stmt_fetch(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori,
- long offset TSRMLS_DC)
-
-
- This function will be called by PDO to fetch a row from a previously
- executed statement object.
-
-
-
-
- stmt
-
- Pointer to the statement structure initialized by SKEL_handle_preparer.
-
-
-
-
- ori
-
- One of PDO_FETCH_ORI_xxx which will determine which row will be fetched.
-
-
-
-
- offset
-
-
- If ori is set to PDO_FETCH_ORI_ABS or PDO_FETCH_ORI_REL, offset
- represents the row desired or the row relative to the current position,
- respectively. Otherwise, this value is ignored.
-
-
-
-
-
-
- The results of this fetch are driver dependent and the data is usually
- stored in the driver_data member of the pdo_stmt_t object. The ori and
- offset parameters are only meaningful if the statement represents a
- scrollable cursor. This function returns 1 for success or 0 in the event of
- failure.
-
-
-
- SKEL_stmt_param_hook
-
-
-
- This function will be called by PDO for handling of both bound parameters and bound columns.
-
-
-
-
- stmt
-
- Pointer to the statement structure initialized by SKEL_handle_preparer.
-
-
-
-
- param
-
-
- The structure describing either a statement parameter or a bound column.
-
-
-
-
-
- event_type
-
- The type of event to occur for this parameter, one of the following:
-
-
-
- PDO_PARAM_EVT_ALLOC
-
- Called when PDO allocates the binding. Occurs as part of
- PDOStatement::bindParam,
- PDOStatement::bindValue or as part of an implicit bind
- when calling PDOStatement::execute. This is your
- opportunity to take some action at this point; drivers that implement
- native prepared statements will typically want to query the parameter
- information, reconcile the type with that requested by the script,
- allocate an appropriately sized buffer and then bind the parameter to
- that buffer. You should not rely on the type or value of the zval at
- param->parameter at this point in time.
-
-
-
-
- PDO_PARAM_EVT_FREE
-
- Called once per parameter as part of cleanup. You should
- release any resources associated with that parameter now.
-
-
-
- PDO_PARAM_EXEC_PRE
-
- Called once for each parameter immediately before calling
- SKEL_stmt_execute; take this opportunity to make any final adjustments
- ready for execution. In particular, you should note that variables
- bound via PDOStatement::bindParam are only legal
- to touch now, and not any sooner.
-
-
-
-
- PDO_PARAM_EXEC_POST
-
- Called once for each parameter immediately after calling
- SKEL_stmt_execute; take this opportunity to make any post-execution
- actions that might be required by your driver.
-
-
-
- PDO_PARAM_FETCH_PRE
-
- Called once for each parameter immediately prior to calling
- SKEL_stmt_fetch.
-
-
-
- PDO_PARAM_FETCH_POST
-
- Called once for each parameter immediately after calling
- SKEL_stmt_fetch.
-
-
-
-
-
-
-
-
-
- This hook will be called for each bound parameter and bound column in the
- statement. For ALLOC and FREE events, a single call will be made for each
- parameter or column. The param structure contains a driver_data field that
- the driver can use to store implementation specific information about each
- of the parameters.
-
-
- For all other events, PDO may call you multiple times as the script issues
- PDOStatement::execute and
- PDOStatement::fetch calls.
-
-
- If this is a bound parameter, the is_param flag in the param structure is
- set, otherwise the param structure refers to a bound column.
-
-
- This function returns 1 for success or 0 in the event of failure.
-
-
-
-
- SKEL_stmt_describe_col
-
-
-
- This function will be called by PDO to query information about a particular
- column.
-
-
-
-
- stmt
-
- Pointer to the statement structure initialized by SKEL_handle_preparer.
-
-
-
- colno
-
- The column number to be queried.
-
-
-
-
- The driver should populate the pdo_stmt_t member columns(colno) with the
- appropriate information. This function returns 1 for success or 0 in the
- event of failure.
-
-
-
-
- SKEL_stmt_get_col_data
-
-
- This function will be called by PDO to retrieve data from the specified column.
-
-
-
- stmt
-
- Pointer to the statement structure initialized by SKEL_handle_preparer.
-
-
-
- colno
-
- The column number to be queried.
-
-
-
- ptr
-
- Pointer to the retrieved data.
-
-
-
- len
-
- The length of the data pointed to by ptr.
-
-
-
- caller_frees
-
- If set, ptr should point to emalloc'd memory and the main PDO driver will free it as soon as it is done with it. Otherwise, it will be the responsibility of the driver to free any allocated memory as a result of this call.
-
-
-
-
- The driver should return the resultant data and length of that data in the
- ptr and len variables respectively. It should be noted that the main PDO
- driver expects the driver to manage the lifetime of the data. This function
- returns 1 for success or 0 in the event of failure.
-
-
-
- SKEL_stmt_set_attr
- static int SKEL_stmt_set_attr(pdo_stmt_t *stmt, long attr, zval *val TSRMLS_DC)
-
-
- This function will be called by PDO to allow the setting of driver specific
- attributes for a statement object.
-
-
-
-
- stmt
-
- Pointer to the statement structure initialized by SKEL_handle_preparer.
-
-
-
- attr
-
-
- long value of one of the PDO_ATTR_xxxx types. See for valid attributes.
-
-
-
-
- val
-
- The new value for the attribute.
-
-
-
-
-
-
- This function is driver dependent and allows the driver the capability to
- set database specific attributes for a statement. This function returns 1
- for success or 0 in the event of failure. This is an optional function. If
- the driver does not support additional settable attributes, it can be
- NULLed in the method table. The PDO driver does not handle any settable
- attributes on the database driver's behalf.
-
-
-
- SKEL_stmt_get_attr
-
-
- This function will be called by PDO to allow the retrieval of driver
- specific attributes for a statement object.
-
-
-
-
- stmt
-
- Pointer to the statement structure initialized by SKEL_handle_preparer.
-
-
-
- attr
-
-
- long value of one of the PDO_ATTR_xxxx types. See for valid attributes.
-
-
-
-
- return_value
-
- The returned value for the attribute.
-
-
-
-
-
- This function is driver dependent and allows the driver the capability to
- retrieve a previously set database specific attribute for a statement. This
- function returns 1 for success or 0 in the event of failure. This is an
- optional function. If the driver does not support additional gettable
- attributes, it can be NULLed in the method table. The PDO driver does not
- handle any settable attributes on the database driver's behalf.
-
-
-
- SKEL_stmt_get_col_meta
-
-
-
- This function is not well defined and is subject to change.
-
-
-
-
- This function will be called by PDO to retrieve meta data from the
- specified column.
-
-
-
- stmt
-
- Pointer to the statement structure initialized by SKEL_handle_preparer.
-
-
-
- colno
-
- The column number for which data is to be retrieved.
-
-
-
- return_value
-
- Holds the returned meta data.
-
-
-
-
-
- The driver author should consult the documentation for this function that can be
- found in the php_pdo_driver.h header as this will be the most current. This
- function returns SUCCESS for success or FAILURE in the event of failure. The database
- driver does not need to provide this function.
-
-
-
-
- Statement handling method table
-
- A static structure of type pdo_stmt_methods named SKEL_stmt_methods should
- be declared and initialized to the function pointers for each defined
- function. If a function is not supported or not implemented the value for
- that function pointer should be set to NULL.
-
-
-
-
-
diff --git a/internals2/pdo/index.xml b/internals2/pdo/index.xml
deleted file mode 100644
index ef6c38e163e8..000000000000
--- a/internals2/pdo/index.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
- PDO Driver How-To
-
-
- The purpose of this How-To is to provide a basic understanding of the steps
- required to write a database driver that interfaces with the PDO layer.
- Please note that this is still an evolving API and as such, subject to
- change. This document was prepared based on version 0.3 of PDO.
- The learning curve is steep; expect to spend a lot of time on the
- prerequisites.
-
-
-
-
- &internals2.pdo.prerequisites;
- &internals2.pdo.preparation;
- &internals2.pdo.implementing;
- &internals2.pdo.building;
- &internals2.pdo.testing;
- &internals2.pdo.packaging;
- &internals2.pdo.pdo-dbh-t;
- &internals2.pdo.pdo-stmt-t;
-
- &internals2.pdo.constants;
- &internals2.pdo.error-handling;
-
-
-
-
-
diff --git a/internals2/pdo/packaging.xml b/internals2/pdo/packaging.xml
deleted file mode 100644
index 87def749bc34..000000000000
--- a/internals2/pdo/packaging.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-
- Packaging and distribution
-
- Creating a package
-
- PDO drivers are released via PECL; all the usual rules for PECL extensions
- apply. Packaging is accomplished by creating a valid
- package.xml file and then running:
-
-
-
-
-
-
-
- This will create a tarball named PDO_SKEL-X.Y.Z.tgz.
-
-
-
- Before releasing the package, you should test that it builds correctly; if
- you've made a mistake in your config.m4 or
- package.xml files, the package may not function
- correctly. You can test the build, without installing anything, using the
- following invocation:
-
-
-
-
-
-
- Once this is proven to work, you can test installation:
-
-
-
-
-
-
- Full details about package.xml can be found in the PEAR
- Programmer's documentation ().
-
-
-
-
- Releasing the package
-
- A PDO driver is released via the PHP Extension Community Library (PECL).
- Information about PECL can be found at .
-
-
-
-
diff --git a/internals2/pdo/pdo-dbh-t.xml b/internals2/pdo/pdo-dbh-t.xml
deleted file mode 100644
index bc7e1710340f..000000000000
--- a/internals2/pdo/pdo-dbh-t.xml
+++ /dev/null
@@ -1,205 +0,0 @@
-
-
-
- pdo_dbh_t definition
-
- All fields should be treated as read-only by the driver, unless explicitly
- stated otherwise.
-
-
- pdo_dbh_t
-
-/* represents a connection to a database */
-struct _pdo_dbh_t {
- /* driver specific methods */
- struct pdo_dbh_methods *methods;
- /* driver specific data */
- void *driver_data;
-
- /* credentials */
- char *username, *password;
-
- /* if true, then data stored and pointed at by this handle must all be
- * persistently allocated */
- unsigned is_persistent:1;
-
- /* if true, driver should act as though a COMMIT were executed between
- * each executed statement; otherwise, COMMIT must be carried out manually
- * */
- unsigned auto_commit:1;
-
- /* if true, the driver requires that memory be allocated explicitly for
- * the columns that are returned */
- unsigned alloc_own_columns:1;
-
- /* if true, commit or rollBack is allowed to be called */
- unsigned in_txn:1;
-
- /* max length a single character can become after correct quoting */
- unsigned max_escaped_char_length:3;
-
- /* data source string used to open this handle */
- const char *data_source;
- unsigned long data_source_len;
-
- /* the global error code. */
- pdo_error_type error_code;
-
- enum pdo_case_conversion native_case, desired_case;
-};
-
-
-
-
-
- The driver must set this during
- SKEL_handle_factory.
-
-
-
-
- This item is for use by the driver; the intended usage is to store a
- pointer (during SKEL_handle_factory)
- to whatever instance data is required to maintain a connection to
- the database.
-
-
-
-
- The username and password that were passed into the PDO constructor.
- The driver should use these values when it initiates a connection to the
- database.
-
-
-
-
- If this is set to 1, then any data that is referenced by the
- dbh, including whatever structure your driver allocates,
- MUST be allocated persistently. This is easy to
- achieve; rather than using the usual emalloc simply
- use pemalloc and pass the value of this flag as the
- last parameter. Failure to use the appropriate kind of memory can lead
- to serious memory faults, resulting (in the best case) a hard crash, and
- in the worst case, an exploitable memory problem.
-
-
- If, for whatever reason, your driver is not suitable to run persistently,
- you MUST check this flag in your
- SKEL_handle_factory and raise an appropriate error.
-
-
-
-
- You should check this value in your SKEL_handle_doer
- and SKEL_stmt_execute functions; if it evaluates to
- true, you must attempt to commit the query now. Most database
- implementations offer an auto-commit mode that handles this automatically.
-
-
-
-
- If your database client library API operates by fetching data into a
- caller-supplied buffer, you should set this flag to 1 during your
- SKEL_handle_factory. When set, PDO will call your
- SKEL_stmt_describer earlier than it would
- otherwise. This early call allows you to determine those buffer sizes
- and issue appropriate calls to the database client library.
-
-
- If your database client library API simply returns pointers to its own
- internal buffers for you to copy after each fetch call, you should leave
- this value set to 0.
-
-
-
-
- If your driver doesn't support native prepared statements
- (supports_placeholders is set to
- PDO_PLACEHOLDER_NONE), you must set
- this value to the maximum length that can be taken up by a single
- character when it is quoted by your
- SKEL_handle_quoter function. This value is used to
- calculate the amount of buffer space required when PDO executes the
- statement.
-
-
-
-
- This holds the value of the DSN that was passed into the PDO
- constructor. If your driver implementation needed to modify the DSN for
- whatever reason, it should update this member during
- SKEL_handle_factory. Modifying this member should
- be avoided. If you do change it, you must ensure that
- data_source_len is also correct.
-
-
-
-
- Whenever an error occurs during a call to one of your driver methods,
- you should set this member to the SQLSTATE code that best describes the
- error and return an error. In this HOW-TO, the suggested practice is to
- call SKEL_handle_error when an error is detected,
- and have it set the error code.
-
-
-
-
- Your driver should set this during
- SKEL_handle_factory; the value should reflect how
- the database returns the names of the columns in result sets. If the
- name matches the case that was used in the query, set it to
- PDO_CASE_NATURAL (this is actually the default).
- If the column names are always returned in upper case, set it to
- PDO_CASE_UPPER. If the column names are always
- returned in lower case, set it to PDO_CASE_LOWER.
- The value you set is used to determine if PDO should perform case
- folding when the user sets the PDO_ATTR_CASE
- attribute.
-
-
-
-
-
diff --git a/internals2/pdo/pdo-stmt-t.xml b/internals2/pdo/pdo-stmt-t.xml
deleted file mode 100644
index ba4b3f506c2c..000000000000
--- a/internals2/pdo/pdo-stmt-t.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-
-
-
- pdo_stmt_t definition
-
- All fields should be treated as read-only unless explicitly stated
- otherwise.
-
-
- pdo_stmt_t
-
-/* represents a prepared statement */
-struct _pdo_stmt_t {
- /* driver specifics */
- struct pdo_stmt_methods *methods;
- void *driver_data;
-
- /* if true, we've already successfully executed this statement at least
- * once */
- unsigned executed:1;
- /* if true, the statement supports placeholders and can implement
- * bindParam() for its prepared statements, if false, PDO should
- * emulate prepare and bind on its behalf */
- unsigned supports_placeholders:2;
-
- /* the number of columns in the result set; not valid until after
- * the statement has been executed at least once. In some cases, might
- * not be valid until fetch (at the driver level) has been called at least once.
- * */
- int column_count;
- struct pdo_column_data *columns;
-
- /* points at the dbh that this statement was prepared on */
- pdo_dbh_t *dbh;
-
- /* keep track of bound input parameters. Some drivers support
- * input/output parameters, but you can't rely on that working */
- HashTable *bound_params;
- /* When rewriting from named to positional, this maps positions to names */
- HashTable *bound_param_map;
- /* keep track of PHP variables bound to named (or positional) columns
- * in the result set */
- HashTable *bound_columns;
-
- /* not always meaningful */
- long row_count;
-
- /* used to hold the statement's current query */
- char *query_string;
- int query_stringlen;
-
- /* the copy of the query with expanded binds ONLY for emulated-prepare drivers */
- char *active_query_string;
- int active_query_stringlen;
-
- /* the cursor specific error code. */
- pdo_error_type error_code;
-
- /* used by the query parser for driver specific
- * parameter naming (see pgsql driver for example) */
- const char *named_rewrite_template;
-};
-
-
-
-
-
- The driver must set this during
- SKEL_handle_preparer.
-
-
-
-
- This item is for use by the driver; the intended usage is to store a
- pointer (during SKEL_handle_factory)
- to whatever instance data is required to maintain a connection to
- the database.
-
-
-
-
- This is set by PDO after the statement has been executed for the first
- time. Your driver can inspect this value to determine if it can skip
- one-time actions as an optimization.
-
-
-
-
- Discussed in more detail in .
-
-
-
-
- Your driver is responsible for setting this field to the number of
- columns available in a result set. This is usually set during
- SKEL_stmt_execute but with some database
- implementations, the column count may not be available until
- SKEL_stmt_fetch has been called at least once.
- Drivers that implement SKEL_stmt_next_rowset should
- update the column count when a new rowset is available.
-
-
-
-
- PDO will allocate this field based on the value that you set for the
- column count. You are responsible for populating each column during
- SKEL_stmt_describe. You must set the
- precision, maxlen,
- name, namelen and
- param_type members for each column.
- The name is expected to be allocated using
- emalloc; PDO will call efree at
- the appropriate time.
-
-
-
-
-
diff --git a/internals2/pdo/preparation.xml b/internals2/pdo/preparation.xml
deleted file mode 100644
index 2cc14d97e872..000000000000
--- a/internals2/pdo/preparation.xml
+++ /dev/null
@@ -1,191 +0,0 @@
-
-
-
- Preparation and Housekeeping
-
- Source directory layout
-
-
- The source directory for a typical PDO driver is laid out as follows, where
- SKEL represents a shortened form of the name of the
- database that the driver is going to connect to. Even though SKEL is
- presented here in uppercase (for clarity), the convention is to use
- lowercase characters.
-
-
-
-
- The contents of these files are defined later in this document.
-
-
- Creating a skeleton
-
-
- The easiest way to get started is to use the ext_skel
- shell script found in the PHP build tree in the ext
- directory. This will build a skeleton directory containing a lot of the
- files listed above. It can be build by executing the following command from
- within the ext directory:
-
-
-
-
-
- This will generate a directory called pdo_SKEL containing the
- skeleton files that you can then modify. This directory should then be
- moved out of the php extension directory. PDO is a PECL extension and
- should not be included in the standard extension directory. As long as you
- have PHP and PDO installed, you should be able to build from any directory.
-
-
-
- Standard Includes
-
- Build Specific Headers
-
- The header file config.h is generated by the configure process for the
- platform for the which the driver is being built. If this header is
- present, the HAVE_CONFIG_H compiler variable is set. This variable should
- be tested for and if set, the file config.h should be included in the
- compilation unit.
-
-
-
- PHP Headers
-
- The following standard public php headers should be included in each
- source module:
-
-
-
- php.h
-
-
- php_ini.h
-
-
- ext/standard/info.h
-
-
-
-
- PDO Interface Headers
-
- The following standard public PDO header files are also included in each
- source module:
-
-
-
- pdo/php_pdo.h
-
-
- This header file contains definitions of the initialization and shutdown
- functions in the main driver as well as definitions of global PDO
- variables.
-
-
-
-
- pdo/php_pdo_driver.h
-
-
- This header contains the types and API contracts that are used to write
- a PDO driver. It also contains method signature for calling back into
- the PDO layer and registering/unregistering your driver with
- PDO. Most importantly, this header file contains the type
- definitions for PDO database handles and statements. The two main
- structures a driver has to deal with, pdo_dbh_t and pdo_stmt_t, are
- described in more detail in Appendix A and B.
-
-
-
-
-
-
- Driver Specific Headers
-
- The typical PDO driver has two header files that are specific to the
- database implementation. This does not preclude the use of more depending
- on the implementation. The following two headers are, by convention,
- standard:
-
-
-
- php_pdo_SKEL.h
-
-
- This header file is virtually an exact duplicate in functionality
- and content of the previously defined pdo/php_pdo.h that has been
- specifically tailored for your database. If your driver requires
- the use of global variables they should be defined using the
- ZEND_BEGIN_MODULE_GLOBALS and ZEND_END_MODULE_GLOBALS macros.
- Macros are then used to access these variables. This macro is
- usually named PDO_SKEL_G(v) where v is global variable to be
- accessed. Consult the Zend programmer documentation for more
- information.
-
-
-
-
- php_pdo_SKEL_int.h
-
-
- This header file typically contains type definitions and function
- declarations specific to the driver implementation. It also should
- contain the db specific definitions of a pdo_SKEL_handle and
- pdo_SKEL_stmt structures. These are the names of the private
- data structures that are then referenced by the driver_data members
- of the handle and statement structures.
-
-
-
-
-
-
- Optional Headers
-
- Depending on the implementation details for a particular driver it may be
- necessary to include the following header:
-
-
-
-]]>
-
-
-
-
-
diff --git a/internals2/pdo/prerequisites.xml b/internals2/pdo/prerequisites.xml
deleted file mode 100644
index 2179a38d02b6..000000000000
--- a/internals2/pdo/prerequisites.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
- Prerequisites
-
- The following is list of prerequisites and assumptions needed for writing
- a PDO database driver:
-
-
-
-
- A working target database, examples, demos, etc. working as per vendor
- specifications;
-
-
-
- A working development environment:
-
-
- Linux: standard development tools, gcc, ld, make, autoconf, automake, etc., versions dependent on distribution;
-
-
- Other Unix: standard development tools supplied by vendor plus the GNU development tool set;
-
-
- Win32: Visual Studio compiler suite;
-
-
-
-
- A working PHP environment version 5.0.3 or higher with a working PEAR extension version 1.3.5 or higher;
-
-
- A working PDO environment (can be installed using 'sudo pecl install PDO'), including the headers which will be needed to access the PDO type definitions and function declarations;
-
-
- A good working knowledge of the C programming language;
-
-
- A good working knowledge of the way to write a PHP extension;
- George Schlossnagle'sAdvanced PHP Programming (published by
- Developer's Library, chapters 21 and 22) is recommended;
-
-
-
- Finally, a familiarity with the Zend API that forms the heart of PHP, in
- particular paying attention to the memory management aspects.
-
-
-
-
-
diff --git a/internals2/pdo/testing.xml b/internals2/pdo/testing.xml
deleted file mode 100644
index a08f0845695c..000000000000
--- a/internals2/pdo/testing.xml
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
- Testing
-
- PDO has a set of "core" tests that all drivers should pass before being
- released. They're designed to run from the PHP source distribution, so
- running the tests for your driver requires moving things around a bit.
- The suggested procedure is to obtain the latest PHP 5.1 snapshot and
- perform the following step:
-
-
-
-
- This will allow the test harness to run your tests. The next thing you
- need to do is create a test that will redirect into the PDO common core tests.
- The convention is to name this file common.phpt; it
- should be placed in the tests subdirectory that was created by
- ext_skel when you created your extension skeleton.
- The content of this file should look something like the following:
-
-
---REDIRECTTEST--
-if (false !== getenv('PDO_SKEL_TEST_DSN')) {
-# user set them from their shell
- $config['ENV']['PDOTEST_DSN'] = getenv('PDO_SKEL_TEST_DSN');
- $config['ENV']['PDOTEST_USER'] = getenv('PDO_SKEL_TEST_USER');
- $config['ENV']['PDOTEST_PASS'] = getenv('PDO_SKEL_TEST_PASS');
- if (false !== getenv('PDO_SKEL_TEST_ATTR')) {
- $config['ENV']['PDOTEST_ATTR'] = getenv('PDO_SKEL_TEST_ATTR');
- }
- return $config;
-}
-return array(
- 'ENV' => array(
- 'PDOTEST_DSN' => 'SKEL:dsn',
- 'PDOTEST_USER' => 'username',
- 'PDOTEST_PASS' => 'password'
- ),
- 'TESTS' => 'ext/pdo/tests'
- );
-]]>
-
-
- This will cause the common core tests to be run, passing the values of
- PDOTEST_DSN, PDOTEST_USER and
- PDOTEST_PASS to the PDO constructor as the
- dsn, username and
- password parameters. It will first check the environment, so
- that appropriate values can be passed in when the test harness is run,
- rather than hard-coding the database credentials into the test file.
-
-
-
- The test harness can be invoked as follows:
-
-
-
-
-
-
diff --git a/internals2/resources/index.xml b/internals2/resources/index.xml
deleted file mode 100644
index f4ce7bb3cdf4..000000000000
--- a/internals2/resources/index.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
- Working with Resources
-
- This section will serve to introduce the Hacker to the concept and usage of Resources in PHP.
-
-
-
-
diff --git a/internals2/streams/index.xml b/internals2/streams/index.xml
deleted file mode 100644
index 1c039f603b45..000000000000
--- a/internals2/streams/index.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
- Working with streams
-
-
-
- Information on using streams within the PHP source code can be found in the
- Streams API for PHP Extension Authors reference.
-
-
-
-
-
-
diff --git a/internals2/structure/basics.xml b/internals2/structure/basics.xml
deleted file mode 100644
index 8afaffa45ce6..000000000000
--- a/internals2/structure/basics.xml
+++ /dev/null
@@ -1,154 +0,0 @@
-
-
-
- Basic constructs
-
-
- C is a very low-level language by modern definitions. This means that it has
- no built-in support for many features that PHP takes for granted, such as
- reflection, dynamic module loading, bounds checking, threadsafe data
- management and various useful data structures including linked lists and
- hash tables. At the same time, C is a common denominator of language support
- and functionality. Given enough work, none of these concepts are impossible;
- the Zend Engine uses them all.
-
-
-
- A lot of effort has gone into making the Zend API both extensible and
- understandable, but C forces certain necessary declarations upon any
- extension that to an inexperienced eye seem redundant or plain unnecessary.
- All of those constructs, detailed in this section, are "write once and
- forget" in Zend Engine 2 and 3. Here are some excerpts from the pre-generated
- php_counter.h and counter.c files
- created by PHP 5.3's ext_skel, showing the pre-generated
- declarations:
-
-
-
-
- The astute reader will notice that there are several declarations in the
- real files that aren't shown here. Those declarations are specific to
- various Zend subsystems and are discussed elsewhere as appropriate.
-
-
-
-
-= 4
-# define PHP_COUNTER_API __attribute__ ((visibility("default")))
-#else
-# define PHP_COUNTER_API
-#endif
-
-#ifdef ZTS
-#include "TSRM.h"
-#endif
-]]>
-
-
-
-
-
-
- The lines concerning counter_module_entry declare a
- global variable, and a macroed pointer to it, which contains the
- zend_module_entry for the extension. Despite the later
- discussion regarding the drawbacks of "true" globals, this usage is
- intentional; Zend takes precautions to avoid misusing this variable.
-
-
-
-
- PHP_COUNTER_API is declared for use by non-PHP
- functions the module intends to export for the use of other modules. The
- counter extension doesn't declare any of these, and in the final version of
- the header file, this macro has been removed. The
- PHPAPI macro is declared identically elsewhere and is
- used by the standard extension to make the phpinfo
- utility functions available to other extensions.
-
-
-
-
- The include of TSRM.h is skipped if PHP, or the
- extension, isn't being compiled with thread-safety, since in that case TSRM
- isn't used.
-
-
-
-
- A standard list of includes, especially the extension's own
- php_counter.h, is given. config.h
- gives the extension access to determinations made by
- configure. php.h is the gateway to
- the entire PHP and Zend APIs. php_ini.h adds the APIs
- for runtime configuration (INI) entries. Not all extensions will use this.
- Finally, ext/standard/info.h imports the
- aforementioned phpinfo utility API.
-
-
-
-
- COMPILE_DL_COUNTER will only be defined by
- configure if the counter extension is both enabled and
- wants to be built as a dynamically loadable module instead of being
- statically linked into PHP. ZEND_GET_MODULE defines a
- tiny function which Zend can use to get the extension's
- zend_module_entry at runtime.
-
-
-
- The astute reader who has peeked into
- main/php_config.h after trying to build with the
- counter module enabled statically may have noticed that there is also a
- HAVE_COUNTER constant defined that the source code
- doesn't check for. There's a simple reason this check isn't done: It's
- unnecessary. If the extension isn't enabled, the source file will never be
- compiled.
-
-
-
-
-
-
-
-
diff --git a/internals2/structure/files.xml b/internals2/structure/files.xml
deleted file mode 100644
index 9befa197c05e..000000000000
--- a/internals2/structure/files.xml
+++ /dev/null
@@ -1,157 +0,0 @@
-
-
-
- Files which make up an extension
-
- Whether created by hand, using ext_skel, or by an
- alternate extension generator, such as
- CodeGen,
- all extensions will have at least four files:
-
-
-
-
- config.m4
-
-
- UNIX build system configuration (see
- )
-
-
-
-
-
- config.w32
-
-
- Windows buildsystem configuration (see
- )
-
-
-
-
-
- php_counter.h
-
-
- When building an extension as static module into the PHP binary the
- build system expects a header file with php_
- prepended to the extension name which includes a declaration for a
- pointer to the extension's module structure. This file usually contains
- additional macros, prototypes, and globals, just like any header.
-
-
-
-
-
- counter.c
-
-
- Main extension source file. By convention, the name of this file
- is the extension name, but this is not a requirement. This file
- contains the module structure declaration, INI entries, management
- functions, userspace functions, and other requirements of an extension.
-
-
-
-
-
-
- The buildsystem files are discussed elsewhere; this section concentrates on
- the rest. These four files make up the bare minimum for an extension, which
- may also contain any number of headers, source files, unit tests, and other
- support files. The list of files in the counter extension might look like
- this:
-
-
-
- Files in the counter extension, in no particular order
-
-
-
-
-
-
- Non-source files
-
- The .svnignore file is used for extensions which are
- checked into the PHP Subversion repository (usually
- &link.pecl;); the one generated by ext_skel contains:
-
-
-
-
-
-
-
-
-
- These lines tell Subversion to ignore interim files generated
- by the PHP buildsystem. This is only a convenience, and can be omitted
- completely without ill effect.
-
-
-
- The CREDITS file lists the contributors and/or
- maintainers of the extension in plain text format. The main purpose of
- this file is generating the credits information for bundled extensions as
- used by phpcredits. By convention the first line of
- the file should hold the name of the extension, the second a comma
- separated list of contributors. The contributors are usually ordered by the
- chronological order of their contributions. In a &link.pecl; package,
- this information is already maintained in package.xml,
- for example. This is another file which can be omitted without ill effect.
-
-
-
- The package.xml file is specific to &link.pecl;-based
- extensions; it is a metainformation file which gives details about an
- extension's dependencies, authors, installation requirements, and other
- tidbits. In an extension not being hosted in &link.pecl;, this file is
- extraneous.
-
-
-
-
-
-
diff --git a/internals2/structure/globals.xml b/internals2/structure/globals.xml
deleted file mode 100644
index cfb032c29f63..000000000000
--- a/internals2/structure/globals.xml
+++ /dev/null
@@ -1,239 +0,0 @@
-
-
-
- Extension globals
-
-
- Introduction to globals in a PHP extension
-
-
- In a language such as C, a "global" variable is a variable that can be
- accessed from any function without any extra declaration. These traditional
- globals have a few drawbacks:
-
-
-
-
-
-
- Barring any special options passed to the compiler, a global variable can
- be accessed and changed by any piece of code anywhere in the program,
- whether or not that code should be doing so.
-
-
-
-
-
- A typical global variable is not thread safe.
-
-
-
-
-
- The names of global variables are as global as the variables themselves.
-
-
-
-
-
-
- A PHP extension's globals are more properly called the "extension state",
- since most modules must remember what they're doing between function calls.
- The "counter" extension is a perfect example of this need: The basic
- interface calls for a counter with a persistent value. A programmer new to
- Zend and PHP might do something like this in counter.c
- to store that value:
-
-
-
- The wrong way to store the basic counter interface's value
-
-
-
-
-
-
- On the surface this appears a viable solution, and indeed in a simple test
- it would function correctly. However, there are a number of situations in
- which more than one copy of PHP is running in the same thread, which means
- more than one instance of the counter module. Suddenly these multiple
- threads are sharing the same counter value, which is clearly undesirable.
- Another problem shows itself when considering that another extension might
- someday happen to have a global with the same name, and due to the rules of
- C scoping, this has the potential to cause a compile failure, or worse, a
- runtime error. Something more elaborate is needed, and so exists Zend's
- support for thread-safe per-module globals.
-
-
-
-
-
- Declaring module globals
-
-
- Whether a module uses only a single global or dozens, they must be defined
- in a structure, and that structure must be declared. There are some macros
- that assist with doing so in a way that avoids name conflicts between
- modules: ZEND_BEGIN_MODULE_GLOBALS,
- ZEND_END_MODULE_GLOBALS, and
- ZEND_DECLARE_MODULE_GLOBALS. All three take as a
- parameter the short name of the module, which in the case of the counter
- module is simply "counter". Here is the global structure
- declaration from php_counter.h:
-
-
-
- The counter module's globals
-
-
-
-
-
-
- And this is the declaration from counter.c:
-
-
-
- The counter module's global structure declaration
-
-
-
-
-
-
-
-
- Accessing module globals
-
-
- As discussed above, per-module globals are declared inside a C structure
- whose name is obscured by Zend macros. As a result, the ideal way to access
- members of this structure is by the use of further macros. Accordingly, most
- if not all extensions which have globals have a declaration like this
- somewhere in their header file:
-
-
-
- Accessor macros for per-module globals
-
-
-
-
-
-
-
- This could have been generalized into a macro of its own by the Zend API,
- but as of PHP 5.3 (and PHP 6 at the time of this writing), that hasn't
- happened. The global accessor construct is written into the header by
- ext_skel and thus is generally left alone by extension
- writers, unless they wish to change the name of the accessor macro.
-
-
-
-
-
- COUNTER_G was the name given to the macro by
- ext_skel, but it's not necessary for it to have that
- name and could just as easily be called FOO instead.
-
-
-
-
- Any code in the counter extension that accesses a global must thus wrap it
- in the macro COUNTER_G.
-
-
-
-
- Any function which accesses globals must either be declared by Zend macros,
- have TSRMLS_DC as its last argument, or call the macro
- TSRMLS_FETCH before accessing the globals. See
- the TSRM documentation for
- more information.
-
-
-
-
- So with all of that in mind, here is our new version of the
- counter_get:
-
-
-
- The right way to store the basic counter interface's value
-
-
-
-
-
-
- This is a correct implementation. It is not, however, a complete one. The
- section explains why.
-
-
-
-
-
-
-
diff --git a/internals2/structure/index.xml b/internals2/structure/index.xml
deleted file mode 100644
index d982452a5e44..000000000000
--- a/internals2/structure/index.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
- Extension structure
-
- Many extension-writing guides focus on simple examples first and ignore the
- requirements of more complex implementations until later. Often such guides
- must repeat themselves over and over in order to describe these new
- features. This section describes extension structure from the perspective of
- a mature, practical implementation, in order to prepare users for needs and
- issues they will almost always encounter in the process of extension
- development.
-
-
- &internals2.structure.files;
- &internals2.structure.basics;
- &internals2.structure.modstruct;
- &internals2.structure.globals;
- &internals2.structure.lifecycle;
- &internals2.structure.tests;
-
-
-
-
diff --git a/internals2/structure/lifecycle.xml b/internals2/structure/lifecycle.xml
deleted file mode 100644
index 7c5912aad8af..000000000000
--- a/internals2/structure/lifecycle.xml
+++ /dev/null
@@ -1,219 +0,0 @@
-
-
-
- Life cycle of an extension
-
-
- A PHP extension goes through several phases during its lifetime. All of
- these phases are opportunities for the developer to perform various
- initialization, termination, or informational functions. The Zend API allows
- for hooks into five separate phases of an extension's existence, apart from
- calls by PHP functions.
-
-
-
- Loading, unloading, and requests
-
-
- As the Zend engine runs, it processes one or more "requests" from its
- client. In the traditional CGI implementation, this corresponds to one
- execution of a process. However, many other implementations, most notably
- the Apache module, can map many requests onto a single PHP process. A PHP
- extension may thus see many requests in its lifetime.
-
-
-
-
- Overview
-
-
-
-
- In the Zend API, a module is loaded into memory only once when the
- associated PHP process starts up. Each module receives a call to the
- "module initialization" function specified in its
- zend_module structure as it is loaded.
-
-
-
-
-
- Whenever the associated PHP process starts to handle a request from its
- client - i.e. whenever the PHP interpreter is told to start working - each
- module receives a call to the "request initialization" function specified
- in its zend_module structure.
-
-
-
-
-
- Whenever the associated PHP process is done handling a request, each
- module receives a call to the "request termination" function specified in
- its zend_module structure.
-
-
-
-
-
- A given module is unloaded from memory when its associated PHP process is
- shut down in an orderly manner. The module receives a call to the "module
- termination" function specified in its
- zend_module structure at this time.
-
-
-
-
-
-
-
- What to do, and when to do it
-
-
- There are many tasks that might be performed at any of these four points.
- This table details where many common initialization and termination tasks
- belong.
-
-
-
- What to do, and when to do it
-
-
-
- Module initialization/termination
- Request initialization/termination
-
-
-
-
- Allocate/deallocate and initialize module global variables
-
- Allocate/deallocate and initialize request-specific variables
-
-
-
- Register/unregister class entries
-
-
-
- Register/unregister INI entries
-
-
-
- Register constants
-
-
-
-
-
-
-
-
-
- The phpinfo callback
-
-
- Aside from globals initialization and certain rarely-used callbacks, there
- is one more part of a module's lifecycle to examine: A call to
- phpinfo. The output a user sees from this call, whether
- text or HTML or anything else, is generated by each individual extension
- that is loaded into the PHP interpreter at the time the call is made.
-
-
-
- To provide for format-neutral output, the header
- "ext/standard/info.h" provides an array of functions to produce
- standardized display elements. Specifically, several functions which create
- the familiar tables exist:
-
-
-
-
- php_info_print_table_start
-
-
- Open a table in phpinfo output. Takes no parameters.
-
-
-
-
- php_info_print_table_header
-
-
- Print a table header in phpinfo output. Takes one
- parameter, the number of columns, plus the same number of
- char * parameters which are the texts for each column
- heading.
-
-
-
-
- php_info_print_table_row
-
-
- Print a table row in phpinfo output. Takes one
- parameter, the number of columns, plus the same number of
- char * parameters which are the texts for each column
- content.
-
-
-
-
- php_info_print_table_end
-
-
- Close a table formerly opened by
- php_info_print_table_start. Takes no parameters.
-
-
-
-
-
-
- Using these four functions, it is possible to produce status information for
- nearly any combination of features in an extension. Here is the information
- callback from the counter extension:
-
-
-
- counter's PHP_MINFO function
-
-
-
-
-
-
-
-
-
diff --git a/internals2/structure/modstruct.xml b/internals2/structure/modstruct.xml
deleted file mode 100644
index 9b1806b4bc7d..000000000000
--- a/internals2/structure/modstruct.xml
+++ /dev/null
@@ -1,593 +0,0 @@
-
-
-
- The zend_module structure
-
- The main source file of a PHP extension contains several new constructs for
- a C programmer. The most important of these, the one touched first when
- starting a new extension, is the zend_module structure.
- This structure contains a wealth of information that tells the Zend Engine
- about the extension's dependencies, version, callbacks, and other critical
- data. The structure has mutated considerably over time; this section will
- focus on the structure as it has appeared since PHP 5.2, and will identify
- the very few parts which have changed in PHP 5.3.
-
-
-
- The zend_module declaration from
- counter.c looks like this before any code has been
- written. The example file was generated by
- ext_skel --extname=counter, with some obsolete constructs
- removed:
-
-
-
- zend_module declaration in the counter extension
-
-
-
-
-
-
- This may look a bit daunting at first glance, but most of it is very simple
- to understand. Here's the declaration of zend_module from
- zend_modules.h in PHP 5.3:
-
-
-
- zend_module definition in PHP 5.3
-
-
-
-
-
-
- Many of these fields will never be touched by an extension writer. There are
- a number of standard macros that set them to their proper values
- automatically. The macro STANDARD_MODULE_HEADER fills in
- everything up to the deps field. Alternatively, the
- STANDARD_MODULE_HEADER_EX will leave the
- deps field empty for the developer's use. The developer is
- always responsible for everything from name to
- version. After that, the
- STANDARD_MODULE_PROPERTIES macro will fill in the rest
- of the structure, or the STANDARD_MODULE_PROPERTIES_EX
- macro can be used to leave the extension globals and post-deactivation
- function fields unfilled. Most modern extensions will make use of module
- globals.
-
-
-
-
- This table gives the values that each field would have if the developer
- were to fill in the structure entirely by hand, without recourse to any of
- the shortcut macros. This is not recommended. The
- "correct" values for many fields may change. Use the macros
- whenever possible.
-
-
-
-
- Module structure field values
-
-
-
- Field
- Value
- Description
-
-
-
-
-
-
- size
-
-
- This field is not intended for use by module developers.
-
-
-
-
- This field is filled in by STANDARD_MODULE_HEADER_EX.
-
-
-
-
- This field is filled in by STANDARD_MODULE_HEADER.
-
-
-
- sizeof(zend_module_entry)
-
- The size in bytes of the structure.
-
-
-
-
-
- zend_api
-
-
-
-
- ZEND_MODULE_API_NO
-
- The version of the Zend API this module was compiled against.
-
-
-
-
-
- zend_debug
-
-
-
-
- ZEND_DEBUG
-
- A flag indicating whether the module was compiled with debugging turned
- on.
-
-
-
-
-
- zts
-
-
-
-
- USING_ZTS
-
- A flag indicating whether the module was compiled with ZTS (TSRM) enabled
- (see ).
-
-
-
-
-
- ini_entry
-
-
-
- &null;
-
- This pointer is used internally by Zend to keep a non-local reference to
- any INI entries declared for the module.
-
-
-
-
-
- deps
-
-
- &null;
-
- A pointer to a list of dependencies for the module.
-
-
-
-
-
- name
-
- "mymodule"
-
- The name of the module. This is the short name, such as "spl"
- or "standard".
-
-
-
-
-
- functions
-
- mymodule_functions
-
- A pointer to the module's function table, which Zend uses to expose
- functions in the module to user space.
-
-
-
-
-
- module_startup_func
-
- PHP_MINIT(mymodule)
-
- A callback function that Zend will call the first time a module is loaded
- into a particular instance of PHP.
-
-
-
-
-
- module_shutdown_func
-
- PHP_MSHUTDOWN(mymodule)
-
- A callback function that Zend will call the when a module is unloaded
- from a particular instance of PHP, typically during final shutdown.
-
-
-
-
-
- request_startup_func
-
- PHP_RINIT(mymodule)
-
- A callback function that Zend will call at the beginning of each request.
- This should be as short as possible or NULL as calling this has costs
- on every request.
-
-
-
-
-
- request_shutdown_func
-
- PHP_RSHUTDOWN(mymodule)
-
- A callback function that Zend will call at the end of each request.
- This should be as short as possible or NULL as calling this has costs
- on every request.
-
-
-
-
-
- info_func
-
- PHP_MINFO(mymodule)
-
- A callback function that Zend will call when the phpinfo
- function is called.
-
-
-
-
-
- version
-
- NO_VERSION_YET
-
- A string giving the version of the module, as specified by the module
- developer. It is recommended that the version number be either in the
- format expected by version_compare() (e.g. "1.0.5-dev"), or a
- CVS or SVN revision number (e.g. "$Rev$").
-
-
-
-
-
- globals_size
-
-
-
- This field is filled in by STANDARD_MODULE_PROPERTIES.
-
-
-
-
- This field is filled in by NO_MODULE_GLOBALS.
-
-
-
-
- This field is filled in by PHP_MODULE_GLOBALS.
-
-
-
- sizeof(zend_mymodule_globals)
-
- The size of the data structure containing the module's globals, if any.
-
-
-
-
-
- globals_id_ptr
-
-
-
-
-
-
- This field only exists when USING_ZTS is &true;.
-
-
-
- &mymodule_globals_id
-
- Only one of these two fields will exist, depending upon whether the
- USING_ZTS constant is &true;. The former is an index
- into TSRM's allocation table for the module's globals, and the latter is
- a pointer directly to the globals.
-
-
-
-
-
- globals_ptr
-
-
-
-
-
-
- This field only exists when USING_ZTS is &false;.
-
-
-
- &mymodule_globals
-
-
-
-
- globals_ctor
-
-
-
-
- PHP_GINIT(mymodule)
-
- This funtion is called to initialize a module's globals before
- any module_startup_func.
-
-
-
-
-
- globals_dtor
-
-
-
-
- PHP_GSHUTDOWN(mymodule)
-
- This funtion is called to deallocate a module's globals after
- any module_shutdown_func.
-
-
-
-
-
- post_deactivate_func
-
-
- ZEND_MODULE_POST_ZEND_DEACTIVATE_N(mymodule)
-
- This function is called by Zend after request shutdown. It is rarely used.
-
-
-
-
-
- module_started
-
-
-
- This field is filled in by STANDARD_MODULE_PROPERTIES_EX.
-
-
-
-
- 0
-
- These fields are used for Zend's internal tracking information.
-
-
-
-
-
- type
-
-
-
-
- 0
-
-
-
-
- handle
-
-
-
-
- &null;
-
-
-
-
- module_number
-
-
-
-
- 0
-
-
-
-
-
-
-
- Filling in the structure in a practical situation
-
-
- With all these fields to play with, it can be confusing to know which to use
- for what purpose. Here is the zend_module definition from
- the "counter" example extension after updating it to its final form.
-
-
-
- Counter extension module definition
-
-
-
-
-
-
-
-
- STANDARD_MODULE_HEADER is used since this module
- doesn't define any dependencies.
-
-
-
-
-
- "counter" is the extension's name, and is used to define the
- various callback functions the module passes to Zend. "counter" uses
- module, globals, and request functions at startup and shutdown times, and
- provides information to phpinfo, so all seven
- callbacks are defined.
-
-
-
-
-
- It is assumed that there is a variable of type
- zend_function_entry * named
- counter_functions earlier in the file that contains
- the module definition, listing the functions the module exports to
- userspace.
-
-
-
-
-
- NO_VERSION_YET is a particularly nice way of telling
- Zend the module doesn't have a version. It might have been more correct to
- place "1.0" here instead in a real module.
-
-
-
-
-
- "counter" uses per-module globals, so
- PHP_MODULE_GLOBALS is used
-
-
-
-
-
- This module has no post-deactivate function, so &null; is used.
-
-
-
-
-
- Since this module does use globals,
- STANDARD_MODULE_PROPERTIES_EX is used to finish the
- structure.
-
-
-
-
-
-
-
-
- What's changed between 5.2 and 5.3?
-
-
- Nothing. The only differences in the zend_module
- structure between PHP 5.2 and PHP 5.3 are a few const
- keywords.
-
-
-
-
-
-
-
diff --git a/internals2/structure/tests.xml b/internals2/structure/tests.xml
deleted file mode 100644
index 86b1da45b3e0..000000000000
--- a/internals2/structure/tests.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
- Testing an extension
-
-
- One of the accepted requirements of good programming is testing. PHP provides
- a test harness for unit regression tests, in the form of a script called
- run-tests.php.
-
-
-
- Tests for a particular module are stored in the tests/
- subdirectory of the module's folder, and have a .phpt
- extension. For details of the PHPT format, see
- .
-
-
-
-
-
diff --git a/internals2/variables/index.xml b/internals2/variables/index.xml
deleted file mode 100644
index 184326c3d409..000000000000
--- a/internals2/variables/index.xml
+++ /dev/null
@@ -1,925 +0,0 @@
-
-
-
- Working with Variables
-
- Introduction to Variables
-
- A good understanding of how variables are stored and manipulated is essential to becoming a Hacker.
- The engine attempts to cover up the complexity of the concept of a variable that can be any type by
- providing a uniform and intuitive set of macros for accessing the structures various fields. As the Hacker works
- through this chapter, they should become comfortable with the terminology and concepts involved with Variables in PHP.
-
-
- PHP is a dynamic, loosely typed language, that uses copy-on-write and reference counting.
-
-
- To clarify what exactly is meant by the statement above: PHP is a high level language, weak typing is implicit of the engines preference to
- convert, or coerce variables into the required type at execution time. Reference counting is the means by which the engine can deduce when a
- variable no longer has any references in the users code, and so is able to free the structures associated with the variable.
-
-
- All variables in PHP are represented by one structure, the zval:
-
-
-
-
-
- The zval_value is a union which can represent all types a variable may hold:
-
-
-
-
-
- It should be clear from the structures above that a variable can be of one type, the variable data is represented by the appropriate field in the zval_value union. The zval itself holds the type, reference count and a flag to indicate if a variable is a reference.
-
-
- Native Type Constants
-
-
-
- Constant
- Mapping
-
-
-
-
- IS_NULL
- no value is set in this case
-
-
-
- IS_LONG
- lval
-
-
-
- IS_DOUBLE
- dval
-
-
-
- IS_BOOL
- lval
-
-
-
- IS_RESOURCE
- lval
-
-
-
- IS_STRING
- str
-
-
-
- IS_ARRAY
- ht
-
-
-
- IS_OBJECT
- obj
-
-
-
-
-
-
-
- There are additional constants that help to identify internal types such as constant arrays and callable objects, their usage is outside the scope of this part of the documentation.
-
-
-
- The following table defines the macros exposed by the engine for working with zval values:
-
-
-
- Accessor Macros
-
-
-
- Prototype
- Accesses
- Description
-
-
-
-
- zend_uchar Z_TYPE(zval zv)
- type
- returns the type of the value
-
-
-
- long Z_LVAL(zval zv)
- value.lval
-
-
-
-
- zend_bool Z_BVAL(zval zv)
- value.lval
- cast long value to zend_bool
-
-
-
- double Z_DVAL(zval zv)
- value.dval
-
-
-
-
- long Z_RESVAL(zval zv)
- value.lval
- returns the resource list identifier for value
-
-
-
- char* Z_STRVAL(zval zv)
- value.str.val
- return the string value
-
-
-
- int Z_STRLEN(zval zv)
- value.str.len
- return the length of the string value
-
-
-
- HashTable* Z_ARRVAL(zval zv)
- value.ht
- return the HashTable (array) value
-
-
-
- zend_object_value Z_OBJVAL(zval zv)
- value.obj
- returns object value
-
-
-
- uint Z_OBJ_HANDLE(zval zv)
- value.obj.handle
- returns the object handle for object value
-
-
-
- zend_object_handlers* Z_OBJ_HT_P(zval zv)
- value.obj.handlers
- returns the handler table for object value
-
-
-
- zend_class_entry* Z_OBJCE(zval zv)
- value.obj
- returns the class entry for object value
-
-
-
- HashTable* Z_OBJPROP(zval zv)
- value.obj
- returns the properties of object value
-
-
-
- HashTable* Z_OBJPROP(zval zv)
- value.obj
- returns the properties of object value
-
-
-
- HashTable* Z_OBJDEBUG(zval zv)
- value.obj
- if an object has the get_debug_info handler set, it is called, else Z_OBJPROP is called
-
-
-
-
-
-
-
- Please check the chapter for details how reference counting and references work in detail.
-
-
- Reference Count Manipulation
-
-
-
- Prototype
- Description
-
-
-
-
-
- zend_uint Z_REFCOUNT(zval zv)
- returns the reference count of the value
-
-
-
- zend_uint Z_SET_REFCOUNT(zval zv)
- sets the reference count of the value, returning it
-
-
-
- zend_uint Z_ADDREF(zval zv)
- pre-increments the reference count of value, returning it
-
-
-
- zend_uint Z_DELREF(zval zv)
- pre-decrements the reference count of value, returning it
-
-
-
- zend_bool Z_ISREF(zval zv)
- tells if the zval is a reference
-
-
-
- void Z_UNSET_ISREF(zval zv)
- set is_ref__gc to 0
-
-
-
- void Z_SET_ISREF(zval zv)
- set is_ref__gc to 1
-
-
-
- void Z_SET_ISREF_TO(zval zv, zend_uchar to)
- set is_ref__gc to to
-
-
-
-
-
-
-
- The Z_* macros above all take a zval, they are all defined again suffixed with _P to take a pointer to a zval, for example zend_uchar Z_TYPE_P(zval* pzv), and again suffixed with _PP to take a pointer to a pointer to a zval, for example zend_uchar Z_TYPE_PP(zval** ppzv)
-
-
-
- Creation, Destruction, Separation and Copying
-
-
-
- Prototype
- Description
-
-
-
-
-
- ALLOC_ZVAL(zval* pzval)
- emallocs pzval
-
-
-
- ALLOC_INIT_ZVAL(zval* pzval)
- emallocs pzval, and points pzval at a null typed zval for sanity
-
-
-
- MAKE_STD_ZVAL(zval* pzval)
- emallocs pzval, setting the refcount to 1
-
-
-
- ZVAL_COPY_VALUE(zval* dst, zval* src)
- sets the value and type of dst from the value and type of src
-
-
-
- INIT_PZVAL_COPY(zval* dst, zval*dst)
- performs ZVAL_COPY_VALUE, setting refcount of dst to 1, and setting is_ref__gc to 0
-
-
-
- SEPARATE_ZVAL(zval** ppzval)
- if the refcount of ppzval is >1, redirects *ppzval to a newly emalloc'd, copied, and constructed zval of the same type and value
-
-
-
- SEPARATE_ZVAL_IF_NOT_REF(zval** ppzval)
- if *ppzval is not a reference, will perform SEPARATE_ZVAL on ppzval
-
-
-
- SEPARATE_ZVAL_TO_MAKE_IS_REF(zval** ppzval)
- if *ppzval is not a reference, performs SEPARATE_ZVAL then Z_SET_ISREF_PP on ppzval
-
-
-
- COPY_PZVAL_TO_ZVAL(zval dst, zval** src)
- results in dst being a copy of src without affecting the refcount of src
-
-
-
- MAKE_COPY_ZVAL(zval** src, zval* dst)
- performs INIT_PZVAL_COPY, then zval_copy_ctor on the new zval
-
-
-
- void zval_copy_ctor(zval** pzval)
- performs maintenance of reference counts, used widely throughout the engine
-
-
-
- void zval_ptr_dtor(zval* pzval)
- decrements the refcount for the variable, if no refcounts remain the variable is destroyed
-
-
-
- FREE_ZVAL(zval* pzval)
- efrees pzval
-
-
-
-
-
-
-
- Objects and Resources have a reference count as part of their respective structures, when zval_ptr_dtor is called on either, their appropriate del_ref method is executed. See Working with Objects and Working with Resources for more information.
-
-
- If the Hacker only has room to remember two more functions, they should be zval_copy_ctor and zval_ptr_dtor, these are at the basis of the engines reference counting mechanisms and it is important to note that zval_copy_ctor does not actually result in any copying occuring under normal circumstances, it simply increases the reference count. By the same token, zval_ptr_dtor only really destroys a variable when there are no references remaining to it and the refcount is at 0.
-
- PHP is weakly typed, as such the engine provides API functions for converting variables from one type to another.
-
-
-
-
- convert_func_t functions should have the prototype (void) (zval* pzval)
-
-
- By now you should have a good understanding of: the types that are native to the engine, how to detect types and read zval values, how to manipulate refcounts, and other zval flags
-
-
-
-
- Working with Arrays
-
- Arrays are stored in HashTable strucures, and have the zval type IS_ARRAY. The API functions for creating, destroying and manipulating these structures as variables are documented here and can be found in Zend/zend_API.h
-
-
-
- HashTable as Variable API
-
-
-
- Prototype
- Description
-
-
-
-
- void array_init(zval* pzval)
- initializes the variable as a HashTable, setting type and appropriate destructor function for the HashTable
-
-
-
- void array_init_size(zval* pzval)
- initializes the variable as array_init with a minimum of size buckets
-
-
-
-
-
-
-
- Do not squint too hard looking for array_destroy: to destroy a variable array you should call zval_ptr_dtor on the variable, if there are no other references to the variable it will result in the array being destroyed.
-
-
-
- Indexed Arrays API
-
-
-
- Prototype
-
-
-
-
- int add_index_long(zval* pzval, ulong index, long value)
-
-
-
- int add_index_null(zval* pzval, ulong index)
-
-
-
- int add_index_bool(zval* pzval, ulong index, zend_bool value)
-
-
-
- int add_index_bool(zval* pzval, ulong index, zend_bool value)
-
-
-
- int add_index_resource(zval* pzval, ulong index, uint value)
-
-
-
- int add_index_double(zval* pzval, ulong index, double value)
-
-
-
- int add_index_string(zval* pzval, ulong index, char* string, zend_bool duplicate)
-
-
-
- int add_index_stringl(zval* pzval, ulong index, char* string, uint length, zend_bool duplicate)
-
-
-
- int add_index_zval(zval* pzval, ulong index, zval* value)
-
-
-
- int add_next_index_long(zval* pzval, long value)
-
-
-
- int add_next_index_null(zval* pzval)
-
-
-
- int add_next_index_bool(zval* pzval, zend_bool value)
-
-
-
- int add_next_index_resource(zval* pzval, uint value)
-
-
-
- int add_next_index_double(zval* pzval, double value)
-
-
-
- int add_next_index_string(zval* pzval, const char* string, zend_bool dulpicate)
-
-
-
- int add_next_index_stringl(zval* pzval, const char* string, uint length, zend_bool duplicate)
-
-
-
- int add_next_index_zval(zval* pzval, zval* value)
-
-
-
-
-
-
-
- add_*_string functions that accept a parameter named duplicate, will duplicate the string with estrndup when duplicate is true
-
-
-
- add_*_zval functions do not adjust the refcount of the value parameter
-
-
-
- To perform more advanced operations on array variables we must use the HashTable API directly.
-
-
-
-
- Working with HashTable
-
- The HashTable structure serves many purposes in PHP and can be found everywhere, a good understanding of it's functionality is a prerequisite of being a good Hacker.
-
- The HashTable implemented by the engine is a standard HashTable, that is to say, a key => value based store, where the keys are always strings, whose hashes are calculated with a built in hashing algorithm zend_inline_hash_func(const char* key, uint length), which results in good distribution, and reasonable usage.
-
- The internal structure and exact operation of HashTable is out of the scope of this document, this document serves to inform you of the API's available and how best to use them. For a more detailed picture of the HashTable see Zend/zend_hash.h.
-
- Unless otherwise stated, these functions all return FAILURE if the requested operation fails for any reason, otherwise SUCCESS is returned.
-
-
- It is important to remember that ordinarily HashTable API functions expect key lengths to be the length of the null terminated string, including the null termination, in other words they expect strlen(key) + 1
-
-
- Below are some typedefs you should know when interacting with HashTable. They are mostly self explanitory and will allow the Hacker to fully understand the prototypes below properly.
-
-
-
-
-
-
- HashTable API
-
-
-
- int zend_hash_init(HashTable* ht, uint size, hash_func_t hash, dtor_func_t destructor, zend_bool persistent)
-
-
-
- Initializes the hash table to hold at least size elements, hash exists for historical reasons and is always ignored, zend_inline_hash_func is always used as the hashing function. destructor may be NULL.
-
-
-
- int zend_hash_add(HashTable* ht, const char* key, uint klen, void* data, uint dlen, void** dest)
-
-
-
- adds data to the table using the specified key, where the key is length bytes long (and will be copied from key to the table). If the key is set FAILURE will be returned.
-
-
-
- int zend_hash_update(HashTable* ht, const char* key, uint klen, void* data, uint dlen, void** dest)
-
-
-
- adds data to the table using the specified key, where the key is length bytes long (and will be copied from key to the table). If the key has been set previously the old data has dtor_func_t called on it and the existing data is replaced with data
-
-
-
- int zend_hash_find(HashTable* ht, const char* key, uint klen, void** data)
-
-
-
- searches the table for key, setting *data and returning SUCCESS if it is found.
-
-
-
- zend_bool zend_hash_exists(HashTable* ht, const char* key, uint klen)
-
-
-
- returns positively if key is found in ht
-
-
-
- int zend_hash_del(HashTable* ht, const char* key, uint klen)
-
-
-
- removes the entry identified by key from the table if found
-
-
-
- int zend_hash_index_update(HashTable* ht, ulong index, void* data, uint dsize, void** dest)
-
-
-
- updates the entry at index in ht, with the data at data
-
-
-
- int zend_hash_index_del(HashTable* ht, ulong index)
-
-
-
- deletes the entry at index from ht
-
-
-
- int zend_hash_index_find(HashTable* ht, ulong index, void** data)
-
-
-
- redirects *data to the data identified by index in ht
-
-
-
- int zend_hash_index_exists(HashTable* ht, ulong index)
-
-
-
- returns positively if index is found in ht
-
-
-
- ulong zend_hash_next_free_element(HashTable* ht)
-
-
-
- returns the index of the next free element in ht
-
-
-
-
-
-
-
- zend_hash_* functions that accept void* data should normally cast it to (void**) (ie, (void**) &data)
-
-
- Traversing the HashTable is often necessary, to do this you provide a pointer to a HashTable, with an optional HashPosition - a structure internal to the HashTable API that allows traversal not to affect the internal position of HashTable. The following traversal functions are provided, and an example usage found below.
-
-
- HashTable Traversal API
-
-
-
- int zend_hash_internal_pointer_reset(HashTable* ht)
-
-
- resets the internal pointer of ht to the start
-
-
- int zend_hash_internal_pointer_reset_ex(HashTable* ht, HashPosition position)
-
-
- sets position to the start of ht
-
-
- int zend_hash_get_current_data(HashTable* ht, void* data)
-
-
- gets the data at the current position in ht, data should be cast to void**, ie: (void**) &data
-
-
- int zend_hash_get_current_data_ex(HashTable* ht, void* data, HashPosition position)
-
-
- sets data to the data at position in ht
-
-
- int zend_hash_get_current_key(HashTable* ht, void* data, char**key, uint klen, ulong index, zend_bool duplicate)
-
-
- sets key, klen, and index from the key information at the current position. The possible return values HASH_KEY_IS_STRING and HASH_KEY_IS_LONG are indicative of the kind of key found at the current posision.
-
-
- int zend_hash_get_current_key_ex(HashTable* ht, void* data, char**key, uint klen, ulong index, zend_bool duplicate, HashPosition position)
-
-
- sets key, klen, and index from the key information at position. The possible return values HASH_KEY_IS_STRING and HASH_KEY_IS_LONG are indicative of the kind of key found at position.
-
-
- int zend_hash_move_forward(HashTable* ht)
-
-
- moves the internal pointer of ht to the next entry in ht
-
-
- int zend_hash_move_forward_ex(HashTable* ht, HashPosition position)
-
-
- moves position to the next entry in ht
-
-
-
-
-
- The functions above allow traversal over a HashTable to be much like a normal loop, which will look something like:
-
-
-
-
-
-
- If a HashTable has been passed into the engine, it is a good idea to use the zend_hash_*_ex API to avoid unexpected behaviour in userland.
-
-
-
- If a duplicate of the key is requested and HAS_KEY_IS_STRING is returned the caller must efree the duplicated key
-
-
- In addition to traversal, the engine provides API functions for merging, copying, and comparing HashTables. These are all concepts that the Hacker should be familiar with. A concept possibly not in the repertoire of the Hacker is applying, which is lamens terms is functionality of the HashTable API allowing the Hacker to pass a callback function to be executed on every entry in a HashTable.
-
-
- Copying, Merging and Sorting
-
-
-
- void zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size)
-
-
-
- Copies the contents of source to target. tmp should be an unallocated temporary pointer of the appropriate type, used during copying. size is the size of each element.
-
-
-
- void zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size, zend_bool overwrite)
-
-
-
- Merges the contents of source into destination, replacing existing entries only where overwrite is true.
-
-
-
- void int zend_hash_sort(HashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber TSRMLS_DC)
-
-
-
- renumber controls if indexes should be preserved, see the typedefs at the start of this section for more information
-
-
-
-
-
-
-
- When a function accepts a copy_ctor_func_t pCopyConstructor, the function passed with be executed upon creation of every new entry in the HashTable. The most common copy constructor used within the engine is a wrapper around zval_copy_ctor, the macro ZVAL_COPY_CTOR.
-
-
-
-
-
-
- Working with Objects
-
-
-
-
-
-
-
-
diff --git a/internals2/ze1/index.xml b/internals2/ze1/index.xml
deleted file mode 100644
index a02240ef020d..000000000000
--- a/internals2/ze1/index.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
- Zend Engine 1
-
- Zend Engine 1 is the internal engine used by PHP for the entire version 4
- release line. It is no longer considered active, but the old ZE1 documentation
- is preserved here exactly as it was.
-
-
- &internals2.ze1.intro;
- &internals2.ze1.streams.index;
- &internals2.ze1.zendapi.index;
- &internals2.ze1.tsrm.index;
-
-
-
-
diff --git a/internals2/ze1/intro.xml b/internals2/ze1/intro.xml
deleted file mode 100644
index 9133e1d8a959..000000000000
--- a/internals2/ze1/intro.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
- Old introduction
-
- If you are about to begin developing PHP or Zend extensions, you need
- to prepare yourself for the programming environment provided by the
- various APIs. This part of the documentation tries to introduce the APIs
- provided by the different PHP and Zend Engine versions available.
- Since most of the information available here is somewhat outdated,
- you'll want to read various files found in the PHP source, files such
- as README.SELF-CONTAINED-EXTENSIONS and
- README.EXT_SKEL in addition to the manual.
-
-
-
-
diff --git a/internals2/ze1/streams/common.xml b/internals2/ze1/streams/common.xml
deleted file mode 100644
index e3f2c00714c6..000000000000
--- a/internals2/ze1/streams/common.xml
+++ /dev/null
@@ -1,1055 +0,0 @@
-
-
-
-
- Streams Common API Reference
-
-
-
- php_stream_stat_path
- Gets the status for a file or URL
-
-
- Description
-
- intphp_stream_stat_path
- char *path
- php_stream_statbuf *ssb
-
-
- php_stream_stat_path examines the file or URL specified by path
- and returns information such as file size, access and creation times and so on.
- The return value is 0 on success, -1 on error.
- For more information about the information returned, see
- php_stream_statbuf.
-
-
-
-
-
-
- php_stream_stat
- Gets the status for the underlying storage associated with a stream
-
-
- Description
-
- intphp_stream_stat
- php_stream *stream
- php_stream_statbuf *ssb
-
-
- php_stream_stat examines the storage to which stream
- is bound, and returns information such as file size, access and creation times and so on.
- The return value is 0 on success, -1 on error.
- For more information about the information returned, see
- php_stream_statbuf.
-
-
-
-
-
-
-
- php_stream_open_wrapper
- Opens a stream on a file or URL
-
-
- Description
-
- php_stream *php_stream_open_wrapper
- char *path
- char *mode
- intoptions
- char **opened
-
-
- php_stream_open_wrapper opens a stream on the file, URL or
- other wrapped resource specified by path. Depending on
- the value of mode, the stream may be opened for reading,
- writing, appending or combinations of those. See the table below for the different
- modes that can be used; in addition to the characters listed below, you may
- include the character 'b' either as the second or last character in the mode string.
- The presence of the 'b' character informs the relevant stream implementation to
- open the stream in a binary safe mode.
-
-
- The 'b' character is ignored on all POSIX conforming systems which treat
- binary and text files in the same way. It is a good idea to specify the 'b'
- character whenever your stream is accessing data where the full 8 bits
- are important, so that your code will work when compiled on a system
- where the 'b' flag is important.
-
-
- Any local files created by the streams API will have their initial permissions set
- according to the operating system defaults - under Unix based systems
- this means that the umask of the process will be used. Under Windows,
- the file will be owned by the creating process.
- Any remote files will be created according to the URL wrapper that was
- used to open the file, and the credentials supplied to the remote server.
-
-
-
-
-
- r
-
-
-
- Open text file for reading. The stream is positioned at the beginning of
- the file.
-
-
-
-
-
-
- r+
-
-
-
- Open text file for reading and writing. The stream is positioned at the beginning of
- the file.
-
-
-
-
-
-
- w
-
-
-
- Truncate the file to zero length or create text file for writing.
- The stream is positioned at the beginning of the file.
-
-
-
-
-
-
- w+
-
-
-
- Open text file for reading and writing. The file is created if
- it does not exist, otherwise it is truncated. The stream is positioned at
- the beginning of the file.
-
-
-
-
-
-
- a
-
-
-
- Open for writing. The file is created if it does not exist.
- The stream is positioned at the end of the file.
-
-
-
-
-
-
- a+
-
-
-
- Open text file for reading and writing. The file is created if
- it does not exist. The stream is positioned at the end of the file.
-
-
-
-
-
-
-
- options affects how the path/URL of the stream is
- interpreted, safe mode checks and actions taken if there is an error during opening
- of the stream. See Stream open options for
- more information about options.
-
-
- If opened is not NULL, it will be set to a string containing
- the name of the actual file/resource that was opened. This is important when the
- options include USE_PATH, which causes the include_path to be searched for the
- file. You, the caller, are responsible for calling efree on
- the filename returned in this parameter.
-
-
-
- If you specified STREAM_MUST_SEEK in options,
- the path returned in opened may not be the name of the
- actual stream that was returned to you. It will, however, be the name of the original
- resource from which the seekable stream was manufactured.
-
-
-
-
-
-
-
-
- php_stream_read
- Read a number of bytes from a stream into a buffer
-
-
- Description
-
- size_tphp_stream_read
- php_stream *stream
- char *buf
- size_tcount
-
-
- php_stream_read reads up to count
- bytes of data from stream and copies them into the
- buffer buf.
-
-
- php_stream_read returns the number of bytes that were
- read successfully. There is no distinction between a failed read or an end-of-file
- condition - use php_stream_eof to test for an EOF.
-
-
- The internal position of the stream is advanced by the number of bytes that were
- read, so that subsequent reads will continue reading from that point.
-
-
- If less than count bytes are available to be read, this
- call will block (or wait) until the required number are available, depending on the
- blocking status of the stream. By default, a stream is opened in blocking mode.
- When reading from regular files, the blocking mode will not usually make any
- difference: when the stream reaches the EOF
- php_stream_read will return a value less than
- count, and 0 on subsequent reads.
-
-
-
-
-
-
- php_stream_write
- Write a number of bytes from a buffer to a stream
-
-
- Description
-
- size_tphp_stream_write
- php_stream *stream
- const char *buf
- size_tcount
-
-
- php_stream_write writes count
- bytes of data from buf into stream.
-
-
- php_stream_write returns the number of bytes that were
- written successfully. If there was an error, the number of bytes written will be
- less than count.
-
-
- The internal position of the stream is advanced by the number of bytes that were
- written, so that subsequent writes will continue writing from that point.
-
-
-
-
-
-
- php_stream_eof
- Check for an end-of-file condition on a stream
-
-
- Description
-
- intphp_stream_eof
- php_stream *stream
-
-
- php_stream_eof checks for an end-of-file condition
- on stream.
-
-
- php_stream_eof returns the 1 to indicate
- EOF , 0 if there is no EOF and -1 to indicate an error.
-
-
-
-
-
-
- php_stream_getc
- Read a single byte from a stream
-
-
- Description
-
- intphp_stream_getc
- php_stream *stream
-
-
- php_stream_getc reads a single character from
- stream and returns it as an unsigned char cast
- as an int, or EOF if the end-of-file is reached, or an error occurred.
-
-
- php_stream_getc may block in the same way as
- php_stream_read blocks.
-
-
- The internal position of the stream is advanced by 1 if successful.
-
-
-
-
-
-
- php_stream_gets
- Read a line of data from a stream into a buffer
-
-
- Description
-
- char *php_stream_gets
- php_stream *stream
- char *buf
- size_tmaxlen
-
-
- php_stream_gets reads up to count-1
- bytes of data from stream and copies them into the
- buffer buf. Reading stops after an EOF
- or a newline. If a newline is read, it is stored in buf as part of
- the returned data. A NUL terminating character is stored as the last character
- in the buffer.
-
-
- php_stream_read returns buf
- when successful or NULL otherwise.
-
-
- The internal position of the stream is advanced by the number of bytes that were
- read, so that subsequent reads will continue reading from that point.
-
-
- This function may block in the same way as php_stream_read.
-
-
-
-
-
-
- php_stream_close
- Close a stream
-
-
- Description
-
- intphp_stream_close
- php_stream *stream
-
-
- php_stream_close safely closes stream
- and releases the resources associated with it. After stream
- has been closed, it's value is undefined and should not be used.
-
-
- php_stream_close returns 0 if the stream was closed or
- EOF to indicate an error. Regardless of the success of the call,
- stream is undefined and should not be used after a call to
- this function.
-
-
-
-
-
-
- php_stream_flush
- Flush stream buffers to storage
-
-
- Description
-
- intphp_stream_flush
- php_stream *stream
-
-
- php_stream_flush causes any data held in
- write buffers in stream to be committed to the
- underlying storage.
-
-
- php_stream_flush returns 0 if the buffers were flushed,
- or if the buffers did not need to be flushed, but returns EOF
- to indicate an error.
-
-
-
-
-
-
- php_stream_seek
- Reposition a stream
-
-
- Description
-
- intphp_stream_seek
- php_stream *stream
- off_toffset
- intwhence
-
-
- php_stream_seek repositions the internal
- position of stream.
- The new position is determined by adding the offset
- to the position indicated by whence.
- If whence is set to SEEK_SET,
- SEEK_CUR or SEEK_END the offset
- is relative to the start of the stream, the current position or the end of the stream, respectively.
-
-
- php_stream_seek returns 0 on success, but -1 if there was an error.
-
-
-
- Not all streams support seeking, although the streams API will emulate a seek if
- whence is set to SEEK_CUR
- and offset is positive, by calling php_stream_read
- to read (and discard) offset bytes.
-
-
- The emulation is only applied when the underlying stream implementation does not
- support seeking. If the stream is (for example) a file based stream that is wrapping
- a non-seekable pipe, the streams api will not apply emulation because the file based
- stream implements a seek operation; the seek will fail and an error result will be
- returned to the caller.
-
-
-
-
-
-
-
- php_stream_tell
- Determine the position of a stream
-
-
- Description
-
- off_tphp_stream_tell
- php_stream *stream
-
-
- php_stream_tell returns the internal position of
- stream, relative to the start of the stream.
- If there is an error, -1 is returned.
-
-
-
-
-
-
- php_stream_copy_to_stream
- Copy data from one stream to another
-
-
- Description
-
- size_tphp_stream_copy_to_stream
- php_stream *src
- php_stream *dest
- size_tmaxlen
-
-
- php_stream_copy_to_stream attempts to read up to maxlen
- bytes of data from src and write them to dest,
- and returns the number of bytes that were successfully copied.
-
-
- If you want to copy all remaining data from the src stream, pass the
- constant PHP_STREAM_COPY_ALL as the value of maxlen.
-
-
-
- This function will attempt to copy the data in the most efficient manner, using memory mapped
- files when possible.
-
-
-
-
-
-
-
- php_stream_copy_to_mem
- Copy data from stream and into an allocated buffer
-
-
- Description
-
- size_tphp_stream_copy_to_mem
- php_stream *src
- char **buf
- size_tmaxlen
- intpersistent
-
-
- php_stream_copy_to_mem allocates a buffer maxlen+1
- bytes in length using pemalloc (passing persistent).
- It then reads maxlen bytes from src and stores
- them in the allocated buffer.
-
-
- The allocated buffer is returned in buf, and the number of bytes successfully
- read. You, the caller, are responsible for freeing the buffer by passing it and persistent
- to pefree.
-
-
- If you want to copy all remaining data from the src stream, pass the
- constant PHP_STREAM_COPY_ALL as the value of maxlen.
-
-
-
- This function will attempt to copy the data in the most efficient manner, using memory mapped
- files when possible.
-
-
-
-
-
-
-
- php_stream_make_seekable
- Convert a stream into a stream is seekable
-
-
- Description
-
- intphp_stream_make_seekable
- php_stream *origstream
- php_stream **newstream
- intflags
-
-
- php_stream_make_seekable checks if origstream is
- seekable. If it is not, it will copy the data into a new temporary stream.
- If successful, newstream is always set to the stream that is valid to use, even if the original
- stream was seekable.
-
-
- flags allows you to specify your preference for the seekable stream that is
- returned: use PHP_STREAM_NO_PREFERENCE to use the default seekable stream
- (which uses a dynamically expanding memory buffer, but switches to temporary file backed storage
- when the stream size becomes large), or use PHP_STREAM_PREFER_STDIO to
- use "regular" temporary file backed storage.
-
-
-
- php_stream_make_seekable return values
-
-
-
- Value
- Meaning
-
-
-
-
-
- PHP_STREAM_UNCHANGED
- Original stream was seekable anyway. newstream is set to the value
- of origstream.
-
-
-
-
- PHP_STREAM_RELEASED
- Original stream was not seekable and has been released. newstream is set to the
- new seekable stream. You should not access origstream anymore.
-
-
-
-
- PHP_STREAM_FAILED
- An error occurred while attempting conversion. newstream is set to NULL;
- origstream is still valid.
-
-
-
-
- PHP_STREAM_CRITICAL
- An error occurred while attempting conversion that has left origstream in
- an indeterminate state. newstream is set to NULL and it is highly recommended
- that you close origstream.
-
-
-
-
-
-
-
-
-
- If you need to seek and write to the stream, it does not make sense to use this function, because the stream
- it returns is not guaranteed to be bound to the same resource as the original stream.
-
-
-
-
- If you only need to seek forwards, there is no need to call this function, as the streams API will emulate
- forward seeks when the whence parameter is SEEK_CUR.
-
-
-
-
- If origstream is network based, this function will block until the whole contents
- have been downloaded.
-
-
-
-
- NEVER call this function with an origstream that is reference by a file pointer
- in a PHP script! This function may cause the underlying stream to be closed which could cause a crash
- when the script next accesses the file pointer!
-
-
-
-
- In many cases, this function can only succeed when origstream is a newly opened
- stream with no data buffered in the stream layer. For that reason, and because this function is complicated to
- use correctly, it is recommended that you use php_stream_open_wrapper and pass in
- PHP_STREAM_MUST_SEEK in your options instead of calling this function directly.
-
-
-
-
-
-
-
-
- php_stream_cast
- Convert a stream into another form, such as a FILE* or socket
-
-
- Description
-
- intphp_stream_cast
- php_stream *stream
- intcastas
- void **ret
- intflags
-
-
- php_stream_cast attempts to convert stream into
- a resource indicated by castas.
- If ret is NULL, the stream is queried to find out if such a conversion is
- possible, without actually performing the conversion (however, some internal stream state *might*
- be changed in this case).
- If flags is set to REPORT_ERRORS, an error
- message will be displayed is there is an error during conversion.
-
-
-
- This function returns SUCCESS for success or FAILURE
- for failure. Be warned that you must explicitly compare the return value with SUCCESS
- or FAILURE because of the underlying values of those constants. A simple
- boolean expression will not be interpreted as you intended.
-
-
-
-
- Resource types for castas
-
-
-
- Value
- Meaning
-
-
-
-
- PHP_STREAM_AS_STDIO
- Requests an ANSI FILE* that represents the stream
-
-
- PHP_STREAM_AS_FD
- Requests a POSIX file descriptor that represents the stream
-
-
- PHP_STREAM_AS_SOCKETD
- Requests a network socket descriptor that represents the stream
-
-
-
-
-
-
- In addition to the basic resource types above, the conversion process can be altered by using the
- following flags by using the OR operator to combine the resource type with one or more of the
- following values:
-
- Resource types for castas
-
-
-
- Value
- Meaning
-
-
-
-
- PHP_STREAM_CAST_TRY_HARD
- Tries as hard as possible, at the expense of additional resources, to ensure that the conversion succeeds
-
-
- PHP_STREAM_CAST_RELEASE
- Informs the streams API that some other code (possibly a third party library) will be responsible for closing the
- underlying handle/resource. This causes the stream to be closed in such a way the underlying
- handle is preserved and returned in ret. If this function succeeds, stream
- should be considered closed and should no longer be used.
-
-
-
-
-
-
-
-
- If your system supports fopencookie (systems using glibc 2 or later), the streams API
- will always be able to synthesize an ANSI FILE* pointer over any stream.
- While this is tremendously useful for passing any PHP stream to any third-party libraries, such behaviour is not
- portable. You are requested to consider the portability implications before distributing you extension.
- If the fopencookie synthesis is not desirable, you should query the stream to see if it naturally supports FILE*
- by using php_stream_is
-
-
-
-
- If you ask a socket based stream for a FILE*, the streams API will use fdopen to
- create it for you. Be warned that doing so may cause data that was buffered in the streams layer to be
- lost if you intermix streams API calls with ANSI stdio calls.
-
-
-
- See also php_stream_is and php_stream_can_cast.
-
-
-
-
-
-
- php_stream_can_cast
- Determines if a stream can be converted into another form, such as a FILE* or socket
-
-
- Description
-
- intphp_stream_can_cast
- php_stream *stream
- intcastas
-
-
- This function is equivalent to calling php_stream_cast with ret
- set to NULL and flags set to 0.
- It returns SUCCESS if the stream can be converted into the form requested, or
- FAILURE if the conversion cannot be performed.
-
-
-
- Although this function will not perform the conversion, some internal stream state *might* be
- changed by this call.
-
-
-
-
- You must explicitly compare the return value of this function with one of the constants, as described
- in php_stream_cast.
-
-
-
- See also php_stream_cast and php_stream_is.
-
-
-
-
-
-
- php_stream_is_persistent
- Determines if a stream is a persistent stream
-
-
- Description
-
- intphp_stream_is_persistent
- php_stream *stream
-
-
- php_stream_is_persistent returns 1 if the stream is a persistent stream,
- 0 otherwise.
-
-
-
-
-
-
- php_stream_is
- Determines if a stream is of a particular type
-
-
- Description
-
- intphp_stream_is
- php_stream *stream
- intistype
-
-
- php_stream_is returns 1 if stream is of
- the type specified by istype, or 0 otherwise.
-
- Values for istype
-
-
-
- Value
- Meaning
-
-
-
-
- PHP_STREAM_IS_STDIO
- The stream is implemented using the stdio implementation
-
-
- PHP_STREAM_IS_SOCKET
- The stream is implemented using the network socket implementation
-
-
- PHP_STREAM_IS_USERSPACE
- The stream is implemented using the userspace object implementation
-
-
- PHP_STREAM_IS_MEMORY
- The stream is implemented using the grow-on-demand memory stream implementation
-
-
-
-
-
-
-
-
- The PHP_STREAM_IS_XXX "constants" are actually defined as pointers to the underlying
- stream operations structure. If your extension (or some other extension) defines additional
- streams, it should also declare a PHP_STREAM_IS_XXX constant in it's header file that you
- can use as the basis of this comparison.
-
-
-
-
- This function is implemented as a simple (and fast) pointer comparison, and does not change
- the stream state in any way.
-
-
-
- See also php_stream_cast and php_stream_can_cast.
-
-
-
-
-
-
- php_stream_passthru
- Outputs all remaining data from a stream
-
-
- Description
-
- size_tphp_stream_passthru
- php_stream *stream
-
-
- php_stream_passthru outputs all remaining data from stream
- to the active output buffer and returns the number of bytes output.
- If buffering is disabled, the data is written straight to the output, which is the browser making the
- request in the case of PHP on a web server, or stdout for CLI based PHP.
- This function will use memory mapped files if possible to help improve performance.
-
-
-
-
-
-
- php_register_url_stream_wrapper
- Registers a wrapper with the Streams API
-
-
- Description
-
- intphp_register_url_stream_wrapper
- char *protocol
- php_stream_wrapper *wrapper
- TSRMLS_DC
-
-
- php_register_url_stream_wrapper registers wrapper
- as the handler for the protocol specified by protocol.
-
-
-
- If you call this function from a loadable module, you *MUST* call php_unregister_url_stream_wrapper
- in your module shutdown function, otherwise PHP will crash.
-
-
-
-
-
-
-
- php_unregister_url_stream_wrapper
- Unregisters a wrapper from the Streams API
-
-
- Description
-
- intphp_unregister_url_stream_wrapper
- char *protocol
- TSRMLS_DC
-
-
- php_unregister_url_stream_wrapper unregisters the wrapper
- associated with protocol.
-
-
-
-
-
-
- php_stream_open_wrapper_ex
- Opens a stream on a file or URL, specifying context
-
-
- Description
-
- php_stream *php_stream_open_wrapper_ex
- char *path
- char *mode
- intoptions
- char **opened
- php_stream_context *context
-
-
- php_stream_open_wrapper_ex is exactly like
- php_stream_open_wrapper, but allows you to specify a
- php_stream_context object using context.
- To find out more about stream contexts, see
- Stream Contexts.
-
-
-
-
-
-
- php_stream_open_wrapper_as_file
- Opens a stream on a file or URL, and converts to a FILE*
-
-
- Description
-
- FILE *php_stream_open_wrapper_as_file
- char *path
- char *mode
- intoptions
- char **opened
-
-
- php_stream_open_wrapper_as_file is exactly like
- php_stream_open_wrapper, but converts the stream
- into an ANSI stdio FILE* and returns that instead of the stream.
- This is a convenient shortcut for extensions that pass FILE* to third-party libraries.
-
-
-
-
-
- php_stream_filter_register_factory
- Registers a filter factory with the Streams API
-
-
- Description
-
- intphp_stream_filter_register_factory
- const char *filterpattern
- php_stream_filter_factory *factory
-
-
- Use this function to register a filter factory with the name given by
- filterpattern. filterpattern
- can be either a normal string name (i.e. myfilter) or
- a global pattern (i.e. myfilterclass.*) to allow a single
- filter to perform different operations depending on the exact name of the filter
- invoked (i.e. myfilterclass.foo, myfilterclass.bar,
- etc...)
-
-
-
- Filters registered by a loadable extension must be certain to call
- php_stream_filter_unregister_factory() during MSHUTDOWN.
-
-
-
-
-
-
- php_stream_filter_unregister_factory
- Deregisters a filter factory with the Streams API
-
-
- Description
-
- intphp_stream_filter_unregister_factory
- const char *filterpattern
-
-
- Deregisters the filterfactory specified by the
- filterpattern making it no longer available for use.
-
-
-
- Filters registered by a loadable extension must be certain to call
- php_stream_filter_unregister_factory() during MSHUTDOWN.
-
-
-
-
-
-
-
-
diff --git a/internals2/ze1/streams/constants.xml b/internals2/ze1/streams/constants.xml
deleted file mode 100644
index 17686bd8be5c..000000000000
--- a/internals2/ze1/streams/constants.xml
+++ /dev/null
@@ -1,172 +0,0 @@
-
-
-
-
-
- Streams open options
-
-
- These constants affect the operation of stream factory functions.
-
-
-
- IGNORE_PATH
-
-
-
- This is the default option for streams; it requests that the include_path is
- not to be searched for the requested file.
-
-
-
-
-
-
- USE_PATH
-
-
-
- Requests that the include_path is to be searched for the requested file.
-
-
-
-
-
-
- IGNORE_URL
-
-
-
- Requests that registered URL wrappers are to be ignored when opening the
- stream. Other non-URL wrappers will be taken into consideration when
- decoding the path. There is no opposite form for this flag; the streams
- API will use all registered wrappers by default.
-
-
-
-
-
-
- IGNORE_URL_WIN
-
-
-
- On Windows systems, this is equivalent to IGNORE_URL.
- On all other systems, this flag has no effect.
-
-
-
-
-
-
- ENFORCE_SAFE_MODE
-
-
-
- Requests that the underlying stream implementation perform safe_mode
- checks on the file before opening the file. Omitting this flag will skip
- safe_mode checks and allow opening of any file that the PHP process
- has rights to access.
-
-
-
-
-
-
- REPORT_ERRORS
-
-
-
- If this flag is set, and there was an error during the opening of the file
- or URL, the streams API will call the php_error function for you. This
- is useful because the path may contain username/password information
- that should not be displayed in the browser output (it would be a
- security risk to do so). When the streams API raises the error, it first
- strips username/password information from the path, making the error
- message safe to display in the browser.
-
-
-
-
-
-
- STREAM_MUST_SEEK
-
-
-
- This flag is useful when your extension really must be able to randomly
- seek around in a stream. Some streams may not be seekable in their
- native form, so this flag asks the streams API to check to see if the
- stream does support seeking. If it does not, it will copy the stream
- into temporary storage (which may be a temporary file or a memory
- stream) which does support seeking.
- Please note that this flag is not useful when you want to seek the
- stream and write to it, because the stream you are accessing might
- not be bound to the actual resource you requested.
-
-
-
- If the requested resource is network based, this flag will cause the
- opener to block until the whole contents have been downloaded.
-
-
-
-
-
-
-
- STREAM_WILL_CAST
-
-
-
- If your extension is using a third-party library that expects a FILE* or
- file descriptor, you can use this flag to request the streams API to
- open the resource but avoid buffering. You can then use
- php_stream_cast to retrieve the FILE* or
- file descriptor that the library requires.
-
-
- The is particularly useful when accessing HTTP URLs where the start
- of the actual stream data is found after an indeterminate offset into
- the stream.
-
-
- Since this option disables buffering at the streams API level, you
- may experience lower performance when using streams functions
- on the stream; this is deemed acceptable because you have told
- streams that you will be using the functions to match the underlying
- stream implementation.
- Only use this option when you are sure you need it.
-
-
-
-
-
-
-
-
-
diff --git a/internals2/ze1/streams/dir.xml b/internals2/ze1/streams/dir.xml
deleted file mode 100644
index 4386e3c5bca8..000000000000
--- a/internals2/ze1/streams/dir.xml
+++ /dev/null
@@ -1,121 +0,0 @@
-
-
-
-
-
- Streams Dir API Reference
-
- The functions listed in this section work on local files, as well as remote files
- (provided that the wrapper supports this functionality!).
-
-
-
-
- php_stream_opendir
- Open a directory for file enumeration
-
-
- Description
-
- php_stream *php_stream_opendir
- char *path
- php_stream_context *context
-
-
- php_stream_opendir returns a stream that can be used to list the
- files that are contained in the directory specified by path.
- This function is functionally equivalent to POSIX opendir.
- Although this function returns a php_stream object, it is not recommended to
- try to use the functions from the common API on these streams.
-
-
-
-
-
-
- php_stream_readdir
- Fetch the next directory entry from an opened dir
-
-
- Description
-
- php_stream_dirent *php_stream_readdir
- php_stream *dirstream
- php_stream_dirent *ent
-
-
- php_stream_readdir reads the next directory entry
- from dirstream and stores it into ent.
- If the function succeeds, the return value is ent.
- If the function fails, the return value is NULL.
- See php_stream_dirent for more
- details about the information returned for each directory entry.
-
-
-
-
-
-
- php_stream_rewinddir
- Rewind a directory stream to the first entry
-
-
- Description
-
- intphp_stream_rewinddir
- php_stream *dirstream
-
-
- php_stream_rewinddir rewinds a directory stream to the first entry.
- Returns 0 on success, but -1 on failure.
-
-
-
-
-
-
- php_stream_closedir
- Close a directory stream and release resources
-
-
- Description
-
- intphp_stream_closedir
- php_stream *dirstream
-
-
- php_stream_closedir closes a directory stream and releases
- resources associated with it.
- Returns 0 on success, but -1 on failure.
-
-
-
-
-
-
-
-
diff --git a/internals2/ze1/streams/file.xml b/internals2/ze1/streams/file.xml
deleted file mode 100644
index 326ca321b2cd..000000000000
--- a/internals2/ze1/streams/file.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
-
- Streams File API Reference
-
-
-
- php_stream_fopen_from_file
- Convert an ANSI FILE* into a stream
-
-
- Description
-
- php_stream *php_stream_fopen_from_file
- FILE *file
- char *mode
-
-
- php_stream_fopen_from_file returns a stream based on the
- file. mode must be the same
- as the mode used to open file, otherwise strange errors
- may occur when trying to write when the mode of the stream is different from the mode
- on the file.
-
-
-
-
-
-
- php_stream_fopen_tmpfile
- Open a FILE* with tmpfile() and convert into a stream
-
-
- Description
-
- php_stream *php_stream_fopen_tmpfile
- void
-
-
- php_stream_fopen_tmpfile returns a stream based on a
- temporary file opened with a mode of "w+b". The temporary file will be deleted
- automatically when the stream is closed or the process terminates.
-
-
-
-
-
-
- php_stream_fopen_temporary_file
- Generate a temporary file name and open a stream on it
-
-
- Description
-
- php_stream *php_stream_fopen_temporary_file
- const char *dir
- const char *pfx
- char **opened
-
-
- php_stream_fopen_temporary_file generates a temporary file name
- in the directory specified by dir and with a prefix of pfx.
- The generated file name is returns in the opened parameter, which you
- are responsible for cleaning up using efree.
- A stream is opened on that generated filename in "w+b" mode.
- The file is NOT automatically deleted; you are responsible for unlinking or moving the file when you have
- finished with it.
-
-
-
-
-
-
-
-
diff --git a/internals2/ze1/streams/index.xml b/internals2/ze1/streams/index.xml
deleted file mode 100644
index a99240e04f1a..000000000000
--- a/internals2/ze1/streams/index.xml
+++ /dev/null
@@ -1,317 +0,0 @@
-
-
-
-
-
- Streams API for PHP Extension Authors
-
-
-
- The functions in this chapter are for use in the PHP source code and
- are not PHP functions. Information on userland stream functions can be found in the
- Stream Reference.
-
-
-
-
- Overview
-
- The PHP Streams API introduces a unified approach to the handling of
- files and sockets in PHP extension. Using a single API with standard
- functions for common operations, the streams API allows your extension
- to access files, sockets, URLs, memory and script-defined objects.
- Streams is a run-time extensible API that allows dynamically loaded
- modules (and scripts!) to register new streams.
-
-
- The aim of the Streams API is to make it comfortable for developers to
- open files, URLs and other streamable data sources with a unified API
- that is easy to understand. The API is more or less based on the ANSI
- C stdio family of functions (with identical semantics for most of the main
- functions), so C programmers will have a feeling of familiarity with streams.
-
-
- The streams API operates on a couple of different levels: at the base level,
- the API defines php_stream objects to represent streamable data sources.
- On a slightly higher level, the API defines php_stream_wrapper objects
- which "wrap" around the lower level API to provide support for retrieving
- data and meta-data from URLs. An additional context
- parameter, accepted by most stream creation functions, is passed to the
- wrapper's stream_opener method to fine-tune the behavior
- of the wrapper.
-
-
- Any stream, once opened, can also have any number of filters
- applied to it, which process data as it is read from/written to the stream.
-
-
- Streams can be cast (converted) into other types of file-handles, so that they
- can be used with third-party libraries without a great deal of trouble. This
- allows those libraries to access data directly from URL sources. If your
- system has the fopencookie or
- funopen function, you can even
- pass any PHP stream to any library that uses ANSI stdio!
-
-
-
-
- Streams Basics
-
- Using streams is very much like using ANSI stdio functions. The main
- difference is in how you obtain the stream handle to begin with.
- In most cases, you will use php_stream_open_wrapper
- to obtain the stream handle. This function works very much like fopen,
- as can be seen from the example below:
-
-
-
- simple stream example that displays the PHP home page
-
-
-
-
-
-
- The table below shows the Streams equivalents of the more common ANSI stdio functions.
- Unless noted otherwise, the semantics of the functions are identical.
-
- ANSI stdio equivalent functions in the Streams API
-
-
-
- ANSI Stdio Function
- PHP Streams Function
- Notes
-
-
-
-
-
- fopen
- php_stream_open_wrapper
- Streams includes additional parameters
-
-
-
- fclose
- php_stream_close
-
-
-
-
- fgets
- php_stream_gets
-
-
-
-
- fread
- php_stream_read
- The nmemb parameter is assumed to have a value of 1, so the prototype looks more like read(2)
-
-
-
- fwrite
- php_stream_write
- The nmemb parameter is assumed to have a value of 1, so the prototype looks more like write(2)
-
-
-
- fseek
- php_stream_seek
-
-
-
-
- ftell
- php_stream_tell
-
-
-
-
- rewind
- php_stream_rewind
-
-
-
-
- feof
- php_stream_eof
-
-
-
-
- fgetc
- php_stream_getc
-
-
-
-
- fputc
- php_stream_putc
-
-
-
-
- fflush
- php_stream_flush
-
-
-
-
- puts
- php_stream_puts
- Same semantics as puts, NOT fputs
-
-
-
- fstat
- php_stream_stat
- Streams has a richer stat structure
-
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/arguments.xml b/internals2/ze1/zendapi/arguments.xml
deleted file mode 100644
index 641cb678e497..000000000000
--- a/internals2/ze1/zendapi/arguments.xml
+++ /dev/null
@@ -1,1028 +0,0 @@
-
-
-
- Accepting Arguments
-
- One of the most important issues for language extensions is
- accepting and dealing with data passed via arguments. Most
- extensions are built to deal with specific input data (or require
- parameters to perform their specific actions), and function
- arguments are the only real way to exchange data between the PHP
- level and the C level. Of course, there's also the possibility of
- exchanging data using predefined global values (which is also
- discussed later), but this should be avoided by all means, as it's
- extremely bad practice.
-
-
- PHP doesn't make use of any formal function declarations; this is
- why call syntax is always completely dynamic and never checked for
- errors. Checking for correct call syntax is left to the user code.
- For example, it's possible to call a function using only one
- argument at one time and four arguments the next time - both
- invocations are syntactically absolutely correct.
-
-
- Determining the Number of Arguments
-
- Since PHP doesn't have formal function definitions with support
- for call syntax checking, and since PHP features variable
- arguments, sometimes you need to find out with how many arguments
- your function has been called. You can use the
- ZEND_NUM_ARGS macro in this case. In previous
- versions of PHP, this macro retrieved the number of arguments with
- which the function has been called based on the function's hash
- table entry, ht, which is passed in the
- INTERNAL_FUNCTION_PARAMETERS list. As
- ht itself now contains the number of arguments that
- have been passed to the function, ZEND_NUM_ARGS
- has been stripped down to a dummy macro (see its definition in
- zend_API.h). But it's still good practice to
- use it, to remain compatible with future changes in the call
- interface. Note: The old PHP equivalent of
- this macro is ARG_COUNT.
-
-
- The following code checks for the correct number of arguments:
-
-if(ZEND_NUM_ARGS() != 2) WRONG_PARAM_COUNT;
-
- If the function is not called with two
- arguments, it exits with an error message. The code snippet above
- makes use of the tool macro WRONG_PARAM_COUNT,
- which can be used to generate a standard error message like:
-
-
-
- This macro prints a default error message and then returns to the caller.
- Its definition can also be found in zend_API.h and looks
- like this:
-
-
-
- As you can see, it calls an internal function
- named wrong_param_count that's responsible for printing
- the warning. For details on generating customized error
- messages, see the later section "Printing Information."
-
-
-
-
- Retrieving Arguments
-
-
-
- New parameter parsing API
-
-
- This chapter documents the new Zend parameter parsing API
- introduced by Andrei Zmievski. It was introduced in the
- development stage between PHP 4.0.6 and 4.1.0.
-
-
-
-
- Parsing parameters is a very common operation and it may get a bit
- tedious. It would also be nice to have standardized error checking
- and error messages. Since PHP 4.1.0, there is a way to do just
- that by using the new parameter parsing API. It greatly simplifies
- the process of receiving parameters, but it has a drawback in
- that it can't be used for functions that expect variable number of
- parameters. But since the vast majority of functions do not fall
- into those categories, this parsing API is recommended as the new
- standard way.
-
-
-
- The prototype for parameter parsing function looks like this:
-
-
-
- The first argument to this function is supposed to be the number
- of actual parameters passed to your function, so
- ZEND_NUM_ARGS() can be used for that. The
- second parameter should always be TSRMLS_CC
- macro. The third argument is a string that specifies the number
- and types of arguments your function is expecting, similar to how
- printf format string specifies the number and format of the output
- values it should operate on. And finally the rest of the arguments
- are pointers to variables which should receive the values from the
- parameters.
-
-
-
- zend_parse_parameters also performs type
- conversions whenever possible, so that you always receive the data
- in the format you asked for. Any type of scalar can be converted
- to another one, but conversions between complex types (arrays,
- objects, and resources) and scalar types are not allowed.
-
-
-
- If the parameters could be obtained successfully and there were no
- errors during type conversion, the function will return
- SUCCESS, otherwise it will return
- FAILURE. The function will output informative
- error messages, if the number of received parameters does not
- match the requested number, or if type conversion could not be
- performed.
-
-
-
- Here are some sample error messages:
-
- Warning - ini_get_all() requires at most 1 parameter, 2 given
- Warning - wddx_deserialize() expects parameter 1 to be string, array given
-
- Of course each error message is accompanied by the filename and
- line number on which it occurs.
-
-
-
- Here is the full list of type specifiers:
-
-
- l - long
-
-
- d - double
-
-
- s - string (with possible null bytes) and its length
-
-
- b - boolean
-
-
- r - resource, stored in zval*
-
-
- a - array, stored in zval*
-
-
- o - object (of any class), stored in zval*
-
-
- O - object (of class specified by class entry), stored in zval*
-
-
- z - the actual zval*
-
-
- The following characters also have a meaning in the specifier
- string:
-
-
-
- | - indicates that the remaining
- parameters are optional. The storage variables
- corresponding to these parameters should be initialized to
- default values by the extension, since they will not be
- touched by the parsing function if the parameters are not
- passed.
-
-
-
-
- / - the parsing function will
- call SEPARATE_ZVAL_IF_NOT_REF on
- the parameter it follows, to provide a copy of the
- parameter, unless it's a reference.
-
-
-
-
- ! - the parameter it follows can
- be of specified type or NULL (only
- applies to a, o, O, r, and z). If NULL
- value is passed by the user, the storage pointer will be
- set to NULL.
-
-
-
-
-
-
- The best way to illustrate the usage of this function is through
- examples:
-
-
-
-
-
-
- Note that in the last example we pass 3 for the number of received
- parameters, instead of ZEND_NUM_ARGS. What
- this lets us do is receive the least number of parameters if our
- function expects a variable number of them. Of course, if you want
- to operate on the rest of the parameters, you will have to use
- zend_get_parameters_array_ex to obtain
- them.
-
-
-
- The parsing function has an extended version that allows for an
- additional flags argument that controls its actions.
-
-
-
-
-
-
- The only flag you can pass currently is ZEND_PARSE_PARAMS_QUIET,
- which instructs the function to not output any error messages
- during its operation. This is useful for functions that expect
- several sets of completely different arguments, but you will have
- to output your own error messages.
-
-
-
- For example, here is how you would get either a set of three longs
- or a string:
-
-
-
-
-
-
- With all the abovementioned ways of receiving function parameters
- you should have a good handle on this process. For even more
- example, look through the source code for extensions that are
- shipped with PHP - they illustrate every conceivable situation.
-
-
-
-
- Old way of retrieving arguments (deprecated)
-
-
- Deprecated parameter parsing API
-
-
- This API is deprecated and superseded by the new ZEND
- parameter parsing API.
-
-
-
- After having checked the number of arguments, you need to get access
- to the arguments themselves. This is done with the help of
- zend_get_parameters_ex:
-
-
-
- All arguments are stored in a zval container,
- which needs to be pointed to twice. The snippet above
- tries to retrieve one argument and make it available to us via the
- parameter pointer.
-
-
- zend_get_parameters_ex accepts at least two
- arguments. The first argument is the number of arguments to
- retrieve (which should match the number of arguments with which
- the function has been called; this is why it's important to check
- for correct call syntax). The second argument (and all following
- arguments) are pointers to pointers to pointers to
- zvals. (Confusing, isn't it?) All these pointers
- are required because Zend works internally with
- **zval; to adjust a local **zval in
- our function,zend_get_parameters_ex requires
- a pointer to it.
-
-
- The return value of zend_get_parameters_ex
- can either be SUCCESS or
- FAILURE, indicating (unsurprisingly) success or
- failure of the argument processing. A failure is most likely
- related to an incorrect number of arguments being specified, in
- which case you should exit with
- WRONG_PARAM_COUNT.
-
-
- To retrieve more than one argument, you can use a similar snippet:
-
-
-
-
-
- zend_get_parameters_ex only checks whether
- you're trying to retrieve too many parameters. If the function is
- called with five arguments, but you're only retrieving three of
- them with zend_get_parameters_ex, you won't
- get an error but will get the first three parameters instead.
- Subsequent calls of zend_get_parameters_ex
- won't retrieve the remaining arguments, but will get the same
- arguments again.
-
-
-
-
- Dealing with a Variable Number of Arguments/Optional Parameters
-
- If your function is meant to accept a variable number of
- arguments, the snippets just described are sometimes suboptimal
- solutions. You have to create a line calling
- zend_get_parameters_ex for every possible
- number of arguments, which is often unsatisfying.
-
-
- For this case, you can use the
- function zend_get_parameters_array_ex, which accepts the
- number of parameters to retrieve and an array in which to store them:
-
- 4)
- WRONG_PARAM_COUNT;
-
-/* argument count is correct, now retrieve arguments */
-if(zend_get_parameters_array_ex(argument_count, parameter_array) != SUCCESS)
- WRONG_PARAM_COUNT;
-]]>
-
- First, the number of arguments is checked to make sure that it's in the accepted range. After that,
- zend_get_parameters_array_ex is used to
- fill parameter_array with valid pointers to the argument
- values.
-
-
- A very clever implementation of this can be found in the code
- handling PHP's fsockopen located in
- ext/standard/fsock.c, as shown in
- . Don't worry if you don't know all the functions used in this
- source yet; we'll get to them shortly.
-
-
-
- PHP's implementation of variable arguments in fsockopen().
-
- 5 || arg_count < 2 || zend_get_parameters_array_ex(arg_count,args)==FAILURE) {
- CLOSE_SOCK(1);
- WRONG_PARAM_COUNT;
-}
-
-switch(arg_count) {
- case 5:
- convert_to_double_ex(args[4]);
- conv = (unsigned long) (Z_DVAL_PP(args[4]) * 1000000.0);
- timeout.tv_sec = conv / 1000000;
- timeout.tv_usec = conv % 1000000;
- /* fall-through */
- case 4:
- if (!PZVAL_IS_REF(*args[3])) {
- php_error(E_WARNING,"error string argument to fsockopen not passed by reference");
- }
- pval_copy_constructor(*args[3]);
- ZVAL_EMPTY_STRING(*args[3]);
- /* fall-through */
- case 3:
- if (!PZVAL_IS_REF(*args[2])) {
- php_error(E_WARNING,"error argument to fsockopen not passed by reference");
- return;
- }
- ZVAL_LONG(*args[2], 0);
- break;
-}
-
-convert_to_string_ex(args[0]);
-convert_to_long_ex(args[1]);
-portno = (unsigned short) Z_LVAL_P(args[1]);
-
-key = emalloc(Z_STRLEN_P(args[0]) + 10);
-]]>
-
-
-
- fsockopen accepts two, three, four, or five
- parameters. After the obligatory variable declarations, the
- function checks for the correct range of arguments. Then it uses a
- fall-through mechanism in a switch() statement
- to deal with all arguments. The switch()
- statement starts with the maximum number of arguments being passed
- (five). After that, it automatically processes the case of four
- arguments being passed, then three, by omitting the otherwise
- obligatory break keyword in all stages. After
- having processed the last case, it exits the
- switch() statement and does the minimal
- argument processing needed if the function is invoked with only
- two arguments.
-
-
- This multiple-stage type of processing, similar to a stairway, allows
- convenient processing of a variable number of arguments.
-
-
-
-
- Accessing Arguments
-
- To access arguments, it's necessary for each argument to have a
- clearly defined type. Again, PHP's extremely dynamic nature
- introduces some quirks. Because PHP never does any kind of type
- checking, it's possible for a caller to pass any kind of data to
- your functions, whether you want it or not. If you expect an
- integer, for example, the caller might pass an array, and vice
- versa - PHP simply won't notice.
-
-
- To work around this, you have to use a set of API functions to
- force a type conversion on every argument that's being passed (see
- ).
-
-
- Note: All conversion functions expect a
- **zval as parameter.
-
-
- Argument Conversion Functions
-
-
-
-
-
- Function
- Description
-
-
- convert_to_boolean_ex
-
- Forces conversion to a Boolean type. Boolean values remain
- untouched. Longs, doubles, and strings containing
- 0 as well as NULL values will result in
- Boolean 0 (FALSE). Arrays and objects are
- converted based on the number of entries or properties,
- respectively, that they have. Empty arrays and objects are
- converted to FALSE; otherwise, to TRUE. All other values
- result in a Boolean 1 (TRUE).
-
-
-
- convert_to_long_ex
-
- Forces conversion to a long, the default integer type. NULL
- values, Booleans, resources, and of course longs remain
- untouched. Doubles are truncated. Strings containing an
- integer are converted to their corresponding numeric
- representation, otherwise resulting in 0.
- Arrays and objects are converted to 0 if
- empty, 1 otherwise.
-
-
-
- convert_to_double_ex
-
- Forces conversion to a double, the default floating-point
- type. NULL values, Booleans, resources, longs, and of course
- doubles remain untouched. Strings containing a number are
- converted to their corresponding numeric representation,
- otherwise resulting in 0.0. Arrays and
- objects are converted to 0.0 if empty,
- 1.0 otherwise.
-
-
-
- convert_to_string_ex
-
- Forces conversion to a string. Strings remain untouched. NULL
- values are converted to an empty string. Booleans containing
- TRUE are converted to "1", otherwise
- resulting in an empty string. Longs and doubles are converted
- to their corresponding string representation. Arrays are
- converted to the string "Array" and
- objects to the string "Object".
-
-
-
- convert_to_array_ex(value)
-
- Forces conversion to an array. Arrays remain untouched.
- Objects are converted to an array by assigning all their
- properties to the array table. All property names are used as
- keys, property contents as values. NULL values are converted
- to an empty array. All other values are converted to an array
- that contains the specific source value in the element with
- the key 0.
-
-
-
- convert_to_object_ex(value)
-
- Forces conversion to an object. Objects remain untouched.
- NULL values are converted to an empty object. Arrays are
- converted to objects by introducing their keys as properties
- into the objects and their values as corresponding property
- contents in the object. All other types result in an object
- with the property scalar , having the
- corresponding source value as content.
-
-
-
- convert_to_null_ex(value)
- Forces the type to become a NULL value, meaning empty.
-
-
-
-
-
-
- You can find a demonstration of the behavior in
- cross_conversion.php on the accompanying
- CD-ROM.
-
-
-
- Cross-conversion behavior of PHP.
-
-
-
-
-
- Using these functions on your arguments will ensure type safety
- for all data that's passed to you. If the supplied type doesn't
- match the required type, PHP forces dummy contents on the
- resulting value (empty strings, arrays, or objects,
- 0 for numeric values, FALSE
- for Booleans) to ensure a defined state.
-
-
- Following is a quote from the sample module discussed
- previously, which makes use of the conversion functions:
-
-
-
- After retrieving the parameter pointer, the parameter value is
- converted to a long (an integer), which also forms the return value of
- this function. Understanding access to the contents of the value requires a
- short discussion of the zval type, whose definition is shown in .
-
-
-
- PHP/Zend zval type definition.
-
-
-
-
-
- Actually, pval (defined in php.h) is
- only an alias of zval (defined in zend.h),
- which in turn refers to _zval_struct. This is a most interesting
- structure. _zval_struct is the "master" structure, containing
- the value structure, type, and reference information. The substructure
- zvalue_value is a union that contains the variable's contents.
- Depending on the variable's type, you'll have to access different members of
- this union. For a description of both structures, see
- ,
- and
- .
-
-
- Zend zval Structure
-
-
-
-
-
- Entry
- Description
-
-
- value
-
- Union containing this variable's contents. See
- for a description.
-
-
-
- type
-
- Contains this variable's type. For a list of available
- types, see .
-
-
-
- is_ref
-
- 0 means that this variable is not a reference; 1 means that this variable is a reference to another variable.
-
-
-
- refcount
-
- The number of references that exist for this variable. For
- every new reference to the value stored in this variable,
- this counter is increased by 1. For every lost reference,
- this counter is decreased by 1. When the reference counter
- reaches 0, no references exist to this value anymore, which
- causes automatic freeing of the value.
-
-
-
-
-
-
- Zend zvalue_value Structure
-
-
-
-
-
- Entry
- Description
-
-
- lval
- Use this property if the variable is of the
- type IS_LONG,
- IS_BOOLEAN, or IS_RESOURCE.
-
-
- dval
- Use this property if the variable is of the
- type IS_DOUBLE.
-
-
- str
-
- This structure can be used to access variables of
- the type IS_STRING. The member len contains the
- string length; the member val points to the string itself. Zend
- uses C strings; thus, the string length contains a trailing
- 0x00.
-
-
- ht
- This entry points to the variable's hash table entry if the variable is an array.
-
-
- obj
- Use this property if the variable is of the
- type IS_OBJECT.
-
-
-
-
-
-
- Zend Variable Type Constants
-
-
-
-
-
- Constant
- Description
-
-
- IS_NULL
- Denotes a NULL (empty) value.
-
-
- IS_LONG
- A long (integer) value.
-
-
- IS_DOUBLE
- A double (floating point) value.
-
-
- IS_STRING
- A string.
-
-
- IS_ARRAY
- Denotes an array.
-
-
- IS_OBJECT
- An object.
-
-
- IS_BOOL
- A Boolean value.
-
-
- IS_RESOURCE
- A resource (for a discussion of resources, see the
- appropriate section below).
-
-
- IS_CONSTANT
- A constant (defined) value.
-
-
-
-
-
- To access a long you access zval.value.lval, to
- access a double you use zval.value.dval, and so on.
- Because all values are stored in a union, trying to access data
- with incorrect union members results in meaningless output.
-
-
- Accessing arrays and objects is a bit more complicated and
- is discussed later.
-
-
-
-
- Dealing with Arguments Passed by Reference
-
- If your function accepts arguments passed by reference that you
- intend to modify, you need to take some precautions.
-
-
- What we didn't say yet is that under the circumstances presented so
- far, you don't have write access to any zval containers
- designating function parameters that have been passed to you. Of course, you
- can change any zval containers that you created within
- your function, but you mustn't change any zvals that refer to
- Zend-internal data!
-
-
- We've only discussed the so-called *_ex API
- so far. You may have noticed that the API functions we've used are
- called zend_get_parameters_ex instead of
- zend_get_parameters,
- convert_to_long_ex instead of
- convert_to_long, etc. The
- *_ex functions form the so-called new
- "extended" Zend API. They give a minor speed increase over the old
- API, but as a tradeoff are only meant for providing read-only
- access.
-
-
- Because Zend works internally with references, different variables
- may reference the same value. Write access to a
- zval container requires this container to contain
- an isolated value, meaning a value that's not referenced by any
- other containers. If a zval container were
- referenced by other containers and you changed the referenced
- zval, you would automatically change the contents
- of the other containers referencing this zval
- (because they'd simply point to the changed value and thus change
- their own value as well).
-
-
- zend_get_parameters_ex doesn't care about
- this situation, but simply returns a pointer to the desired
- zval containers, whether they consist of references
- or not. Its corresponding function in the traditional API,
- zend_get_parameters, immediately checks for
- referenced values. If it finds a reference, it creates a new,
- isolated zval container; copies the referenced data
- into this newly allocated space; and then returns a pointer to the
- new, isolated value.
-
-
- This action is called zval separation
- (or pval separation). Because the *_ex API
- doesn't perform zval separation, it's considerably faster, while
- at the same time disabling write access.
-
-
- To change parameters, however, write access is required. Zend deals
- with this situation in a special way: Whenever a parameter to a function is
- passed by reference, it performs automatic zval separation. This means that
- whenever you're calling a function like
- this in PHP, Zend will automatically ensure
- that $parameter is being passed as an isolated value, rendering it
- to a write-safe state:
-
-
-
-
-
- But this is not the case with regular parameters!
- All other parameters that are not passed by reference are in a read-only
- state.
-
-
-
- This requires you to make sure that you're really working with a
- reference - otherwise you might produce unwanted results. To check for a
- parameter being passed by reference, you can use the macro
- PZVAL_IS_REF. This macro accepts a zval*
- to check if it is a reference or not. Examples are given in
- in .
-
-
- Testing for referenced parameter passing.
-
-
-
-
- Testing for referenced parameter passing
-
-
-
-
-
-
-
-
- Assuring Write Safety for Other Parameters
-
- You might run into a situation in which you need write access to a
- parameter that's retrieved with zend_get_parameters_ex
- but not passed by reference. For this case, you can use the macro
- SEPARATE_ZVAL, which does a zval separation on the provided
- container. The newly generated zval is detached from internal
- data and has only a local scope, meaning that it can be changed or destroyed
- without implying global changes in the script context:
-
- still is connected */
-/* to Zend's internal data buffers */
-
-/* make write-safe */
-SEPARATE_ZVAL(parameter);
-
-/* now we can safely modify */
-/* without implying global changes */
-]]>
-
- SEPARATE_ZVAL uses emalloc
- to allocate the new zval container, which means that even if you
- don't deallocate this memory yourself, it will be destroyed automatically upon
- script termination. However, doing a lot of calls to this macro
- without freeing the resulting containers will clutter up your RAM.
-
-
- Note: As you can easily work around the lack
- of write access in the "traditional" API (with
- zend_get_parameters and so on), this API
- seems to be obsolete, and is not discussed further in this
- chapter.
-
-
-
-
diff --git a/internals2/ze1/zendapi/build.xml b/internals2/ze1/zendapi/build.xml
deleted file mode 100644
index 434e4bfbfb62..000000000000
--- a/internals2/ze1/zendapi/build.xml
+++ /dev/null
@@ -1,204 +0,0 @@
-
-
-
- PHP's Automatic Build System
-
- PHP 4 features an automatic build system that's very flexible.
- All modules reside in a subdirectory of the
- ext directory. In addition to its own sources,
- each module consists of a config.m4 file, for extension configuration. (for example, see
- )
-
-
- All these stub files are generated automatically, along with
- .cvsignore, by a little shell script named
- ext_skel that resides in the
- ext directory. As argument it takes the name
- of the module that you want to create. The shell script then
- creates a directory of the same name, along with the appropriate
- stub files.
-
-
- Step by step, the process looks like
- this:
-
- ./ext_skel --extname=my_module
-Creating directory my_module
-Creating basic files: config.m4 .cvsignore my_module.c php_my_module.h CREDITS EXPERIMENTAL tests/001.phpt my_module.php [done].
-
-To use your new extension, you will have to execute the following steps:
-
-1. $ cd ..
-2. $ vi ext/my_module/config.m4
-3. $ ./buildconf
-4. $ ./configure --[with|enable]-my_module
-5. $ make
-6. $ ./php -f ext/my_module/my_module.php
-7. $ vi ext/my_module/my_module.c
-8. $ make
-
-Repeat steps 3-6 until you are satisfied with ext/my_module/config.m4 and
-step 6 confirms that your module is compiled into PHP. Then, start writing
-code and repeat the last two steps as often as necessary.
-]]>
-
- This instruction creates the
- aforementioned files. To include the new module in the automatic
- configuration and build process, you have to run
- buildconf, which regenerates the
- configure script by searching through the
- ext directory and including all found
- config.m4 files.
-
-
- The default config.m4 shown in
- is a bit more complex:
-
-
- The default config.m4.
-
- check with-path
- dnl SEARCH_PATH="/usr/local /usr" # you might want to change this
- dnl SEARCH_FOR="/include/my_module.h" # you most likely want to change this
- dnl if test -r $PHP_MY_MODULE/; then # path given as parameter
- dnl MY_MODULE_DIR=$PHP_MY_MODULE
- dnl else # search default path list
- dnl AC_MSG_CHECKING([for my_module files in default path])
- dnl for i in $SEARCH_PATH ; do
- dnl if test -r $i/$SEARCH_FOR; then
- dnl MY_MODULE_DIR=$i
- dnl AC_MSG_RESULT(found in $i)
- dnl fi
- dnl done
- dnl fi
- dnl
- dnl if test -z "$MY_MODULE_DIR"; then
- dnl AC_MSG_RESULT([not found])
- dnl AC_MSG_ERROR([Please reinstall the my_module distribution])
- dnl fi
-
- dnl # --with-my_module -> add include path
- dnl PHP_ADD_INCLUDE($MY_MODULE_DIR/include)
-
- dnl # --with-my_module -> chech for lib and symbol presence
- dnl LIBNAME=my_module # you may want to change this
- dnl LIBSYMBOL=my_module # you most likely want to change this
-
- dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
- dnl [
- dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $MY_MODULE_DIR/lib, MY_MODULE_SHARED_LIBADD)
- dnl AC_DEFINE(HAVE_MY_MODULELIB,1,[ ])
- dnl ],[
- dnl AC_MSG_ERROR([wrong my_module lib version or lib not found])
- dnl ],[
- dnl -L$MY_MODULE_DIR/lib -lm -ldl
- dnl ])
- dnl
- dnl PHP_SUBST(MY_MODULE_SHARED_LIBADD)
-
- PHP_NEW_EXTENSION(my_module, my_module.c, $ext_shared)
-fi
-]]>
-
-
-
- If you're unfamiliar with M4 files (now is certainly a good
- time to get familiar), this might be a bit confusing at first; but
- it's actually quite easy.
-
-
- Note: Everything prefixed with
- dnl is treated as a comment and is not
- parsed.
-
-
- The config.m4 file is responsible for
- parsing the command-line options passed to
- configure at configuration time. This means
- that it has to check for required external files and do similar
- configuration and setup tasks.
-
-
- The default file creates two configuration directives in the
- configure script:
- --with-my_module and
- --enable-my_module. Use the first option when
- referring external files (such as the
- --with-apache directive that refers to the
- Apache directory). Use the second option when the user simply has
- to decide whether to enable your extension. Regardless of which
- option you use, you should uncomment the other, unnecessary one;
- that is, if you're using --enable-my_module, you
- should remove support for --with-my_module, and
- vice versa.
-
-
- By default, the config.m4 file created by
- ext_skel accepts both directives and
- automatically enables your extension. Enabling the extension is
- done by using the PHP_EXTENSION macro. To change
- the default behavior to include your module into the PHP binary
- when desired by the user (by explicitly specifying
- --enable-my_module or
- --with-my_module), change the test for
- $PHP_MY_MODULE to == "yes":
- if test "$PHP_MY_MODULE" == "yes"; then dnl
- Action.. PHP_EXTENSION(my_module, $ext_shared)
- fiThis would require you to use
- --enable-my_module each time when reconfiguring
- and recompiling PHP.
-
-
- Note: Be sure to run
- buildconf every time you change
- config.m4!
-
-
- We'll go into more details on the M4 macros available to your
- configuration scripts later in this chapter. For now, we'll simply
- use the default files.
-
-
-
diff --git a/internals2/ze1/zendapi/calling-user-functions.xml b/internals2/ze1/zendapi/calling-user-functions.xml
deleted file mode 100644
index 6bc48f34beed..000000000000
--- a/internals2/ze1/zendapi/calling-user-functions.xml
+++ /dev/null
@@ -1,153 +0,0 @@
-
-
-
- Calling User Functions
-
- You can call user functions from your own modules, which is very
- handy when implementing callbacks; for example, for array walking, searching, or
- simply for event-based programs.
-
-
- User functions can be called with the
- function call_user_function_ex. It requires a hash value
- for the function table you want to access, a pointer to an object (if you want
- to call a method), the function name, return value, number of arguments,
- argument array, and a flag indicating whether you want to perform zval separation.
-
-
-
-
-
- Note that you don't have to specify both
- function_table and object; either
- will do. If you want to call a method, you have to supply the
- object that contains this method, in which case
- call_user_functionautomatically sets the
- function table to this object's function table. Otherwise, you only
- need to specify function_table and can set
- object to NULL.
-
-
- Usually, the default function table is the "root" function table
- containing all function entries. This function table is part of the
- compiler globals and can be accessed using the macro
- CG. To introduce the compiler globals to your
- function, call the macro TSRMLS_FETCH once.
-
-
- The function name is specified in a zval
- container. This might be a bit surprising at first, but is quite a
- logical step, since most of the time you'll accept function names
- as parameters from calling functions within your script, which in
- turn are contained in zval containers again. Thus,
- you only have to pass your arguments through to this function. This
- zval must be of type IS_STRING.
-
-
- The next argument consists of a pointer to the return value. You
- don't have to allocate memory for this container; the function will
- do so by itself. However, you have to destroy this container (using
- zval_dtor) afterward!
-
-
- Next is the parameter count as integer and an array containing all
- necessary parameters. The last argument specifies whether the
- function should perform zval separation - this should always be set
- to 0. If set to 1, the
- function consumes less memory but fails if any of the parameters
- need separation.
-
-
- shows a small demonstration of
- calling a user function. The code calls a function that's supplied
- to it as argument and directly passes this function's return value
- through as its own return value. Note the use of the constructor
- and destructor calls at the end - it might not be necessary to do
- it this way here (since they should be separate values, the
- assignment might be safe), but this is bulletproof.
-
-
- Calling user functions.
-
-type != IS_STRING)
-{
- zend_error(E_ERROR, "Function requires string argument");
-}
-
-TSRMSLS_FETCH();
-
-if(call_user_function_ex(CG(function_table), NULL, *function_name, &retval, 0, NULL, 0) != SUCCESS)
-{
- zend_error(E_ERROR, "Function call failed");
-}
-
-zend_printf("We have %i as type\n", retval->type);
-
-*return_value = *retval;
-zval_copy_ctor(return_value);
-zval_ptr_dtor(&retval);
-]]>
-
-
-
-
-
- ]]>
-
- &example.outputs;
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/configuration-macros.xml b/internals2/ze1/zendapi/configuration-macros.xml
deleted file mode 100644
index 6c12ac2c63c6..000000000000
--- a/internals2/ze1/zendapi/configuration-macros.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
- Reference: Some Configuration Macros
-
- config.m4
-
- The file config.m4 is processed by
- buildconf and must contain all the instructions to be
- executed during configuration. For example, these can include tests for required
- external files, such as header files, libraries, and so on. PHP defines a set of macros
- that can be used in this process, the most useful of which are described in
- .
-
-
- M4 Macros for config.m4
-
-
-
-
-
- Macro
- Description
-
-
- AC_MSG_CHECKING(message)
- Prints a "checking <message>" text
- during configure.
-
-
- AC_MSG_RESULT(value)
- Gives the result to AC_MSG_CHECKING;
- should specify either yes or no as value.
-
-
-
- AC_MSG_ERROR(message)
- Prints message as error message
- during configure and aborts the script.
-
-
- AC_DEFINE(name,value,description)
- Adds
- #define to php_config.h with the value of
- value and a comment that says description (this
- is useful for conditional compilation of your module).
-
-
- AC_ADD_INCLUDE(path)
- Adds a compiler include path; for example, used if the
- module needs to add search paths for header files.
-
-
- AC_ADD_LIBRARY_WITH_PATH(libraryname,librarypath)
- Specifies an additional library to link.
-
-
- AC_ARG_WITH(modulename,description,unconditionaltest,conditionaltest)
- Quite a powerful macro, adding the
- module with description to the
- configure --help output. PHP checks
- whether the option
- --with-<modulename> is given to the
- configure script. If so, it runs the
- script unconditionaltest (for example,
- --with-myext=yes), in which case the value
- of the option is contained in the variable
- $withval. Otherwise, it executes
- conditionaltest.
-
-
-
- PHP_EXTENSION(modulename,
- [shared])
- This macro is a must to call for PHP
- to configure your extension. You can supply a second argument
- in addition to your module name, indicating whether you intend compilation as a
- shared module. This will result in a definition at compile time for your
- source as COMPILE_DL_<modulename>.
-
-
-
-
- Macros to Access Initialization Entries in PHP
-
-
-
-
-
- Macro
- Description
-
-
- INI_INT(name)
- Returns the current value of
- entry name as integer (long).
-
-
- INI_FLT(name)
- Returns the current value of
- entry name as float (double).
-
-
- INI_STR(name)
- Returns the current value of
- entry name as string. Note: This string is not duplicated, but
- instead points to internal data. Further access requires duplication to local
- memory.
-
-
- INI_BOOL(name)
- Returns the current value of
- entry name as Boolean (defined as zend_bool,
- which currently means unsigned char).
-
-
- INI_ORIG_INT(name)
- Returns the original value of
- entry name as integer (long).
-
-
- INI_ORIG_FLT(name)
- Returns the original value of
- entry name as float (double).
-
-
- INI_ORIG_STR(name)
- Returns the original value of
- entry name as string. Note: This string is not duplicated, but
- instead points to internal data. Further access requires duplication to local
- memory.
-
-
- INI_ORIG_BOOL(name)
- Returns the original value of
- entry name as Boolean (defined as zend_bool, which
- currently means unsigned char).
-
-
-
-
-
- Finally, you have to introduce your initialization entries to PHP.
- This can be done in the module startup and shutdown functions, using the macros
- REGISTER_INI_ENTRIES() and UNREGISTER_INI_ENTRIES():
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/intro.xml b/internals2/ze1/zendapi/intro.xml
deleted file mode 100644
index f81be953a7a5..000000000000
--- a/internals2/ze1/zendapi/intro.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
- Introduction
-
- Those who know don't talk.
- Those who talk don't know.
-
-
-
- Sometimes, PHP "as is" simply isn't enough. Although these cases are rare
- for the average user, professional applications will soon lead PHP to the edge
- of its capabilities, in terms of either speed or functionality. New
- functionality cannot always be implemented natively due to language
- restrictions and inconveniences that arise when having to carry around a huge
- library of default code appended to every single script, so another method
- needs to be found for overcoming these eventual lacks in PHP.
-
-
- As soon as this point is reached, it's time to touch the heart of PHP
- and take a look at its core, the C code that makes PHP go.
-
-
-
- This information is currently rather outdated,
- parts of it only cover early stages of the ZendEngine 1.0 API
- as it was used in early versions of PHP 4.
-
-
- More recent information may be found in the various README files that
- come with the PHP source and the
- Internals
- section on the Zend website.
-
-
-
-
diff --git a/internals2/ze1/zendapi/layout.xml b/internals2/ze1/zendapi/layout.xml
deleted file mode 100644
index 38f2758ce5c1..000000000000
--- a/internals2/ze1/zendapi/layout.xml
+++ /dev/null
@@ -1,345 +0,0 @@
-
-
-
-
- Source Layout
-
-
- Prior to working through the rest of this chapter, you should retrieve
- clean, unmodified source trees of your favorite Web server. We're working with
- Apache (available at
- )
- and, of course, with PHP (available at
- - does
- it need to be said?).
-
-
- Make sure that you can compile a working PHP environment by
- yourself! We won't go into this issue here, however, as you should
- already have this most basic ability when studying this chapter.
-
-
-
- Before we start discussing code issues, you should familiarize
- yourself with the source tree to be able to quickly navigate
- through PHP's files. This is a must-have ability to implement and
- debug extensions.
-
-
-
- The following table describes the contents of the major directories.
-
-
-
-
-
-
-
- Directory
- Contents
-
-
- php-src
-
- Main PHP source files and main header files; here you'll find
- all of PHP's API definitions, macros, etc. (important).
- Everything else is below this directory.
-
-
-
- php-src/ext
-
- Repository for dynamic and built-in modules; by default, these
- are the "official" PHP modules that have been integrated into
- the main source tree. From PHP 4.0, it's possible to compile
- these standard extensions as dynamic loadable modules (at
- least, those that support it).
-
-
-
- php-src/main
-
- This directory contains the main php macros and definitions. (important)
-
-
-
- php-src/pear
-
- Directory for the PHP Extension and Application Repository. This directory contains
- core PEAR files.
-
-
-
- php-src/sapi
-
- Contains the code for the different server abstraction layers.
-
-
-
- TSRM
-
- Location of the "Thread Safe Resource Manager" (TSRM) for Zend
- and PHP.
-
-
-
- ZendEngine2
-
- Location of the Zend Engine files; here you'll
- find all of Zend's API definitions, macros, etc. (important).
-
-
-
-
-
-
- Discussing all the files included in the PHP package is beyond the
- scope of this chapter. However, you should take a close look at the
- following files:
-
-
- php-src/main/php.h, located in the main PHP directory.
- This file contains most of PHP's macro and API definitions.
-
-
-
-
- php-src/Zend/zend.h, located in the main Zend directory.
- This file contains most of Zend's macros and definitions.
-
-
-
-
- php-src/Zend/zend_API.h, also located in the Zend
- directory, which defines Zend's API.
-
-
- You should also follow some sub-inclusions from
- these files; for example, the ones relating to the Zend executor,
- the PHP initialization file support, and such. After reading these
- files, take the time to navigate around the package a little to see
- the interdependencies of all files and modules - how they relate to
- each other and especially how they make use of each other. This
- also helps you to adapt to the coding style in which PHP is
- authored. To extend PHP, you should quickly adapt to this style.
-
-
-
- Extension Conventions
-
- Zend is built using certain conventions; to avoid breaking its
- standards, you should follow the rules described in the following
- sections.
-
-
-
-
- Macros
-
- For almost every important task, Zend ships predefined macros that
- are extremely handy. The tables and figures in the following
- sections describe most of the basic functions, structures, and
- macros. The macro definitions can be found mainly in
- zend.h and zend_API.h.
- We suggest that you take a close look at these files after having
- studied this chapter. (Although you can go ahead and read them
- now, not everything will make sense to you yet.)
-
-
-
-
- Memory Management
-
- Resource management is a crucial issue, especially in server
- software. One of the most valuable resources is memory, and memory
- management should be handled with extreme care. Memory management
- has been partially abstracted in Zend, and you should stick to
- this abstraction for obvious reasons: Due to the abstraction, Zend
- gets full control over all memory allocations. Zend is able to
- determine whether a block is in use, automatically freeing unused
- blocks and blocks with lost references, and thus prevent memory
- leaks. The functions to be used are described in the following
- table:
-
-
-
-
-
-
- Function
- Description
-
-
- emalloc
- Serves as replacement for
- malloc.
-
-
- efree
- Serves as replacement for
- free.
-
-
- estrdup
- Serves as replacement for
- strdup.
-
-
- estrndup
- Serves as replacement for
- strndup. Faster than
- estrdup and binary-safe. This is the
- recommended function to use if you know the string length
- prior to duplicating it.
-
-
- ecalloc
- Serves as replacement for
- calloc.
-
-
- erealloc
- Serves as replacement for
- realloc.
-
-
-
- emalloc,
- estrdup, estrndup,
- ecalloc, and erealloc
- allocate internal memory; efree frees these
- previously allocated blocks. Memory handled by the
- e* functions is considered local to the
- current process and is discarded as soon as the script executed by
- this process is terminated.
-
-
- To allocate resident memory that survives termination of
- the current script, you can use malloc and
- free. This should only be done with extreme
- care, however, and only in conjunction with demands of the Zend
- API; otherwise, you risk memory leaks.
-
-
- Zend also features a thread-safe resource manager to
- provide better native support for multithreaded Web servers. This
- requires you to allocate local structures for all of your global
- variables to allow concurrent threads to be run. Because the
- thread-safe mode of Zend was not finished back when this was written,
- it is not yet extensively covered here.
-
-
-
-
- Directory and File Functions
-
- The following directory and file functions should be used in Zend
- modules. They behave exactly like their C counterparts, but
- provide virtual working directory support on the thread level.
-
-
-
-
-
-
- Zend Function
- Regular C Function
-
-
- V_GETCWD
- getcwd
-
-
- V_FOPEN
- fopen
-
-
- V_OPEN
- open
-
-
- V_CHDIR
- chdir
-
-
- V_GETWD
- getwd
-
-
- V_CHDIR_FILE
-
- Takes a file path as an argument and changes the current
- working directory to that file's directory.
-
-
-
- V_STAT
- stat
-
-
- V_LSTAT
- lstat
-
-
-
-
-
-
-
- String Handling
-
- Strings are handled a bit differently by the Zend engine
- than other values such as integers, Booleans, etc., which don't require
- additional memory allocation for storing their values. If you want to
- return a string from a function, introduce a new string variable to the symbol
- table, or do something similar, you have to make sure that the memory the
- string will be occupying has previously been allocated, using the
- aforementioned e* functions for allocation. (This might
- not make much sense to you yet; just keep it somewhere in your head for now - we'll get
- back to it shortly.)
-
-
-
-
- Complex Types
-
- Complex types such as arrays and objects require
- different treatment. Zend features a single API for these types - they're
- stored using hash tables.
-
-
-
- To reduce complexity in the following source examples, we're only
- working with simple types such as integers at first. A discussion about
- creating more advanced types follows later in this chapter.
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/display_ini_entries.xml b/internals2/ze1/zendapi/macros/display_ini_entries.xml
deleted file mode 100644
index 0991b1461594..000000000000
--- a/internals2/ze1/zendapi/macros/display_ini_entries.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- DISPLAY_INI_ENTRIES
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- voidDISPLAY_INI_ENTRIES
- ...
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
-
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/ini_bool.xml b/internals2/ze1/zendapi/macros/ini_bool.xml
deleted file mode 100644
index 10d1b55a5947..000000000000
--- a/internals2/ze1/zendapi/macros/ini_bool.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- INI_BOOL
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- longINI_BOOL
- ...name) ((zend_bool
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name) ((zend_bool
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/ini_flt.xml b/internals2/ze1/zendapi/macros/ini_flt.xml
deleted file mode 100644
index d6780e776226..000000000000
--- a/internals2/ze1/zendapi/macros/ini_flt.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- INI_FLT
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- doubleINI_FLT
- char*name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/ini_int.xml b/internals2/ze1/zendapi/macros/ini_int.xml
deleted file mode 100644
index 39041d98c13e..000000000000
--- a/internals2/ze1/zendapi/macros/ini_int.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- INI_INT
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- longINI_INT
- char*name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/ini_orig_bool.xml b/internals2/ze1/zendapi/macros/ini_orig_bool.xml
deleted file mode 100644
index 8ee5349494f7..000000000000
--- a/internals2/ze1/zendapi/macros/ini_orig_bool.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- INI_ORIG_BOOL
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- longINI_ORIG_BOOL
- ...name) ((zend_bool
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name) ((zend_bool
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/ini_orig_flt.xml b/internals2/ze1/zendapi/macros/ini_orig_flt.xml
deleted file mode 100644
index 0dfd9eec6696..000000000000
--- a/internals2/ze1/zendapi/macros/ini_orig_flt.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- INI_ORIG_FLT
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- doubleINI_ORIG_FLT
- char*name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/ini_orig_int.xml b/internals2/ze1/zendapi/macros/ini_orig_int.xml
deleted file mode 100644
index 8a17ec5ce191..000000000000
--- a/internals2/ze1/zendapi/macros/ini_orig_int.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- INI_ORIG_INT
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- longINI_ORIG_INT
- char*name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/ini_orig_str.xml b/internals2/ze1/zendapi/macros/ini_orig_str.xml
deleted file mode 100644
index 8f5fed919e00..000000000000
--- a/internals2/ze1/zendapi/macros/ini_orig_str.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- INI_ORIG_STR
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- char*INI_ORIG_STR
- char*name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/ini_str.xml b/internals2/ze1/zendapi/macros/ini_str.xml
deleted file mode 100644
index 04abd47e447f..000000000000
--- a/internals2/ze1/zendapi/macros/ini_str.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- INI_STR
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- char*INI_STR
- char*name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/register_double_constant.xml b/internals2/ze1/zendapi/macros/register_double_constant.xml
deleted file mode 100644
index 749e32ceee7c..000000000000
--- a/internals2/ze1/zendapi/macros/register_double_constant.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- REGISTER_DOUBLE_CONSTANT
- ...
-
-
-
- &reftitle.description;
- #include <zend_constants.h>
-
- voidREGISTER_DOUBLE_CONSTANT
- char*name
- doubledval
- intflags
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- dval
-
-
- ...
-
-
-
-
- flags
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/register_ini_boolean.xml b/internals2/ze1/zendapi/macros/register_ini_boolean.xml
deleted file mode 100644
index 391019b486b3..000000000000
--- a/internals2/ze1/zendapi/macros/register_ini_boolean.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- REGISTER_INI_BOOLEAN
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- intREGISTER_INI_BOOLEAN
- char*name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/register_ini_displayer.xml b/internals2/ze1/zendapi/macros/register_ini_displayer.xml
deleted file mode 100644
index 9c5142fb69d9..000000000000
--- a/internals2/ze1/zendapi/macros/register_ini_displayer.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- REGISTER_INI_DISPLAYER
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- intREGISTER_INI_DISPLAYER
- char*name
- ...displayer
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- displayer
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/register_ini_entries.xml b/internals2/ze1/zendapi/macros/register_ini_entries.xml
deleted file mode 100644
index 0be67819ec39..000000000000
--- a/internals2/ze1/zendapi/macros/register_ini_entries.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- REGISTER_INI_ENTRIES
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- intREGISTER_INI_ENTRIES
- ...
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
-
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/register_long_constant.xml b/internals2/ze1/zendapi/macros/register_long_constant.xml
deleted file mode 100644
index d6bc3010bcdf..000000000000
--- a/internals2/ze1/zendapi/macros/register_long_constant.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- REGISTER_LONG_CONSTANT
- ...
-
-
-
- &reftitle.description;
- #include <zend_constants.h>
-
- voidREGISTER_LONG_CONSTANT
- char*name
- longlval
- intflags
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- lval
-
-
- ...
-
-
-
-
- flags
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/register_main_double_constant.xml b/internals2/ze1/zendapi/macros/register_main_double_constant.xml
deleted file mode 100644
index 8b2ccd92bc26..000000000000
--- a/internals2/ze1/zendapi/macros/register_main_double_constant.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- REGISTER_MAIN_DOUBLE_CONSTANT
- ...
-
-
-
- &reftitle.description;
- #include <zend_constants.h>
-
- voidREGISTER_MAIN_DOUBLE_CONSTANT
- char*name
- doubledval
- intflags
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- dval
-
-
- ...
-
-
-
-
- flags
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/register_main_long_constant.xml b/internals2/ze1/zendapi/macros/register_main_long_constant.xml
deleted file mode 100644
index 6939f22b1bbd..000000000000
--- a/internals2/ze1/zendapi/macros/register_main_long_constant.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- REGISTER_MAIN_LONG_CONSTANT
- ...
-
-
-
- &reftitle.description;
- #include <zend_constants.h>
-
- voidREGISTER_MAIN_LONG_CONSTANT
- char*name
- longlval
- intflags
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- lval
-
-
- ...
-
-
-
-
- flags
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/register_main_string_constant.xml b/internals2/ze1/zendapi/macros/register_main_string_constant.xml
deleted file mode 100644
index b16456052c23..000000000000
--- a/internals2/ze1/zendapi/macros/register_main_string_constant.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- REGISTER_MAIN_STRING_CONSTANT
- ...
-
-
-
- &reftitle.description;
- #include <zend_constants.h>
-
- voidREGISTER_MAIN_STRING_CONSTANT
- char*name
- ...str
- intflags
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- str
-
-
- ...
-
-
-
-
- flags
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/register_main_stringl_constant.xml b/internals2/ze1/zendapi/macros/register_main_stringl_constant.xml
deleted file mode 100644
index 82745602fec1..000000000000
--- a/internals2/ze1/zendapi/macros/register_main_stringl_constant.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
- REGISTER_MAIN_STRINGL_CONSTANT
- ...
-
-
-
- &reftitle.description;
- #include <zend_constants.h>
-
- voidREGISTER_MAIN_STRINGL_CONSTANT
- char*name
- ...str
- ...len
- intflags
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- str
-
-
- ...
-
-
-
-
- len
-
-
- ...
-
-
-
-
- flags
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/register_string_constant.xml b/internals2/ze1/zendapi/macros/register_string_constant.xml
deleted file mode 100644
index 58ba521eb1ff..000000000000
--- a/internals2/ze1/zendapi/macros/register_string_constant.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- REGISTER_STRING_CONSTANT
- ...
-
-
-
- &reftitle.description;
- #include <zend_constants.h>
-
- voidREGISTER_STRING_CONSTANT
- char*name
- ...str
- intflags
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- str
-
-
- ...
-
-
-
-
- flags
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/register_stringl_constant.xml b/internals2/ze1/zendapi/macros/register_stringl_constant.xml
deleted file mode 100644
index b55942489be0..000000000000
--- a/internals2/ze1/zendapi/macros/register_stringl_constant.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
- REGISTER_STRINGL_CONSTANT
- ...
-
-
-
- &reftitle.description;
- #include <zend_constants.h>
-
- voidREGISTER_STRINGL_CONSTANT
- char*name
- ...str
- ...len
- intflags
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- str
-
-
- ...
-
-
-
-
- len
-
-
- ...
-
-
-
-
- flags
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_ascii_string.xml b/internals2/ze1/zendapi/macros/return_ascii_string.xml
deleted file mode 100644
index dcaf86d302ff..000000000000
--- a/internals2/ze1/zendapi/macros/return_ascii_string.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- RETURN_ASCII_STRING
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???RETURN_ASCII_STRING
- ???t
- ???duplicate
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- t
-
-
- ...
-
-
-
-
- duplicate
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_ascii_stringl.xml b/internals2/ze1/zendapi/macros/return_ascii_stringl.xml
deleted file mode 100644
index 5d39e4c5d17b..000000000000
--- a/internals2/ze1/zendapi/macros/return_ascii_stringl.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- RETURN_ASCII_STRINGL
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???RETURN_ASCII_STRINGL
- ???t
- ???l
- ???duplicate
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- t
-
-
- ...
-
-
-
-
- l
-
-
- ...
-
-
-
-
- duplicate
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_binary.xml b/internals2/ze1/zendapi/macros/return_binary.xml
deleted file mode 100644
index d5820cdf243a..000000000000
--- a/internals2/ze1/zendapi/macros/return_binary.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- RETURN_BINARY
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???RETURN_BINARY
- ???s
- ???duplicate
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- s
-
-
- ...
-
-
-
-
- duplicate
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_binaryl.xml b/internals2/ze1/zendapi/macros/return_binaryl.xml
deleted file mode 100644
index f45aa9c40357..000000000000
--- a/internals2/ze1/zendapi/macros/return_binaryl.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- RETURN_BINARYL
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???RETURN_BINARYL
- ???s
- ???l
- ???duplicate
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- s
-
-
- ...
-
-
-
-
- l
-
-
- ...
-
-
-
-
- duplicate
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_bool.xml b/internals2/ze1/zendapi/macros/return_bool.xml
deleted file mode 100644
index ffa24ac46086..000000000000
--- a/internals2/ze1/zendapi/macros/return_bool.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
- RETURN_BOOL
- Return a bool value from a function
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- voidRETURN_BOOL
- zend_boolb
-
-
- RETURN_BOOL sets the return_value
- of the given function to b and returns control to
- the calling function.
-
-
-
-
- &reftitle.parameters;
-
-
-
- b
-
-
- bool value to return.
-
-
-
-
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_double.xml b/internals2/ze1/zendapi/macros/return_double.xml
deleted file mode 100644
index 81731ab121ad..000000000000
--- a/internals2/ze1/zendapi/macros/return_double.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
- RETURN_DOUBLE
- Return a double value from a function
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- voidRETURN_DOUBLE
- doubled
-
-
- RETURN_DOUBLE sets the return_value
- of the given function to d and returns control to
- the calling function.
-
-
-
-
- &reftitle.parameters;
-
-
-
- d
-
-
- double value to return.
-
-
-
-
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_empty_binary.xml b/internals2/ze1/zendapi/macros/return_empty_binary.xml
deleted file mode 100644
index 130c1f927e2f..000000000000
--- a/internals2/ze1/zendapi/macros/return_empty_binary.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
- RETURN_EMPTY_BINARY
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- voidRETURN_EMPTY_BINARY
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
-
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_empty_string.xml b/internals2/ze1/zendapi/macros/return_empty_string.xml
deleted file mode 100644
index 025315ba9079..000000000000
--- a/internals2/ze1/zendapi/macros/return_empty_string.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
- RETURN_EMPTY_STRING
- Return an empty string value from a function
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- voidRETURN_EMPTY_STRING
-
-
- This returns an empty string without the need to create such a string first.
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_empty_unicode.xml b/internals2/ze1/zendapi/macros/return_empty_unicode.xml
deleted file mode 100644
index f23f339a96d1..000000000000
--- a/internals2/ze1/zendapi/macros/return_empty_unicode.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
- RETURN_EMPTY_UNICODE
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- voidRETURN_EMPTY_UNICODE
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
-
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_long.xml b/internals2/ze1/zendapi/macros/return_long.xml
deleted file mode 100644
index 479aeb90aa0a..000000000000
--- a/internals2/ze1/zendapi/macros/return_long.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
- RETURN_LONG
- Return a long value from a function
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- voidRETURN_LONG
- longl
-
-
- RETURN_LONG sets the return_value
- of the given function to l and returns control to
- the calling function.
-
-
-
-
- &reftitle.parameters;
-
-
-
- l
-
-
- long value to return.
-
-
-
-
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_null.xml b/internals2/ze1/zendapi/macros/return_null.xml
deleted file mode 100644
index e54eaf316c39..000000000000
--- a/internals2/ze1/zendapi/macros/return_null.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
- RETURN_NULL
- Return a null value from a function
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- voidRETURN_NULL
-
-
- RETURN_BOOL sets the return_value
- of the given function to &null; and returns control to
- the calling function.
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_resource.xml b/internals2/ze1/zendapi/macros/return_resource.xml
deleted file mode 100644
index e78d64bee240..000000000000
--- a/internals2/ze1/zendapi/macros/return_resource.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
- RETURN_RESOURCE
- Return a resource from a function
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- voidRETURN_RESOURCE
- resourcer
-
-
- RETURN_RESOURCE sets the return_value
- of the given function to r and returns control to
- the calling function.
-
-
-
-
- &reftitle.parameters;
-
-
-
- r
-
-
- The resource to be returned.
-
-
-
-
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_rt_string.xml b/internals2/ze1/zendapi/macros/return_rt_string.xml
deleted file mode 100644
index fda5fa6c142d..000000000000
--- a/internals2/ze1/zendapi/macros/return_rt_string.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- RETURN_RT_STRING
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???RETURN_RT_STRING
- ???t
- ???duplicate
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- t
-
-
- ...
-
-
-
-
- duplicate
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_rt_stringl.xml b/internals2/ze1/zendapi/macros/return_rt_stringl.xml
deleted file mode 100644
index 9a010e60ab6f..000000000000
--- a/internals2/ze1/zendapi/macros/return_rt_stringl.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- RETURN_RT_STRINGL
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???RETURN_RT_STRINGL
- ???t
- ???l
- ???duplicate
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- t
-
-
- ...
-
-
-
-
- l
-
-
- ...
-
-
-
-
- duplicate
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_string.xml b/internals2/ze1/zendapi/macros/return_string.xml
deleted file mode 100644
index a54f7ce4fab5..000000000000
--- a/internals2/ze1/zendapi/macros/return_string.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- RETURN_STRING
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???RETURN_STRING
- ???s
- ???duplicate
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- s
-
-
- ...
-
-
-
-
- duplicate
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_stringl.xml b/internals2/ze1/zendapi/macros/return_stringl.xml
deleted file mode 100644
index ccfe598edfc7..000000000000
--- a/internals2/ze1/zendapi/macros/return_stringl.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- RETURN_STRINGL
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???RETURN_STRINGL
- ???s
- ???l
- ???duplicate
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- s
-
-
- ...
-
-
-
-
- l
-
-
- ...
-
-
-
-
- duplicate
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_text.xml b/internals2/ze1/zendapi/macros/return_text.xml
deleted file mode 100644
index 5875e3ff1647..000000000000
--- a/internals2/ze1/zendapi/macros/return_text.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- RETURN_TEXT
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???RETURN_TEXT
- ???t
- ???duplicate
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- t
-
-
- ...
-
-
-
-
- duplicate
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_textl.xml b/internals2/ze1/zendapi/macros/return_textl.xml
deleted file mode 100644
index f48dd4ebf94d..000000000000
--- a/internals2/ze1/zendapi/macros/return_textl.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- RETURN_TEXTL
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???RETURN_TEXTL
- ???t
- ???l
- ???duplicate
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- t
-
-
- ...
-
-
-
-
- l
-
-
- ...
-
-
-
-
- duplicate
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_u_string.xml b/internals2/ze1/zendapi/macros/return_u_string.xml
deleted file mode 100644
index 43dfe6152336..000000000000
--- a/internals2/ze1/zendapi/macros/return_u_string.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- RETURN_U_STRING
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???RETURN_U_STRING
- ???conv
- ???t
- ???duplicate
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- conv
-
-
- ...
-
-
-
-
- t
-
-
- ...
-
-
-
-
- duplicate
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_u_stringl.xml b/internals2/ze1/zendapi/macros/return_u_stringl.xml
deleted file mode 100644
index 573e4819ea2d..000000000000
--- a/internals2/ze1/zendapi/macros/return_u_stringl.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
- RETURN_U_STRINGL
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???RETURN_U_STRINGL
- ???conv
- ???t
- ???l
- ???duplicate
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- conv
-
-
- ...
-
-
-
-
- t
-
-
- ...
-
-
-
-
- l
-
-
- ...
-
-
-
-
- duplicate
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_unicode.xml b/internals2/ze1/zendapi/macros/return_unicode.xml
deleted file mode 100644
index d1df918c4aaa..000000000000
--- a/internals2/ze1/zendapi/macros/return_unicode.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- RETURN_UNICODE
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???RETURN_UNICODE
- ???u
- ???duplicate
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- u
-
-
- ...
-
-
-
-
- duplicate
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_unicodel.xml b/internals2/ze1/zendapi/macros/return_unicodel.xml
deleted file mode 100644
index ea66fb9f97d1..000000000000
--- a/internals2/ze1/zendapi/macros/return_unicodel.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- RETURN_UNICODEL
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???RETURN_UNICODEL
- ???u
- ???l
- ???duplicate
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- u
-
-
- ...
-
-
-
-
- l
-
-
- ...
-
-
-
-
- duplicate
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/return_zval.xml b/internals2/ze1/zendapi/macros/return_zval.xml
deleted file mode 100644
index d522d1d19c45..000000000000
--- a/internals2/ze1/zendapi/macros/return_zval.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
-
-
- RETURN_ZVAL
- Return a zval value from a function
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- voidRETURN_ZVAL
- zval *zv
- boolcopy
- booldtor
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zv
-
-
- Pointer to the zval to return.
-
-
-
-
- copy
-
-
- Create a copy of zv before returning it?
-
-
-
-
- dtor
-
-
- Destruct the original value before returning from the function,
- this is needed if zv was only temporarily
- created within the function.
-
-
-
-
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/unregister_ini_entries.xml b/internals2/ze1/zendapi/macros/unregister_ini_entries.xml
deleted file mode 100644
index db14d9eba491..000000000000
--- a/internals2/ze1/zendapi/macros/unregister_ini_entries.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- UNREGISTER_INI_ENTRIES
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- voidUNREGISTER_INI_ENTRIES
- ...
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
-
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_arrval.xml b/internals2/ze1/zendapi/macros/z_arrval.xml
deleted file mode 100644
index d476562a7ff9..000000000000
--- a/internals2/ze1/zendapi/macros/z_arrval.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_ARRVAL
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- HashTableZ_ARRVAL
- zvalzval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_arrval_p.xml b/internals2/ze1/zendapi/macros/z_arrval_p.xml
deleted file mode 100644
index 2800229f86b5..000000000000
--- a/internals2/ze1/zendapi/macros/z_arrval_p.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_ARRVAL_P
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- HashTableZ_ARRVAL_P
- zval *zval_p
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_arrval_pp.xml b/internals2/ze1/zendapi/macros/z_arrval_pp.xml
deleted file mode 100644
index 2ddb92094e4b..000000000000
--- a/internals2/ze1/zendapi/macros/z_arrval_pp.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_ARRVAL_PP
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- HashTableZ_ARRVAL_PP
- zval **zval_pp
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_pp
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_binlen.xml b/internals2/ze1/zendapi/macros/z_binlen.xml
deleted file mode 100644
index 663392601444..000000000000
--- a/internals2/ze1/zendapi/macros/z_binlen.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_BINLEN
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- char *Z_BINLEN
- zvalzval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_binlen_p.xml b/internals2/ze1/zendapi/macros/z_binlen_p.xml
deleted file mode 100644
index 027cedd29a59..000000000000
--- a/internals2/ze1/zendapi/macros/z_binlen_p.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_BINLEN_P
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- char *Z_BINLEN_P
- zval *zval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_binlen_pp.xml b/internals2/ze1/zendapi/macros/z_binlen_pp.xml
deleted file mode 100644
index 3b2153246acb..000000000000
--- a/internals2/ze1/zendapi/macros/z_binlen_pp.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_BINLEN_PP
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- char *Z_BINLEN_PP
- zval **zval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_binval.xml b/internals2/ze1/zendapi/macros/z_binval.xml
deleted file mode 100644
index 0df1389a2b6a..000000000000
--- a/internals2/ze1/zendapi/macros/z_binval.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_BINVAL
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_BINVAL
- ???zval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_binval_p.xml b/internals2/ze1/zendapi/macros/z_binval_p.xml
deleted file mode 100644
index b6ddee8bcba9..000000000000
--- a/internals2/ze1/zendapi/macros/z_binval_p.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_BINVAL_P
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_BINVAL_P
- ???zval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_binval_pp.xml b/internals2/ze1/zendapi/macros/z_binval_pp.xml
deleted file mode 100644
index cb4042176d4c..000000000000
--- a/internals2/ze1/zendapi/macros/z_binval_pp.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_BINVAL_PP
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_BINVAL_PP
- ???zval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_bval.xml b/internals2/ze1/zendapi/macros/z_bval.xml
deleted file mode 100644
index d820e7556438..000000000000
--- a/internals2/ze1/zendapi/macros/z_bval.xml
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
-
- Z_BVAL
- Return a zvallval element as bool
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- zend_boolZ_BVAL
- zvalzv
-
-
- Z_BVAL returns the lval element
- of zv casted to zend_bool.
-
-
-
-
- &reftitle.parameters;
-
-
-
- zv
-
-
- The zval structure to extract the result value from.
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- The lval element of zv
- casted to a zend_bool which is either &true; or &false;.
-
-
-
-
- &reftitle.seealso;
-
- See Z_BVAL_P and Z_BVAL_PP for other
- macros that access the lval field of a zval
- as zend_bool.
-
-
- For macros that extract other values from a zval ** see
- Z_ARRVAL, Z_BINLEN,
- Z_BINVAL, ,
- Z_DVAL, Z_LVAL,
- Z_OBJCE, Z_OBJ_HANDLE,
- Z_OBJ_HANDLER, Z_OBJ_HT,
- Z_OBJPROP, Z_OBJVAL,
- Z_RESVAL, Z_STRLEN,
- Z_STRVAL, Z_TYPE,
- Z_UNILEN, Z_UNIVAL,
- Z_USTRCPLEN, Z_USTRLEN,
- and Z_USTRVAL.
-
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_bval_p.xml b/internals2/ze1/zendapi/macros/z_bval_p.xml
deleted file mode 100644
index 633c0122d061..000000000000
--- a/internals2/ze1/zendapi/macros/z_bval_p.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
- Z_BVAL_P
- Dereference a zval pointer and return its lval element as bool
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- zend_boolZ_BVAL_P
- zval *zval_p
-
-
- Z_BVAL_P returns the lval element
- of the zval structure pointed to by zval_p
- casted to zend_bool.
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- Pointer to the zval structure to extract the result value from.
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- The lval element of the zval structure
- pointed to by zval_p
- casted to a zend_bool which is either &true; or &false;.
-
-
-
-
- &reftitle.seealso;
-
- See Z_BVAL and Z_BVAL_PP for other
- macros that access the lval field of a zval
- as zend_bool.
-
-
- For macros that extract other values from a zval ** see
- Z_ARRVAL_P, Z_BINLEN_P,
- Z_BINVAL_P, ,
- Z_DVAL_P, Z_LVAL_P,
- Z_OBJCE_P, Z_OBJ_HANDLE_P,
- Z_OBJ_HANDLER_P, Z_OBJ_HT_P,
- Z_OBJPROP_P, Z_OBJVAL_P,
- Z_RESVAL_P, Z_STRLEN_P,
- Z_STRVAL_P, Z_TYPE_P,
- Z_UNILEN_P, Z_UNIVAL_P,
- Z_USTRCPLEN_P, Z_USTRLEN_P,
- and Z_USTRVAL_P.
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_bval_pp.xml b/internals2/ze1/zendapi/macros/z_bval_pp.xml
deleted file mode 100644
index ccee80c44c45..000000000000
--- a/internals2/ze1/zendapi/macros/z_bval_pp.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
- Z_BVAL_PP
- Dereference a pointer to a zval pointer and return its lval element as bool
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- zend_boolZ_BVAL_PP
- zval **zval_pp
-
-
- Z_BVAL_PP returns the lval element
- of the zval structure indirectly pointed to by
- zval_pp casted to zend_bool.
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_pp
-
-
- Pointer to a pointer to the zval structure to extract the result value from.
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- The lval element of the zval structure
- pointed to by the pointer pointed to by zval_pp
- casted to a zend_bool which is either &true; or &false;.
-
-
-
-
- &reftitle.seealso;
-
- See Z_BVAL and Z_BVAL_P for other
- macros that access the lval field of a zval
- as zend_bool.
-
-
- For macros that extract other values from a zval ** see
- Z_ARRVAL_PP, Z_BINLEN_PP,
- Z_BINVAL_PP, ,
- Z_DVAL_PP, Z_LVAL_PP,
- Z_OBJCE_PP, Z_OBJ_HANDLE_PP,
- Z_OBJ_HANDLER_PP, Z_OBJ_HT_PP,
- Z_OBJPROP_PP, Z_OBJVAL_PP,
- Z_RESVAL_PP, Z_STRLEN_PP,
- Z_STRVAL_PP, Z_TYPE_PP,
- Z_UNILEN_PP, Z_UNIVAL_PP,
- Z_USTRCPLEN_PP, Z_USTRLEN_PP,
- and Z_USTRVAL_PP.
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_dbg.xml b/internals2/ze1/zendapi/macros/z_dbg.xml
deleted file mode 100644
index e8ceec2388b0..000000000000
--- a/internals2/ze1/zendapi/macros/z_dbg.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_DBG
- ...
-
-
-
- &reftitle.description;
- #include <zend.h>
-
- ???Z_DBG
- ???expr
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- expr
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_dval.xml b/internals2/ze1/zendapi/macros/z_dval.xml
deleted file mode 100644
index a06b4cf16342..000000000000
--- a/internals2/ze1/zendapi/macros/z_dval.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_DVAL
- Return the dval element of a zval
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- doubleZ_DVAL
- zvalzval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_dval_p.xml b/internals2/ze1/zendapi/macros/z_dval_p.xml
deleted file mode 100644
index 5f81bfc0f7c0..000000000000
--- a/internals2/ze1/zendapi/macros/z_dval_p.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_DVAL_P
- Dereference a zval pointer and return its dval element
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- doubleZ_DVAL_P
- zval *zval_p
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_dval_pp.xml b/internals2/ze1/zendapi/macros/z_dval_pp.xml
deleted file mode 100644
index 07a85cd69953..000000000000
--- a/internals2/ze1/zendapi/macros/z_dval_pp.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_DVAL_PP
- Dereference a pointer to a zval pointer and return its dval element
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- doubleZ_DVAL_PP
- zval **zval_pp
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_pp
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_lval.xml b/internals2/ze1/zendapi/macros/z_lval.xml
deleted file mode 100644
index 125eced82f6e..000000000000
--- a/internals2/ze1/zendapi/macros/z_lval.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_LVAL
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- longZ_LVAL
- zvalzval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_lval_p.xml b/internals2/ze1/zendapi/macros/z_lval_p.xml
deleted file mode 100644
index a5fb6238a022..000000000000
--- a/internals2/ze1/zendapi/macros/z_lval_p.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_LVAL_P
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- longZ_LVAL_P
- zval *zval_p
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_lval_pp.xml b/internals2/ze1/zendapi/macros/z_lval_pp.xml
deleted file mode 100644
index 7d19f688366e..000000000000
--- a/internals2/ze1/zendapi/macros/z_lval_pp.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_LVAL_PP
- Dereference a pointer to a zval pointer and return its lval element
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- longZ_LVAL_PP
- zval **zval_pp
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_pp
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_obj_class_name_p.xml b/internals2/ze1/zendapi/macros/z_obj_class_name_p.xml
deleted file mode 100644
index 1e68685018fe..000000000000
--- a/internals2/ze1/zendapi/macros/z_obj_class_name_p.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_OBJ_CLASS_NAME_P
- ...
-
-
-
- &reftitle.description;
- #include <zend_execute.h>
-
- ???Z_OBJ_CLASS_NAME_P
- ???zval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_obj_handle.xml b/internals2/ze1/zendapi/macros/z_obj_handle.xml
deleted file mode 100644
index 8843a9c2a397..000000000000
--- a/internals2/ze1/zendapi/macros/z_obj_handle.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_OBJ_HANDLE
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_OBJ_HANDLE
- ???zval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_obj_handle_p.xml b/internals2/ze1/zendapi/macros/z_obj_handle_p.xml
deleted file mode 100644
index ace2ab9aa543..000000000000
--- a/internals2/ze1/zendapi/macros/z_obj_handle_p.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_OBJ_HANDLE_P
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_OBJ_HANDLE_P
- ???zval_p
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_obj_handle_pp.xml b/internals2/ze1/zendapi/macros/z_obj_handle_pp.xml
deleted file mode 100644
index d494357875e9..000000000000
--- a/internals2/ze1/zendapi/macros/z_obj_handle_pp.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_OBJ_HANDLE_PP
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_OBJ_HANDLE_PP
- ???zval_p
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_obj_handler.xml b/internals2/ze1/zendapi/macros/z_obj_handler.xml
deleted file mode 100644
index 901ba4790ee4..000000000000
--- a/internals2/ze1/zendapi/macros/z_obj_handler.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- Z_OBJ_HANDLER
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_OBJ_HANDLER
- ???zval
- ???hf
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
- hf
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_obj_handler_p.xml b/internals2/ze1/zendapi/macros/z_obj_handler_p.xml
deleted file mode 100644
index d9ffcc01c955..000000000000
--- a/internals2/ze1/zendapi/macros/z_obj_handler_p.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- Z_OBJ_HANDLER_P
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_OBJ_HANDLER_P
- ???zval_p
- ???h
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
- h
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_obj_handler_pp.xml b/internals2/ze1/zendapi/macros/z_obj_handler_pp.xml
deleted file mode 100644
index 9d9d5b09b780..000000000000
--- a/internals2/ze1/zendapi/macros/z_obj_handler_pp.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- Z_OBJ_HANDLER_PP
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_OBJ_HANDLER_PP
- ???zval_p
- ???h
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
- h
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_obj_ht.xml b/internals2/ze1/zendapi/macros/z_obj_ht.xml
deleted file mode 100644
index d8d26b20a3ab..000000000000
--- a/internals2/ze1/zendapi/macros/z_obj_ht.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_OBJ_HT
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_OBJ_HT
- ???zval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_obj_ht_p.xml b/internals2/ze1/zendapi/macros/z_obj_ht_p.xml
deleted file mode 100644
index 8ad38eeab3c4..000000000000
--- a/internals2/ze1/zendapi/macros/z_obj_ht_p.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_OBJ_HT_P
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_OBJ_HT_P
- ???zval_p
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_obj_ht_pp.xml b/internals2/ze1/zendapi/macros/z_obj_ht_pp.xml
deleted file mode 100644
index 609a622b8058..000000000000
--- a/internals2/ze1/zendapi/macros/z_obj_ht_pp.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_OBJ_HT_PP
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_OBJ_HT_PP
- ???zval_p
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_objce.xml b/internals2/ze1/zendapi/macros/z_objce.xml
deleted file mode 100644
index caeb268a823d..000000000000
--- a/internals2/ze1/zendapi/macros/z_objce.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_OBJCE
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_OBJCE
- ???zval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_objce_p.xml b/internals2/ze1/zendapi/macros/z_objce_p.xml
deleted file mode 100644
index 88514a4e863e..000000000000
--- a/internals2/ze1/zendapi/macros/z_objce_p.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_OBJCE_P
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_OBJCE_P
- ???zval_p
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_objce_pp.xml b/internals2/ze1/zendapi/macros/z_objce_pp.xml
deleted file mode 100644
index 3904093df63f..000000000000
--- a/internals2/ze1/zendapi/macros/z_objce_pp.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_OBJCE_PP
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_OBJCE_PP
- ???zval_pp
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_pp
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_objprop.xml b/internals2/ze1/zendapi/macros/z_objprop.xml
deleted file mode 100644
index 396976ba817b..000000000000
--- a/internals2/ze1/zendapi/macros/z_objprop.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_OBJPROP
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_OBJPROP
- ???zval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_objprop_p.xml b/internals2/ze1/zendapi/macros/z_objprop_p.xml
deleted file mode 100644
index e201f9a8e46c..000000000000
--- a/internals2/ze1/zendapi/macros/z_objprop_p.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_OBJPROP_P
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_OBJPROP_P
- ???zval_p
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_objprop_pp.xml b/internals2/ze1/zendapi/macros/z_objprop_pp.xml
deleted file mode 100644
index 400a64ffd299..000000000000
--- a/internals2/ze1/zendapi/macros/z_objprop_pp.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_OBJPROP_PP
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_OBJPROP_PP
- ???zval_pp
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_pp
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_objval.xml b/internals2/ze1/zendapi/macros/z_objval.xml
deleted file mode 100644
index 785d71acae1c..000000000000
--- a/internals2/ze1/zendapi/macros/z_objval.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_OBJVAL
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_OBJVAL
- ???zval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_objval_p.xml b/internals2/ze1/zendapi/macros/z_objval_p.xml
deleted file mode 100644
index d91654323aff..000000000000
--- a/internals2/ze1/zendapi/macros/z_objval_p.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_OBJVAL_P
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_OBJVAL_P
- ???zval_p
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_objval_pp.xml b/internals2/ze1/zendapi/macros/z_objval_pp.xml
deleted file mode 100644
index 1f17e3a1427e..000000000000
--- a/internals2/ze1/zendapi/macros/z_objval_pp.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_OBJVAL_PP
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_OBJVAL_PP
- ???zval_pp
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_pp
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_resval.xml b/internals2/ze1/zendapi/macros/z_resval.xml
deleted file mode 100644
index 7d5db12e4789..000000000000
--- a/internals2/ze1/zendapi/macros/z_resval.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_RESVAL
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_RESVAL
- ???zval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_resval_p.xml b/internals2/ze1/zendapi/macros/z_resval_p.xml
deleted file mode 100644
index e4778052266f..000000000000
--- a/internals2/ze1/zendapi/macros/z_resval_p.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_RESVAL_P
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_RESVAL_P
- ???zval_p
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_resval_pp.xml b/internals2/ze1/zendapi/macros/z_resval_pp.xml
deleted file mode 100644
index b1da9be9aab9..000000000000
--- a/internals2/ze1/zendapi/macros/z_resval_pp.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_RESVAL_PP
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- ???Z_RESVAL_PP
- ???zval_pp
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_pp
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_strlen.xml b/internals2/ze1/zendapi/macros/z_strlen.xml
deleted file mode 100644
index 9d3c1e5ac09e..000000000000
--- a/internals2/ze1/zendapi/macros/z_strlen.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_STRLEN
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- intZ_STRLEN
- zvalzval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_strlen_p.xml b/internals2/ze1/zendapi/macros/z_strlen_p.xml
deleted file mode 100644
index d0aa7c65799b..000000000000
--- a/internals2/ze1/zendapi/macros/z_strlen_p.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_STRLEN_P
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- intZ_STRLEN_P
- zval *zval_p
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_strlen_pp.xml b/internals2/ze1/zendapi/macros/z_strlen_pp.xml
deleted file mode 100644
index 1777c27bf412..000000000000
--- a/internals2/ze1/zendapi/macros/z_strlen_pp.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_STRLEN_PP
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- intZ_STRLEN_PP
- zval **zval_pp
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_pp
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_strval.xml b/internals2/ze1/zendapi/macros/z_strval.xml
deleted file mode 100644
index 7352cb2c047a..000000000000
--- a/internals2/ze1/zendapi/macros/z_strval.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_STRVAL
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- char *Z_STRVAL
- zvalzval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_strval_p.xml b/internals2/ze1/zendapi/macros/z_strval_p.xml
deleted file mode 100644
index 6fa6e0af6f14..000000000000
--- a/internals2/ze1/zendapi/macros/z_strval_p.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_STRVAL_P
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- char *Z_STRVAL_P
- zval *zval_p
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_strval_pp.xml b/internals2/ze1/zendapi/macros/z_strval_pp.xml
deleted file mode 100644
index 63ae365a81dd..000000000000
--- a/internals2/ze1/zendapi/macros/z_strval_pp.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_STRVAL_PP
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- char *Z_STRVAL_PP
- zval **zval_pp
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_pp
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_type.xml b/internals2/ze1/zendapi/macros/z_type.xml
deleted file mode 100644
index 26f8b25741a1..000000000000
--- a/internals2/ze1/zendapi/macros/z_type.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_TYPE
- Get the type field of a zval
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- zend_ucharZ_TYPE
- zvalzv
-
-
- Return the type field of a zval.
-
-
-
-
- &reftitle.parameters;
-
-
-
- zv
-
-
- A zval data structure.
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- The type field of zv.
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_type_p.xml b/internals2/ze1/zendapi/macros/z_type_p.xml
deleted file mode 100644
index 74dfefff0ebf..000000000000
--- a/internals2/ze1/zendapi/macros/z_type_p.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
- Z_TYPE_P
- Get type field from zval pointer
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- zend_ucharZ_TYPE_P
- zval *zval_p
-
-
- Return the type filed from the zval data structure
- pointed to by zval_p.
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- Pointer to a zval.
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- Type of the zval pointed to.
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_type_pp.xml b/internals2/ze1/zendapi/macros/z_type_pp.xml
deleted file mode 100644
index 47f31d6d866e..000000000000
--- a/internals2/ze1/zendapi/macros/z_type_pp.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
- Z_TYPE_PP
- Get type field from zval pointer pointer
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- zend_ucharZ_TYPE_PP
- zval **zval_pp
-
-
- Return the type filed from the zval data structure
- pointed to by the pointer pointed to by zval_pp.
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_pp
-
-
- Pointer to a pointer to a zval structure.
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- Type of the zval structure pointed to.
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_unilen.xml b/internals2/ze1/zendapi/macros/z_unilen.xml
deleted file mode 100644
index a54389ab2e04..000000000000
--- a/internals2/ze1/zendapi/macros/z_unilen.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_UNILEN
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- intZ_UNILEN
- zvalzval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_unilen_p.xml b/internals2/ze1/zendapi/macros/z_unilen_p.xml
deleted file mode 100644
index 6ba164abadf5..000000000000
--- a/internals2/ze1/zendapi/macros/z_unilen_p.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_UNILEN_P
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- intZ_UNILEN_P
- zval *zval_p
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_unilen_pp.xml b/internals2/ze1/zendapi/macros/z_unilen_pp.xml
deleted file mode 100644
index a2c781a69aa5..000000000000
--- a/internals2/ze1/zendapi/macros/z_unilen_pp.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_UNILEN_PP
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- intZ_UNILEN_PP
- zval **zval_pp
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_pp
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_unival.xml b/internals2/ze1/zendapi/macros/z_unival.xml
deleted file mode 100644
index 440538c00daa..000000000000
--- a/internals2/ze1/zendapi/macros/z_unival.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_UNIVAL
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- char *Z_UNIVAL
- zvalzval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_unival_p.xml b/internals2/ze1/zendapi/macros/z_unival_p.xml
deleted file mode 100644
index 456406dfe153..000000000000
--- a/internals2/ze1/zendapi/macros/z_unival_p.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_UNIVAL_P
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- char *Z_UNIVAL_P
- zval *zval_p
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_unival_pp.xml b/internals2/ze1/zendapi/macros/z_unival_pp.xml
deleted file mode 100644
index 714a1ed13e52..000000000000
--- a/internals2/ze1/zendapi/macros/z_unival_pp.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_UNIVAL_PP
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- char *Z_UNIVAL_PP
- zval **zval_pp
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_pp
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_ustrcplen.xml b/internals2/ze1/zendapi/macros/z_ustrcplen.xml
deleted file mode 100644
index 4f5d9b78405f..000000000000
--- a/internals2/ze1/zendapi/macros/z_ustrcplen.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_USTRCPLEN
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- int32_tZ_USTRCPLEN
- zvalzval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_ustrcplen_p.xml b/internals2/ze1/zendapi/macros/z_ustrcplen_p.xml
deleted file mode 100644
index a27358aaeb41..000000000000
--- a/internals2/ze1/zendapi/macros/z_ustrcplen_p.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_USTRCPLEN_P
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- int32_tZ_USTRCPLEN_P
- zval *zval_p
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_ustrcplen_pp.xml b/internals2/ze1/zendapi/macros/z_ustrcplen_pp.xml
deleted file mode 100644
index 982983b3dfec..000000000000
--- a/internals2/ze1/zendapi/macros/z_ustrcplen_pp.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_USTRCPLEN_PP
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- int32_tZ_USTRCPLEN_PP
- zval **zval_pp
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_pp
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_ustrlen.xml b/internals2/ze1/zendapi/macros/z_ustrlen.xml
deleted file mode 100644
index 86e444e9f40c..000000000000
--- a/internals2/ze1/zendapi/macros/z_ustrlen.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_USTRLEN
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- int32_tZ_USTRLEN
- zvalzval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_ustrlen_p.xml b/internals2/ze1/zendapi/macros/z_ustrlen_p.xml
deleted file mode 100644
index 27361709e8fb..000000000000
--- a/internals2/ze1/zendapi/macros/z_ustrlen_p.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_USTRLEN_P
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- int32_tZ_USTRLEN_P
- zval *zval_p
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_ustrlen_pp.xml b/internals2/ze1/zendapi/macros/z_ustrlen_pp.xml
deleted file mode 100644
index 06c62559d51b..000000000000
--- a/internals2/ze1/zendapi/macros/z_ustrlen_pp.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_USTRLEN_PP
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- int32_tZ_USTRLEN_PP
- zval **zval_pp
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_pp
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_ustrval.xml b/internals2/ze1/zendapi/macros/z_ustrval.xml
deleted file mode 100644
index 104f640f26b3..000000000000
--- a/internals2/ze1/zendapi/macros/z_ustrval.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_USTRVAL
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- UChar *Z_USTRVAL
- zvalzval
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_ustrval_p.xml b/internals2/ze1/zendapi/macros/z_ustrval_p.xml
deleted file mode 100644
index 7bbc1319c2db..000000000000
--- a/internals2/ze1/zendapi/macros/z_ustrval_p.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_USTRVAL_P
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- UChar *Z_USTRVAL_P
- zval *zval_p
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_p
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/z_ustrval_pp.xml b/internals2/ze1/zendapi/macros/z_ustrval_pp.xml
deleted file mode 100644
index d24987ebc0b1..000000000000
--- a/internals2/ze1/zendapi/macros/z_ustrval_pp.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- Z_USTRVAL_PP
- ...
-
-
-
- &reftitle.description;
- #include <zend_operators.h>
-
- UChar *Z_USTRVAL_PP
- zval **zval_pp
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zval_pp
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_abstract_me.xml b/internals2/ze1/zendapi/macros/zend_abstract_me.xml
deleted file mode 100644
index 16d2e299d689..000000000000
--- a/internals2/ze1/zendapi/macros/zend_abstract_me.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- ZEND_ABSTRACT_ME
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_ABSTRACT_ME
- ???classname
- ???name
- ???arg_info
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- classname
-
-
- ...
-
-
-
-
- name
-
-
- ...
-
-
-
-
- arg_info
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_arg_array_info.xml b/internals2/ze1/zendapi/macros/zend_arg_array_info.xml
deleted file mode 100644
index f578bbd4f7e7..000000000000
--- a/internals2/ze1/zendapi/macros/zend_arg_array_info.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- ZEND_ARG_ARRAY_INFO
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_ARG_ARRAY_INFO
- ???pass_by_ref
- ???name
- ???allow_null
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- pass_by_ref
-
-
- ...
-
-
-
-
- name
-
-
- ...
-
-
-
-
- allow_null
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_arg_info.xml b/internals2/ze1/zendapi/macros/zend_arg_info.xml
deleted file mode 100644
index d768995d6096..000000000000
--- a/internals2/ze1/zendapi/macros/zend_arg_info.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- ZEND_ARG_INFO
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_ARG_INFO
- ???pass_by_ref
- ???name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- pass_by_ref
-
-
- ...
-
-
-
-
- name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_arg_obj_info.xml b/internals2/ze1/zendapi/macros/zend_arg_obj_info.xml
deleted file mode 100644
index 7fa11e237058..000000000000
--- a/internals2/ze1/zendapi/macros/zend_arg_obj_info.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
- ZEND_ARG_OBJ_INFO
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_ARG_OBJ_INFO
- ???pass_by_ref
- ???name
- ???classname
- ???allow_null
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- pass_by_ref
-
-
- ...
-
-
-
-
- name
-
-
- ...
-
-
-
-
- classname
-
-
- ...
-
-
-
-
- allow_null
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_arg_pass_info.xml b/internals2/ze1/zendapi/macros/zend_arg_pass_info.xml
deleted file mode 100644
index 61a0447fb120..000000000000
--- a/internals2/ze1/zendapi/macros/zend_arg_pass_info.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_ARG_PASS_INFO
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_ARG_PASS_INFO
- ???pass_by_ref
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- pass_by_ref
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_begin_arg_info.xml b/internals2/ze1/zendapi/macros/zend_begin_arg_info.xml
deleted file mode 100644
index 80afdf7c58b6..000000000000
--- a/internals2/ze1/zendapi/macros/zend_begin_arg_info.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- ZEND_BEGIN_ARG_INFO
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_BEGIN_ARG_INFO
- ???name
- ???pass_rest_by_reference
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- pass_rest_by_reference
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_begin_arg_info_ex.xml b/internals2/ze1/zendapi/macros/zend_begin_arg_info_ex.xml
deleted file mode 100644
index 2f7e68a60ed2..000000000000
--- a/internals2/ze1/zendapi/macros/zend_begin_arg_info_ex.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
- ZEND_BEGIN_ARG_INFO_EX
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_BEGIN_ARG_INFO_EX
- ???name
- ???pass_rest_by_reference
- ???return_reference
- ???required_num_args
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- pass_rest_by_reference
-
-
- ...
-
-
-
-
- return_reference
-
-
- ...
-
-
-
-
- required_num_args
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_begin_module_globals.xml b/internals2/ze1/zendapi/macros/zend_begin_module_globals.xml
deleted file mode 100644
index a655356cd896..000000000000
--- a/internals2/ze1/zendapi/macros/zend_begin_module_globals.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_BEGIN_MODULE_GLOBALS
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_BEGIN_MODULE_GLOBALS
- ???module_name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- module_name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_coll_result.xml b/internals2/ze1/zendapi/macros/zend_coll_result.xml
deleted file mode 100644
index 9c39829543bf..000000000000
--- a/internals2/ze1/zendapi/macros/zend_coll_result.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_COLL_RESULT
- ...
-
-
-
- &reftitle.description;
- #include <zend.h>
-
- ???ZEND_COLL_RESULT
- ???n
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- n
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_declare_module_globals.xml b/internals2/ze1/zendapi/macros/zend_declare_module_globals.xml
deleted file mode 100644
index c0326da28196..000000000000
--- a/internals2/ze1/zendapi/macros/zend_declare_module_globals.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_DECLARE_MODULE_GLOBALS
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_DECLARE_MODULE_GLOBALS
- ???module_name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- module_name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_define_property.xml b/internals2/ze1/zendapi/macros/zend_define_property.xml
deleted file mode 100644
index e3b4621e3fc3..000000000000
--- a/internals2/ze1/zendapi/macros/zend_define_property.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
- ZEND_DEFINE_PROPERTY
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_DEFINE_PROPERTY
- ???class_ptr
- ???name
- ???value
- ???mask
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- class_ptr
-
-
- ...
-
-
-
-
- name
-
-
- ...
-
-
-
-
- value
-
-
- ...
-
-
-
-
- mask
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_end_arg_info.xml b/internals2/ze1/zendapi/macros/zend_end_arg_info.xml
deleted file mode 100644
index ab707c5c90f9..000000000000
--- a/internals2/ze1/zendapi/macros/zend_end_arg_info.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_END_ARG_INFO
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_END_ARG_INFO
- ???
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
-
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_end_module_globals.xml b/internals2/ze1/zendapi/macros/zend_end_module_globals.xml
deleted file mode 100644
index 2ebd6f9eaee9..000000000000
--- a/internals2/ze1/zendapi/macros/zend_end_module_globals.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_END_MODULE_GLOBALS
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_END_MODULE_GLOBALS
- ???module_name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- module_name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_extern_module_globals.xml b/internals2/ze1/zendapi/macros/zend_extern_module_globals.xml
deleted file mode 100644
index 10ae9d0f615b..000000000000
--- a/internals2/ze1/zendapi/macros/zend_extern_module_globals.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_EXTERN_MODULE_GLOBALS
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_EXTERN_MODULE_GLOBALS
- ???module_name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- module_name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_falias.xml b/internals2/ze1/zendapi/macros/zend_falias.xml
deleted file mode 100644
index d249e44d1bb4..000000000000
--- a/internals2/ze1/zendapi/macros/zend_falias.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- ZEND_FALIAS
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_FALIAS
- ???name
- ???alias
- ???arg_info
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- alias
-
-
- ...
-
-
-
-
- arg_info
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_fe.xml b/internals2/ze1/zendapi/macros/zend_fe.xml
deleted file mode 100644
index 70c911f4b8ab..000000000000
--- a/internals2/ze1/zendapi/macros/zend_fe.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- ZEND_FE
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_FE
- ???name
- ???arg_info
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- arg_info
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_fentry.xml b/internals2/ze1/zendapi/macros/zend_fentry.xml
deleted file mode 100644
index f865ae227cde..000000000000
--- a/internals2/ze1/zendapi/macros/zend_fentry.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
- ZEND_FENTRY
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_FENTRY
- ???zend_name
- ???name
- ???arg_info
- ???flags
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zend_name
-
-
- ...
-
-
-
-
- name
-
-
- ...
-
-
-
-
- arg_info
-
-
- ...
-
-
-
-
- flags
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_fetch_resource.xml b/internals2/ze1/zendapi/macros/zend_fetch_resource.xml
deleted file mode 100644
index 478261201ba5..000000000000
--- a/internals2/ze1/zendapi/macros/zend_fetch_resource.xml
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
- ZEND_FETCH_RESOURCE
- ...
-
-
-
- &reftitle.description;
- #include <zend_list.h>
-
- ???ZEND_FETCH_RESOURCE
- ???rsrc
- ???rsrc_type
- ???passed_id
- ???default_id
- ???resource_type_name
- ???resource_type
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- rsrc
-
-
- ...
-
-
-
-
- rsrc_type
-
-
- ...
-
-
-
-
- passed_id
-
-
- ...
-
-
-
-
- default_id
-
-
- ...
-
-
-
-
- resource_type_name
-
-
- ...
-
-
-
-
- resource_type
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_fetch_resource2.xml b/internals2/ze1/zendapi/macros/zend_fetch_resource2.xml
deleted file mode 100644
index 644f4699c239..000000000000
--- a/internals2/ze1/zendapi/macros/zend_fetch_resource2.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-
-
- ZEND_FETCH_RESOURCE2
- ...
-
-
-
- &reftitle.description;
- #include <zend_list.h>
-
- ???ZEND_FETCH_RESOURCE2
- ???rsrc
- ???rsrc_type
- ???passed_id
- ???default_id
- ???resource_type_name
- ???resource_type1
- ???resource_type2
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- rsrc
-
-
- ...
-
-
-
-
- rsrc_type
-
-
- ...
-
-
-
-
- passed_id
-
-
- ...
-
-
-
-
- default_id
-
-
- ...
-
-
-
-
- resource_type_name
-
-
- ...
-
-
-
-
- resource_type1
-
-
- ...
-
-
-
-
- resource_type2
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_fn.xml b/internals2/ze1/zendapi/macros/zend_fn.xml
deleted file mode 100644
index 5ca75fcea531..000000000000
--- a/internals2/ze1/zendapi/macros/zend_fn.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_FN
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_FN
- ???name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_fn_scope_name.xml b/internals2/ze1/zendapi/macros/zend_fn_scope_name.xml
deleted file mode 100644
index 8a5bfe2af8c5..000000000000
--- a/internals2/ze1/zendapi/macros/zend_fn_scope_name.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_FN_SCOPE_NAME
- ...
-
-
-
- &reftitle.description;
- #include <zend_compile.h>
-
- ???ZEND_FN_SCOPE_NAME
- ???function
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- function
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_function.xml b/internals2/ze1/zendapi/macros/zend_function.xml
deleted file mode 100644
index 93ca79344212..000000000000
--- a/internals2/ze1/zendapi/macros/zend_function.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_FUNCTION
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_FUNCTION
- ???name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_get_module.xml b/internals2/ze1/zendapi/macros/zend_get_module.xml
deleted file mode 100644
index 34c25000c886..000000000000
--- a/internals2/ze1/zendapi/macros/zend_get_module.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_GET_MODULE
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- voidZEND_GET_MODULE
- char *name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_get_resource_type_id.xml b/internals2/ze1/zendapi/macros/zend_get_resource_type_id.xml
deleted file mode 100644
index 82e746989451..000000000000
--- a/internals2/ze1/zendapi/macros/zend_get_resource_type_id.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- ZEND_GET_RESOURCE_TYPE_ID
- ...
-
-
-
- &reftitle.description;
- #include <zend_list.h>
-
- ???ZEND_GET_RESOURCE_TYPE_ID
- ???le_id
- ???le_type_name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- le_id
-
-
- ...
-
-
-
-
- le_type_name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_ini_begin.xml b/internals2/ze1/zendapi/macros/zend_ini_begin.xml
deleted file mode 100644
index 351357ab34b6..000000000000
--- a/internals2/ze1/zendapi/macros/zend_ini_begin.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_INI_BEGIN
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- ???ZEND_INI_BEGIN
- ???
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
-
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_ini_disp.xml b/internals2/ze1/zendapi/macros/zend_ini_disp.xml
deleted file mode 100644
index f177e0861987..000000000000
--- a/internals2/ze1/zendapi/macros/zend_ini_disp.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_INI_DISP
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- ???ZEND_INI_DISP
- ???name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_ini_end.xml b/internals2/ze1/zendapi/macros/zend_ini_end.xml
deleted file mode 100644
index 0c236340e60b..000000000000
--- a/internals2/ze1/zendapi/macros/zend_ini_end.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_INI_END
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- ???ZEND_INI_END
- ???
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
-
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_ini_entry.xml b/internals2/ze1/zendapi/macros/zend_ini_entry.xml
deleted file mode 100644
index 897a477373dd..000000000000
--- a/internals2/ze1/zendapi/macros/zend_ini_entry.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
- ZEND_INI_ENTRY
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- ???ZEND_INI_ENTRY
- ???name
- ???default_value
- ???modifiable
- ???on_modify
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- default_value
-
-
- ...
-
-
-
-
- modifiable
-
-
- ...
-
-
-
-
- on_modify
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_ini_entry1.xml b/internals2/ze1/zendapi/macros/zend_ini_entry1.xml
deleted file mode 100644
index 36f945068565..000000000000
--- a/internals2/ze1/zendapi/macros/zend_ini_entry1.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
- ZEND_INI_ENTRY1
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- ???ZEND_INI_ENTRY1
- ???name
- ???default_value
- ???modifiable
- ???on_modify
- ???arg1
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- default_value
-
-
- ...
-
-
-
-
- modifiable
-
-
- ...
-
-
-
-
- on_modify
-
-
- ...
-
-
-
-
- arg1
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_ini_entry1_ex.xml b/internals2/ze1/zendapi/macros/zend_ini_entry1_ex.xml
deleted file mode 100644
index 20c43aa432fc..000000000000
--- a/internals2/ze1/zendapi/macros/zend_ini_entry1_ex.xml
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
- ZEND_INI_ENTRY1_EX
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- ???ZEND_INI_ENTRY1_EX
- ???name
- ???default_value
- ???modifiable
- ???on_modify
- ???arg1
- ???displayer
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- default_value
-
-
- ...
-
-
-
-
- modifiable
-
-
- ...
-
-
-
-
- on_modify
-
-
- ...
-
-
-
-
- arg1
-
-
- ...
-
-
-
-
- displayer
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_ini_entry2.xml b/internals2/ze1/zendapi/macros/zend_ini_entry2.xml
deleted file mode 100644
index a69a07a2fb74..000000000000
--- a/internals2/ze1/zendapi/macros/zend_ini_entry2.xml
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
- ZEND_INI_ENTRY2
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- ???ZEND_INI_ENTRY2
- ???name
- ???default_value
- ???modifiable
- ???on_modify
- ???arg1
- ???arg2
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- default_value
-
-
- ...
-
-
-
-
- modifiable
-
-
- ...
-
-
-
-
- on_modify
-
-
- ...
-
-
-
-
- arg1
-
-
- ...
-
-
-
-
- arg2
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_ini_entry2_ex.xml b/internals2/ze1/zendapi/macros/zend_ini_entry2_ex.xml
deleted file mode 100644
index cc2fcf24ed41..000000000000
--- a/internals2/ze1/zendapi/macros/zend_ini_entry2_ex.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-
-
- ZEND_INI_ENTRY2_EX
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- ???ZEND_INI_ENTRY2_EX
- ???name
- ???default_value
- ???modifiable
- ???on_modify
- ???arg1
- ???arg2
- ???displayer
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- default_value
-
-
- ...
-
-
-
-
- modifiable
-
-
- ...
-
-
-
-
- on_modify
-
-
- ...
-
-
-
-
- arg1
-
-
- ...
-
-
-
-
- arg2
-
-
- ...
-
-
-
-
- displayer
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_ini_entry3.xml b/internals2/ze1/zendapi/macros/zend_ini_entry3.xml
deleted file mode 100644
index cff70c803b1e..000000000000
--- a/internals2/ze1/zendapi/macros/zend_ini_entry3.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-
-
- ZEND_INI_ENTRY3
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- ???ZEND_INI_ENTRY3
- ???name
- ???default_value
- ???modifiable
- ???on_modify
- ???arg1
- ???arg2
- ???arg3
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- default_value
-
-
- ...
-
-
-
-
- modifiable
-
-
- ...
-
-
-
-
- on_modify
-
-
- ...
-
-
-
-
- arg1
-
-
- ...
-
-
-
-
- arg2
-
-
- ...
-
-
-
-
- arg3
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_ini_entry3_ex.xml b/internals2/ze1/zendapi/macros/zend_ini_entry3_ex.xml
deleted file mode 100644
index d4c494d53590..000000000000
--- a/internals2/ze1/zendapi/macros/zend_ini_entry3_ex.xml
+++ /dev/null
@@ -1,128 +0,0 @@
-
-
-
-
- ZEND_INI_ENTRY3_EX
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- ???ZEND_INI_ENTRY3_EX
- ???name
- ???default_value
- ???modifiable
- ???on_modify
- ???arg1
- ???arg2
- ???arg3
- ???displayer
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- default_value
-
-
- ...
-
-
-
-
- modifiable
-
-
- ...
-
-
-
-
- on_modify
-
-
- ...
-
-
-
-
- arg1
-
-
- ...
-
-
-
-
- arg2
-
-
- ...
-
-
-
-
- arg3
-
-
- ...
-
-
-
-
- displayer
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_ini_entry_ex.xml b/internals2/ze1/zendapi/macros/zend_ini_entry_ex.xml
deleted file mode 100644
index dc9dfc78401b..000000000000
--- a/internals2/ze1/zendapi/macros/zend_ini_entry_ex.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
- ZEND_INI_ENTRY_EX
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- ???ZEND_INI_ENTRY_EX
- ???name
- ???default_value
- ???modifiable
- ???on_modify
- ???displayer
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- default_value
-
-
- ...
-
-
-
-
- modifiable
-
-
- ...
-
-
-
-
- on_modify
-
-
- ...
-
-
-
-
- displayer
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_ini_mh.xml b/internals2/ze1/zendapi/macros/zend_ini_mh.xml
deleted file mode 100644
index 2b392d3c4bad..000000000000
--- a/internals2/ze1/zendapi/macros/zend_ini_mh.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_INI_MH
- ...
-
-
-
- &reftitle.description;
- #include <zend_ini.h>
-
- ???ZEND_INI_MH
- ???name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_init_module_globals.xml b/internals2/ze1/zendapi/macros/zend_init_module_globals.xml
deleted file mode 100644
index 813ff5b2dd54..000000000000
--- a/internals2/ze1/zendapi/macros/zend_init_module_globals.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- ZEND_INIT_MODULE_GLOBALS
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_INIT_MODULE_GLOBALS
- ???module_name
- ???globals_ctor
- ???globals_dtor
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- module_name
-
-
- ...
-
-
-
-
- globals_ctor
-
-
- ...
-
-
-
-
- globals_dtor
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_init_symtable.xml b/internals2/ze1/zendapi/macros/zend_init_symtable.xml
deleted file mode 100644
index 6bc25fe4f5ab..000000000000
--- a/internals2/ze1/zendapi/macros/zend_init_symtable.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_INIT_SYMTABLE
- ...
-
-
-
- &reftitle.description;
- #include <zend_hash.h>
-
- ???ZEND_INIT_SYMTABLE
- ???ht
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- ht
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_init_symtable_ex.xml b/internals2/ze1/zendapi/macros/zend_init_symtable_ex.xml
deleted file mode 100644
index e6fb9123fba3..000000000000
--- a/internals2/ze1/zendapi/macros/zend_init_symtable_ex.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- ZEND_INIT_SYMTABLE_EX
- ...
-
-
-
- &reftitle.description;
- #include <zend_hash.h>
-
- ???ZEND_INIT_SYMTABLE_EX
- ???ht
- ???n
- ???persistent
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- ht
-
-
- ...
-
-
-
-
- n
-
-
- ...
-
-
-
-
- persistent
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_log_xor.xml b/internals2/ze1/zendapi/macros/zend_log_xor.xml
deleted file mode 100644
index 5f0c95619b83..000000000000
--- a/internals2/ze1/zendapi/macros/zend_log_xor.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- ZEND_LOG_XOR
- ...
-
-
-
- &reftitle.description;
- #include <zend.h>
-
- ???ZEND_LOG_XOR
- ???a
- ???b
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- a
-
-
- ...
-
-
-
-
- b
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_malias.xml b/internals2/ze1/zendapi/macros/zend_malias.xml
deleted file mode 100644
index e5211c4f7e8d..000000000000
--- a/internals2/ze1/zendapi/macros/zend_malias.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
- ZEND_MALIAS
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_MALIAS
- ???classname
- ???name
- ???alias
- ???arg_info
- ???flags
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- classname
-
-
- ...
-
-
-
-
- name
-
-
- ...
-
-
-
-
- alias
-
-
- ...
-
-
-
-
- arg_info
-
-
- ...
-
-
-
-
- flags
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_me.xml b/internals2/ze1/zendapi/macros/zend_me.xml
deleted file mode 100644
index 3d6bcdf012c8..000000000000
--- a/internals2/ze1/zendapi/macros/zend_me.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
- ZEND_ME
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_ME
- ???classname
- ???name
- ???arg_info
- ???flags
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- classname
-
-
- ...
-
-
-
-
- name
-
-
- ...
-
-
-
-
- arg_info
-
-
- ...
-
-
-
-
- flags
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_me_mapping.xml b/internals2/ze1/zendapi/macros/zend_me_mapping.xml
deleted file mode 100644
index d9ba2592714d..000000000000
--- a/internals2/ze1/zendapi/macros/zend_me_mapping.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
- ZEND_ME_MAPPING
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_ME_MAPPING
- ???name
- ???func_name
- ???arg_types
- ???flags
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- func_name
-
-
- ...
-
-
-
-
- arg_types
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_method.xml b/internals2/ze1/zendapi/macros/zend_method.xml
deleted file mode 100644
index 98092579f80f..000000000000
--- a/internals2/ze1/zendapi/macros/zend_method.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- ZEND_METHOD
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_METHOD
- ???classname
- ???name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- classname
-
-
- ...
-
-
-
-
- name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_mod_conflicts.xml b/internals2/ze1/zendapi/macros/zend_mod_conflicts.xml
deleted file mode 100644
index 9e9bfdc44bed..000000000000
--- a/internals2/ze1/zendapi/macros/zend_mod_conflicts.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_MOD_CONFLICTS
- ...
-
-
-
- &reftitle.description;
- #include <zend_modules.h>
-
- voidZEND_MOD_CONFLICTS
- char *name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_mod_conflicts_ex.xml b/internals2/ze1/zendapi/macros/zend_mod_conflicts_ex.xml
deleted file mode 100644
index b964a7ceb7f7..000000000000
--- a/internals2/ze1/zendapi/macros/zend_mod_conflicts_ex.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- ZEND_MOD_CONFLICTS_EX
- ...
-
-
-
- &reftitle.description;
- #include <zend_modules.h>
-
- voidZEND_MOD_CONFLICTS_EX
- char *name
- char *rel
- char *ver
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- rel
-
-
- ...
-
-
-
-
- ver
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_mod_optional.xml b/internals2/ze1/zendapi/macros/zend_mod_optional.xml
deleted file mode 100644
index 27ecdf21db07..000000000000
--- a/internals2/ze1/zendapi/macros/zend_mod_optional.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_MOD_OPTIONAL
- ...
-
-
-
- &reftitle.description;
- #include <zend_modules.h>
-
- voidZEND_MOD_OPTIONAL
- char *name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_mod_optional_ex.xml b/internals2/ze1/zendapi/macros/zend_mod_optional_ex.xml
deleted file mode 100644
index 78d4afb3972f..000000000000
--- a/internals2/ze1/zendapi/macros/zend_mod_optional_ex.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- ZEND_MOD_OPTIONAL_EX
- ...
-
-
-
- &reftitle.description;
- #include <zend_modules.h>
-
- voidZEND_MOD_OPTIONAL_EX
- char *name
- char *rel
- char *ver
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- rel
-
-
- ...
-
-
-
-
- ver
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_mod_required.xml b/internals2/ze1/zendapi/macros/zend_mod_required.xml
deleted file mode 100644
index fb5b2f1ddcbb..000000000000
--- a/internals2/ze1/zendapi/macros/zend_mod_required.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
- ZEND_MOD_REQUIRED
- Create a simple dependency entry for a required extension
-
-
-
- &reftitle.description;
- #include <zend_modules.h>
-
- voidZEND_MOD_REQUIRED
- char *ext_name
-
-
- ZEND_MOD_REQUIRED generates a zend_module_dep
- entry for the extension named by ext_name. A simple entry
- without further version specifications is generated.
- See ZEND_MOD_REQUIRED_EX for an extended version of this
- macro that also allows to specify version dependencies.
-
-
-
-
- &reftitle.parameters;
-
-
-
- ext_name
-
-
- The name of a required extension
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- Code to register the required extension dependency
-
-
-
-
- &reftitle.seealso;
-
- See ZEND_MOD_REQUIRED_EX if you also need to
- specify extension version requirements.
-
-
- See also ZEND_MOD_OPTIONAL,
- ZEND_MOD_OPTIONAL_EX,
- ZEND_MOD_CONFLICTS, and
- ZEND_MOD_CONFLICTS_EX.
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_mod_required_ex.xml b/internals2/ze1/zendapi/macros/zend_mod_required_ex.xml
deleted file mode 100644
index 5d1e6795c2f7..000000000000
--- a/internals2/ze1/zendapi/macros/zend_mod_required_ex.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-
-
-
-
- ZEND_MOD_REQUIRED_EX
- Create a full dependency entry for the required version of an extension
-
-
-
- &reftitle.description;
- #include <zend_modules.h>
-
- voidZEND_MOD_REQUIRED_EX
- char *name
- char *rel
- char *ver
-
-
- ZEND_MOD_REQUIRED_EX generates a zend_module_dep
- entry for the extension named by ext_name, including version
- information. It allows to specify requirements like "up to version x.y",
- "starting with version x.y" or "exactly version x.y".
-
-
-
- Version specific comparisons are not implemented yet,
- so for now ZEND_MOD_REUQUIRE and
- ZEND_MOD_REQUIRE_EX define identical behavior.
-
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- Name of the required extension
-
-
-
-
- rel
-
-
- Comparison operator, one of eq, lt,
- le, gt, or ge
-
-
-
-
- ver
-
-
- Version string
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- Code to register the required extension
-
-
-
-
- &reftitle.seealso;
-
- See ZEND_MOD_REQUIRED if you do not need to
- specify extension version requirements.
-
-
- See also ZEND_MOD_OPTIONAL,
- ZEND_MOD_OPTIONAL_EX,
- ZEND_MOD_CONFLICTS, and
- ZEND_MOD_CONFLICTS_EX.
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_module_activate_d.xml b/internals2/ze1/zendapi/macros/zend_module_activate_d.xml
deleted file mode 100644
index e1c81a763822..000000000000
--- a/internals2/ze1/zendapi/macros/zend_module_activate_d.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_MODULE_ACTIVATE_D
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_MODULE_ACTIVATE_D
- ???module
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- module
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_module_activate_n.xml b/internals2/ze1/zendapi/macros/zend_module_activate_n.xml
deleted file mode 100644
index d6fb41b445c9..000000000000
--- a/internals2/ze1/zendapi/macros/zend_module_activate_n.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_MODULE_ACTIVATE_N
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_MODULE_ACTIVATE_N
- ???module
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- module
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_module_deactivate_d.xml b/internals2/ze1/zendapi/macros/zend_module_deactivate_d.xml
deleted file mode 100644
index adc26d1f275f..000000000000
--- a/internals2/ze1/zendapi/macros/zend_module_deactivate_d.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_MODULE_DEACTIVATE_D
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_MODULE_DEACTIVATE_D
- ???module
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- module
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_module_deactivate_n.xml b/internals2/ze1/zendapi/macros/zend_module_deactivate_n.xml
deleted file mode 100644
index 320c5701c4b4..000000000000
--- a/internals2/ze1/zendapi/macros/zend_module_deactivate_n.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_MODULE_DEACTIVATE_N
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_MODULE_DEACTIVATE_N
- ???module
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- module
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_module_info_d.xml b/internals2/ze1/zendapi/macros/zend_module_info_d.xml
deleted file mode 100644
index 29fcb88d9888..000000000000
--- a/internals2/ze1/zendapi/macros/zend_module_info_d.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_MODULE_INFO_D
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_MODULE_INFO_D
- ???module
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- module
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_module_info_n.xml b/internals2/ze1/zendapi/macros/zend_module_info_n.xml
deleted file mode 100644
index 17f08d6f3463..000000000000
--- a/internals2/ze1/zendapi/macros/zend_module_info_n.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_MODULE_INFO_N
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_MODULE_INFO_N
- ???module
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- module
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_module_post_zend_deactivate_d.xml b/internals2/ze1/zendapi/macros/zend_module_post_zend_deactivate_d.xml
deleted file mode 100644
index f303e7e7cf8c..000000000000
--- a/internals2/ze1/zendapi/macros/zend_module_post_zend_deactivate_d.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_MODULE_POST_ZEND_DEACTIVATE_D
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_MODULE_POST_ZEND_DEACTIVATE_D
- ???module
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- module
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_module_post_zend_deactivate_n.xml b/internals2/ze1/zendapi/macros/zend_module_post_zend_deactivate_n.xml
deleted file mode 100644
index 684b16e59cb8..000000000000
--- a/internals2/ze1/zendapi/macros/zend_module_post_zend_deactivate_n.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_MODULE_POST_ZEND_DEACTIVATE_N
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_MODULE_POST_ZEND_DEACTIVATE_N
- ???module
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- module
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_module_shutdown_d.xml b/internals2/ze1/zendapi/macros/zend_module_shutdown_d.xml
deleted file mode 100644
index 5b7f90ad0ff4..000000000000
--- a/internals2/ze1/zendapi/macros/zend_module_shutdown_d.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_MODULE_SHUTDOWN_D
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_MODULE_SHUTDOWN_D
- ???module
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- module
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_module_shutdown_n.xml b/internals2/ze1/zendapi/macros/zend_module_shutdown_n.xml
deleted file mode 100644
index 1a97a2a8a982..000000000000
--- a/internals2/ze1/zendapi/macros/zend_module_shutdown_n.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_MODULE_SHUTDOWN_N
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_MODULE_SHUTDOWN_N
- ???module
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- module
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_module_startup_d.xml b/internals2/ze1/zendapi/macros/zend_module_startup_d.xml
deleted file mode 100644
index 539a32c0606a..000000000000
--- a/internals2/ze1/zendapi/macros/zend_module_startup_d.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_MODULE_STARTUP_D
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_MODULE_STARTUP_D
- ???module
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- module
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_module_startup_n.xml b/internals2/ze1/zendapi/macros/zend_module_startup_n.xml
deleted file mode 100644
index 4a4c91f9a242..000000000000
--- a/internals2/ze1/zendapi/macros/zend_module_startup_n.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_MODULE_STARTUP_N
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_MODULE_STARTUP_N
- ???module
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- module
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_named_fe.xml b/internals2/ze1/zendapi/macros/zend_named_fe.xml
deleted file mode 100644
index 14266845b475..000000000000
--- a/internals2/ze1/zendapi/macros/zend_named_fe.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- ZEND_NAMED_FE
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_NAMED_FE
- ???zend_name
- ???name
- ???arg_info
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- zend_name
-
-
- ...
-
-
-
-
- name
-
-
- ...
-
-
-
-
- arg_info
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_named_function.xml b/internals2/ze1/zendapi/macros/zend_named_function.xml
deleted file mode 100644
index 8959285a255c..000000000000
--- a/internals2/ze1/zendapi/macros/zend_named_function.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_NAMED_FUNCTION
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_NAMED_FUNCTION
- ???name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_normalize_bool.xml b/internals2/ze1/zendapi/macros/zend_normalize_bool.xml
deleted file mode 100644
index deee018b105d..000000000000
--- a/internals2/ze1/zendapi/macros/zend_normalize_bool.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_NORMALIZE_BOOL
- ...
-
-
-
- &reftitle.description;
- #include <zend.h>
-
- ???ZEND_NORMALIZE_BOOL
- ???n
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- n
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_num_args.xml b/internals2/ze1/zendapi/macros/zend_num_args.xml
deleted file mode 100644
index 3bf25b249bcb..000000000000
--- a/internals2/ze1/zendapi/macros/zend_num_args.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
- ZEND_NUM_ARGS
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- intZEND_NUM_ARGS
-
-
- ZEND_NUM_ARGS returns the number of arguments
- that have been passed by the caller of the current PHP function.
-
-
-
-
- &reftitle.returnvalues;
-
- Number of arguments passed to the current PHP function.
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_putc.xml b/internals2/ze1/zendapi/macros/zend_putc.xml
deleted file mode 100644
index 88735e5f479e..000000000000
--- a/internals2/ze1/zendapi/macros/zend_putc.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
-
-
- ZEND_PUTC
- Write a single character to the default output stream
-
-
-
- &reftitle.description;
- #include <zend.h>
-
- intZEND_PUTC
- charc
-
-
- Writes a single character c to the default output stream.
-
-
-
-
- &reftitle.parameters;
-
-
-
- c
-
-
- Output character
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- Number of characters written or -1 on errors.
-
-
-
-
- &reftitle.seealso;
-
- See also ZEND_PUTS and ZEND_WRITE.
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_puts.xml b/internals2/ze1/zendapi/macros/zend_puts.xml
deleted file mode 100644
index 96cd840d39a4..000000000000
--- a/internals2/ze1/zendapi/macros/zend_puts.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
-
-
- ZEND_PUTS
- Write a string to the default output stream
-
-
-
- &reftitle.description;
- #include <zend.h>
-
- intZEND_PUTS
- char *str
-
-
- Writes the zero terminated string str to the default output stream.
-
-
-
-
- &reftitle.parameters;
-
-
-
- str
-
-
- Output string
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- Number of characters written or -1 on errors.
-
-
-
-
- &reftitle.seealso;
-
- See also ZEND_PUTC and ZEND_WRITE.
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_register_resource.xml b/internals2/ze1/zendapi/macros/zend_register_resource.xml
deleted file mode 100644
index d3c5c48aed6b..000000000000
--- a/internals2/ze1/zendapi/macros/zend_register_resource.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- ZEND_REGISTER_RESOURCE
- ...
-
-
-
- &reftitle.description;
- #include <zend_list.h>
-
- ???ZEND_REGISTER_RESOURCE
- ???rsrc_result
- ???rsrc_pointer
- ???rsrc_type
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- rsrc_result
-
-
- ...
-
-
-
-
- rsrc_pointer
-
-
- ...
-
-
-
-
- rsrc_type
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_rsrc_dtor_func.xml b/internals2/ze1/zendapi/macros/zend_rsrc_dtor_func.xml
deleted file mode 100644
index 7312bfc17acf..000000000000
--- a/internals2/ze1/zendapi/macros/zend_rsrc_dtor_func.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_RSRC_DTOR_FUNC
- ...
-
-
-
- &reftitle.description;
- #include <zend_list.h>
-
- ???ZEND_RSRC_DTOR_FUNC
- ???name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_set_global_var.xml b/internals2/ze1/zendapi/macros/zend_set_global_var.xml
deleted file mode 100644
index 12c6f99c6c23..000000000000
--- a/internals2/ze1/zendapi/macros/zend_set_global_var.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
- ZEND_SET_GLOBAL_VAR
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_SET_GLOBAL_VAR
- ???name
- ???var
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- var
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_set_global_var_with_length.xml b/internals2/ze1/zendapi/macros/zend_set_global_var_with_length.xml
deleted file mode 100644
index ca74329bf65a..000000000000
--- a/internals2/ze1/zendapi/macros/zend_set_global_var_with_length.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
- ZEND_SET_GLOBAL_VAR_WITH_LENGTH
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_SET_GLOBAL_VAR_WITH_LENGTH
- ???name
- ???name_length
- ???var
- ???_refcount
- ???_is_ref
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
- name_length
-
-
- ...
-
-
-
-
- var
-
-
- ...
-
-
-
-
- _refcount
-
-
- ...
-
-
-
-
- _is_ref
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_set_symbol.xml b/internals2/ze1/zendapi/macros/zend_set_symbol.xml
deleted file mode 100644
index 10256da46510..000000000000
--- a/internals2/ze1/zendapi/macros/zend_set_symbol.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
- ZEND_SET_SYMBOL
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_SET_SYMBOL
- ???symtable
- ???name
- ???var
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- symtable
-
-
- ...
-
-
-
-
- name
-
-
- ...
-
-
-
-
- var
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_set_symbol_with_length.xml b/internals2/ze1/zendapi/macros/zend_set_symbol_with_length.xml
deleted file mode 100644
index 1c4dce883f76..000000000000
--- a/internals2/ze1/zendapi/macros/zend_set_symbol_with_length.xml
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
- ZEND_SET_SYMBOL_WITH_LENGTH
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_SET_SYMBOL_WITH_LENGTH
- ???symtable
- ???name
- ???name_length
- ???var
- ???_refcount
- ???_is_ref
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- symtable
-
-
- ...
-
-
-
-
- name
-
-
- ...
-
-
-
-
- name_length
-
-
- ...
-
-
-
-
- var
-
-
- ...
-
-
-
-
- _refcount
-
-
- ...
-
-
-
-
- _is_ref
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_strl.xml b/internals2/ze1/zendapi/macros/zend_strl.xml
deleted file mode 100644
index 7370afc43df2..000000000000
--- a/internals2/ze1/zendapi/macros/zend_strl.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
-
- ZEND_STRL
- Pass string pointer and length in one operation
-
-
-
- &reftitle.description;
- #include <zend.h>
-
- voidZEND_STRL
- char *str
-
-
- This is a convenience macro that can be used when passing a static string
- to a function that requires a string length argument together with a string.
- This saves duplicating the static string in the sourcecode or adding an extra
- variable for it.
-
-
- ZEND_STRL example
-
-
-
-
-
-
-
- &reftitle.parameters;
-
-
-
- str
-
-
- Pointer to a zero terminated string.
-
-
-
-
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_strs.xml b/internals2/ze1/zendapi/macros/zend_strs.xml
deleted file mode 100644
index ef0a935810a1..000000000000
--- a/internals2/ze1/zendapi/macros/zend_strs.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
- ZEND_STRS
- Pass string pointer and buffer size in one operation
-
-
-
- &reftitle.description;
- #include <zend.h>
-
- voidZEND_STRS
- char *str
-
-
- This is a convenience macro that can be used when passing a static string
- to a function that requires a buffer length argument together with a string.
- This saves duplicating the static string in the sourcecode or adding an extra
- variable for it.
-
-
-
-
- &reftitle.parameters;
-
-
-
- str
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_truth.xml b/internals2/ze1/zendapi/macros/zend_truth.xml
deleted file mode 100644
index 7be15b48f76a..000000000000
--- a/internals2/ze1/zendapi/macros/zend_truth.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_TRUTH
- Cast a value to zend_bool
-
-
-
- &reftitle.description;
- #include <zend.h>
-
- zend_boolZEND_TRUTH
- mixedx
-
-
- A simple conversion macro, actually defined as ((x) ? 1 : 0)
-
-
-
-
- &reftitle.parameters;
-
-
-
- x
-
-
- Value to cast
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- 1 if x was considered &true;, else 0
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_u_converter.xml b/internals2/ze1/zendapi/macros/zend_u_converter.xml
deleted file mode 100644
index 3f7355c00948..000000000000
--- a/internals2/ze1/zendapi/macros/zend_u_converter.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_U_CONVERTER
- ...
-
-
-
- &reftitle.description;
- #include <zend_unicode.h>
-
- ???ZEND_U_CONVERTER
- ???c
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- c
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_u_equal.xml b/internals2/ze1/zendapi/macros/zend_u_equal.xml
deleted file mode 100644
index 88578d7c06c4..000000000000
--- a/internals2/ze1/zendapi/macros/zend_u_equal.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
- ZEND_U_EQUAL
- ...
-
-
-
- &reftitle.description;
- #include <zend.h>
-
- ???ZEND_U_EQUAL
- ???type
- ???ustr
- ???ulen
- ???str
- ???slen
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- type
-
-
- ...
-
-
-
-
- ustr
-
-
- ...
-
-
-
-
- ulen
-
-
- ...
-
-
-
-
- str
-
-
- ...
-
-
-
-
- slen
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_u_set_symbol_with_length.xml b/internals2/ze1/zendapi/macros/zend_u_set_symbol_with_length.xml
deleted file mode 100644
index d0a84f48cae2..000000000000
--- a/internals2/ze1/zendapi/macros/zend_u_set_symbol_with_length.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-
-
- ZEND_U_SET_SYMBOL_WITH_LENGTH
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_U_SET_SYMBOL_WITH_LENGTH
- ???symtable
- ???type
- ???name
- ???name_length
- ???var
- ???_refcount
- ???_is_ref
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- symtable
-
-
- ...
-
-
-
-
- type
-
-
- ...
-
-
-
-
- name
-
-
- ...
-
-
-
-
- name_length
-
-
- ...
-
-
-
-
- var
-
-
- ...
-
-
-
-
- _refcount
-
-
- ...
-
-
-
-
- _is_ref
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_uv.xml b/internals2/ze1/zendapi/macros/zend_uv.xml
deleted file mode 100644
index bcef7185b527..000000000000
--- a/internals2/ze1/zendapi/macros/zend_uv.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_UV
- ...
-
-
-
- &reftitle.description;
- #include <zend.h>
-
- ???ZEND_UV
- ???name
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- name
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_verify_resource.xml b/internals2/ze1/zendapi/macros/zend_verify_resource.xml
deleted file mode 100644
index ff6927a8e603..000000000000
--- a/internals2/ze1/zendapi/macros/zend_verify_resource.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_VERIFY_RESOURCE
- ...
-
-
-
- &reftitle.description;
- #include <zend_list.h>
-
- ???ZEND_VERIFY_RESOURCE
- ???rsrc
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
- rsrc
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_write.xml b/internals2/ze1/zendapi/macros/zend_write.xml
deleted file mode 100644
index 236061ad3018..000000000000
--- a/internals2/ze1/zendapi/macros/zend_write.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
- ZEND_WRITE
- Write character buffer to the default output stream
-
-
-
- &reftitle.description;
- #include <zend.h>
-
- intZEND_WRITE
- char *str
- intstr_len
-
-
- Write str_len bytes from the buffer pointed to by
- str to the default output stream.
-
-
-
-
- &reftitle.parameters;
-
-
-
- str
-
-
- Pointer to character buffer
-
-
-
-
- str_len
-
-
- Buffer length
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- Number of characters written or -1 on errors.
-
-
-
-
- &reftitle.seealso;
-
- See also ZEND_PUTC and ZEND_PUTS.
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_wrong_param_count.xml b/internals2/ze1/zendapi/macros/zend_wrong_param_count.xml
deleted file mode 100644
index fa5ab2461bec..000000000000
--- a/internals2/ze1/zendapi/macros/zend_wrong_param_count.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
- ZEND_WRONG_PARAM_COUNT
- ...
-
-
-
- &reftitle.description;
- #include <zend_API.h>
-
- ???ZEND_WRONG_PARAM_COUNT
- ???
-
-
- ...
-
-
-
-
- &reftitle.parameters;
-
-
-
-
-
-
- ...
-
-
-
-
-
-
-
-
- &reftitle.returnvalues;
-
- ...
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/macros/zend_wrong_param_count_with_retval.xml b/internals2/ze1/zendapi/macros/zend_wrong_param_count_with_retval.xml
deleted file mode 100644
index ff696041937e..000000000000
--- a/internals2/ze1/zendapi/macros/zend_wrong_param_count_with_retval.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
- ZEND_WRONG_PARAM_COUNT_WITH_RETVAL
- Generate standard error message and return custom value
-
-
-
- &reftitle.description;
- #include <zend_API.h>
- #include <zend_API.h>
-
- voidZEND_WRONG_PARAM_COUNT_WITH_RETVAL
- mixedreturn_value
-
- This macro is part of the API but not used in any bundled or PECL extension
-
- ZEND_WRONG_PARAM_COUNT_WITH_RETVAL produces a standard warning message
- for functions or class methods that have been called with a wrong number of
- parameters and returns its parameter to the calling function.
- The macro automaticly puts the right function name and class
- name (if needed) into the error message.
-
-
- The return_value parameter is returned to the calling
- function of the current one.
-
-
- ZEND_WRONG_PARAM_COUNT_WITH_RETVAL is actually a convenience
- wrapper for zend_wrong_param_count.
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/overview.xml b/internals2/ze1/zendapi/overview.xml
deleted file mode 100644
index f1a2d6239121..000000000000
--- a/internals2/ze1/zendapi/overview.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-
-
-
-
- Overview
-
- "Extending PHP" is easier said than done. PHP has evolved to a
- full-fledged tool consisting of a few megabytes of source code,
- and to hack a system like this quite a few things have to be
- learned and considered. When structuring this chapter, we finally
- decided on the "learn by doing" approach. This is not the most
- scientific and professional approach, but the method that's the
- most fun and gives the best end results. In the following
- sections, you'll learn quickly how to get the most basic
- extensions to work almost instantly. After that, you'll learn
- about Zend's advanced API functionality. The alternative would
- have been to try to impart the functionality, design, tips,
- tricks, etc. as a whole, all at once, thus giving a complete look
- at the big picture before doing anything practical. Although this
- is the "better" method, as no dirty hacks have to be made, it can
- be very frustrating as well as energy- and time-consuming, which
- is why we've decided on the direct approach.
-
-
- Note that even though this chapter tries to impart as much
- knowledge as possible about the inner workings of PHP, it's
- impossible to really give a complete guide to extending PHP that
- works 100% of the time in all cases. PHP is such a huge and
- complex package that its inner workings can only be understood if
- you make yourself familiar with it by practicing, so we encourage
- you to work with the source.
-
-
-
- What Is Zend? and What Is PHP?
-
- The name Zend refers to the language engine,
- PHP's core. The term PHP refers to the
- complete system as it appears from the outside. This might sound
- a bit confusing at first, but it's not that complicated (
- see
- below). To implement a Web script interpreter, you need
- three parts:
-
-
-
- The interpreter part analyzes the input
- code, translates it, and executes it.
-
-
-
-
- The functionality part implements the
- functionality of the language (its functions, etc.).
-
-
-
-
- The interface part talks to the Web
- server, etc.
-
-
-
- Zend takes part 1 completely and a bit of part 2; PHP takes parts
- 2 and 3. Together they form the complete PHP package. Zend itself
- really forms only the language core, implementing PHP at its very
- basics with some predefined functions. PHP contains all the
- modules that actually create the language's outstanding
- capabilities.
-
- The internal structure of PHP.
-
-
-
-
-
-
- The following sections discuss where PHP can be extended and how
- it's done.
-
-
-
-
diff --git a/internals2/ze1/zendapi/possibilities.xml b/internals2/ze1/zendapi/possibilities.xml
deleted file mode 100644
index 4ee80aa2f46e..000000000000
--- a/internals2/ze1/zendapi/possibilities.xml
+++ /dev/null
@@ -1,164 +0,0 @@
-
-
-
-
- Extension Possibilities
-
- As shown above, PHP can be extended primarily at
- three points: external modules, built-in modules, and the Zend
- engine. The following sections discuss these options.
-
-
- External Modules
-
- External modules can be loaded at script runtime using the
- function dl. This function loads a shared
- object from disk and makes its functionality available to the
- script to which it's being bound. After the script is terminated,
- the external module is discarded from memory. This method has both
- advantages and disadvantages, as described in the following table:
-
-
-
-
-
-
-
- Advantages
- Disadvantages
-
-
-
- External modules don't require recompiling of PHP.
-
-
- The shared objects need to be loaded every time a script is
- being executed (every hit), which is very slow.
-
-
-
-
- The size of PHP remains small by "outsourcing" certain
- functionality.
-
-
- External additional files clutter up the disk.
-
-
-
-
-
- Every script that wants to use an external module's
- functionality has to specifically include a call to
- dl, or the extension
- tag in php.ini needs to be modified
- (which is not always a suitable solution).
-
-
-
-
- To sum up, external modules are great for
- third-party products, small additions to PHP that are rarely used,
- or just for testing purposes. To develop additional functionality
- quickly, external modules provide the best results. For frequent
- usage, larger implementations, and complex code, the disadvantages
- outweigh the advantages.
-
-
- Third parties might consider using the
- extension tag in php.ini
- to create additional external modules to PHP. These external
- modules are completely detached from the main package, which is a
- very handy feature in commercial environments. Commercial
- distributors can simply ship disks or archives containing only
- their additional modules, without the need to create fixed and
- solid PHP binaries that don't allow other modules to be bound to
- them.
-
-
-
-
- Built-in Modules
-
- Built-in modules are compiled directly into PHP and carried around
- with every PHP process; their functionality is instantly available
- to every script that's being run. Like external modules, built-in
- modules have advantages and disadvantages, as described in the
- following table:
-
-
-
-
-
-
- Advantages
- Disadvantages
-
-
-
- No need to load the module specifically; the functionality is
- instantly available.
-
-
- Changes to built-in modules require recompiling of PHP.
-
-
-
-
- No external files clutter up the disk; everything resides in
- the PHP binary.
-
-
- The PHP binary grows and consumes more memory.
-
-
-
-
-
- Built-in modules are best when you have a solid
- library of functions that remains relatively unchanged, requires
- better than poor-to-average performance, or is used frequently by
- many scripts on your site. The need to recompile PHP is quickly
- compensated by the benefit in speed and ease of use. However,
- built-in modules are not ideal when rapid development of small
- additions is required.
-
-
-
-
- The Zend Engine
-
- Of course, extensions can also be implemented directly in the Zend
- engine. This strategy is good if you need a change in the language
- behavior or require special functions to be built directly into
- the language core. In general, however, modifications to the Zend
- engine should be avoided. Changes here result in incompatibilities
- with the rest of the world, and hardly anyone will ever adapt to
- specially patched Zend engines. Modifications can't be detached
- from the main PHP sources and are overridden with the next update
- using the "official" source repositories. Therefore, this method
- is generally considered bad practice and, due to its rarity, is
- not covered in this book.
-
-
-
-
diff --git a/internals2/ze1/zendapi/printing.xml b/internals2/ze1/zendapi/printing.xml
deleted file mode 100644
index 255d794acff0..000000000000
--- a/internals2/ze1/zendapi/printing.xml
+++ /dev/null
@@ -1,216 +0,0 @@
-
-
-
- Printing Information
-
- Often it's necessary to print messages to the output stream from
- your module, just as print would be used
- within a script. PHP offers functions for most generic tasks, such
- as printing warning messages, generating output for
- phpinfo, and so on. The following sections
- provide more details. Examples of these functions can be found on
- the CD-ROM.
-
-
- zend_printf
-
- zend_printf works like the
- standard printf, except that it prints to Zend's
- output stream.
-
-
-
-
- zend_error
-
- zend_error can be used to generate error messages.
- This function accepts two arguments; the first is the error type (see
- zend_errors.h), and the second is the error message.
-
-
-
- shows a list
- of possible values (see below). These
- values are also referred to in php.ini. Depending on
- which error type you choose, your messages will be logged.
-
- Zend's Predefined Error Messages.
-
-
-
-
-
- Error
- Description
-
-
- E_ERROR
-
- Signals an error and terminates execution of the script
- immediately.
-
-
- E_WARNING
-
- Signals a generic warning. Execution continues.
-
-
-
- E_PARSE
-
- Signals a parser error. Execution continues.
-
-
-
- E_NOTICE
-
- Signals a notice. Execution continues. Note that by
- default the display of this type of error messages is turned off in
- php.ini.
-
-
-
- E_CORE_ERROR
-
- Internal error by the core; shouldn't be used by
- user-written modules.
-
-
-
- E_COMPILE_ERROR
-
- Internal error by the compiler; shouldn't be used by
- user-written modules.
-
-
-
- E_COMPILE_WARNING
-
- Internal warning by the compiler; shouldn't be used by
- user-written modules.
-
-
-
-
-
-
- Display of warning messages in the browser.
-
-
-
-
-
-
-
-
- Including Output in phpinfo
-
- After creating a real module, you'll want to show information
- about the module in phpinfo (in addition to the
- module name, which appears in the module list by default). PHP allows
- you to create your own section in the phpinfo output with the ZEND_MINFO() function. This function
- should be placed in the module descriptor block (discussed earlier) and is
- always called whenever a script calls phpinfo.
-
-
- PHP automatically prints a section
- in phpinfo for you if you specify the ZEND_MINFO
- function, including the module name in the heading. Everything else must be
- formatted and printed by you.
-
-
- Typically, you can print an HTML table header
- using php_info_print_table_start and then use the standard
- functions php_info_print_table_header
- and php_info_print_table_row. As arguments, both take the number of
- columns (as integers) and the column contents (as strings). shows a source example and its output. To print the table footer, use php_info_print_table_end.
-
-
-
- Source code and screenshot for output in phpinfo.
-
-
-
-
-
- Output of phpinfo()
-
-
-
-
-
-
-
-
- Execution Information
-
- You can also print execution information, such as the current file
- being executed. The name of the function currently being executed
- can be retrieved using the function
- get_active_function_name. This function
- returns a pointer to the function name and doesn't accept any
- arguments. To retrieve the name of the file currently being
- executed, use zend_get_executed_filename.
- This function accesses the executor globals, which are passed to
- it using the TSRMLS_C macro. The executor globals
- are automatically available to every function that's called
- directly by Zend (they're part of the
- INTERNAL_FUNCTION_PARAMETERS described earlier
- in this chapter). If you want to access the executor globals in
- another function that doesn't have them available automatically,
- call the macro TSRMLS_FETCH() once in that
- function; this will introduce them to your local scope.
-
-
- Finally, the line number currently being executed can be retrieved
- using the function zend_get_executed_lineno.
- This function also requires the executor globals as arguments. For
- examples of these functions, see .
-
-
- Printing execution information.
-
-
-
-
- Printing execution information
-
-
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/returning.xml b/internals2/ze1/zendapi/returning.xml
deleted file mode 100644
index 5486be1f4c7c..000000000000
--- a/internals2/ze1/zendapi/returning.xml
+++ /dev/null
@@ -1,209 +0,0 @@
-
-
-
- Returning Values
-
- Returning values from your functions to PHP was described briefly
- in an earlier section; this section gives the details. Return
- values are passed via the return_value variable,
- which is passed to your functions as argument. The
- return_value argument consists of a
- zval container (see the earlier discussion of the
- call interface) that you can freely modify. The container itself is
- already allocated, so you don't have to run
- MAKE_STD_ZVAL on it. Instead, you can access its
- members directly.
-
-
- To make returning values from functions easier and to prevent
- hassles with accessing the internal structures of the
- zval container, a set of predefined macros is
- available (as usual). These macros automatically set the
- correspondent type and value, as described in
- and .
-
-
-
- The macros in automatically
- return from your function, those in
- only set
- the return value; they don't return from your function.
-
-
-
- Predefined Macros for Returning Values from a
- Function
-
-
-
-
-
- Macro
- Description
-
-
- RETURN_RESOURCE(resource)
- Returns a resource.
-
-
- RETURN_BOOL(bool)
- Returns a Boolean.
-
-
- RETURN_NULL()
- Returns nothing (a NULL value).
-
-
- RETURN_LONG(long)
- Returns a long.
-
-
- RETURN_DOUBLE(double)
- Returns a double.
-
-
-
- RETURN_STRING(string, duplicate)
-
-
- Returns a string. The duplicate flag indicates
- whether the string should be duplicated using
- estrdup.
-
-
-
-
- RETURN_STRINGL(string, length, duplicate)
-
-
- Returns a string of the specified length; otherwise, behaves
- like RETURN_STRING. This macro is faster
- and binary-safe, however.
-
-
-
- RETURN_EMPTY_STRING()
- Returns an empty string.
-
-
- RETURN_FALSE
- Returns Boolean false.
-
-
- RETURN_TRUE
- Returns Boolean true.
-
-
-
-
-
- Predefined Macros for Setting the Return Value
- of a Function
-
-
-
-
-
- Macro
- Description
-
-
- RETVAL_RESOURCE(resource)
- Sets the return value to the specified
- resource.
-
-
- RETVAL_BOOL(bool)
- Sets the return value to the specified
- Boolean value.
-
-
- RETVAL_NULL
- Sets the return value to NULL.
-
-
- RETVAL_LONG(long)
-
- Sets the return value to the specified long.
-
-
-
- RETVAL_DOUBLE(double)
-
- Sets the return value to the specified double.
-
-
-
-
- RETVAL_STRING(string, duplicate)
-
-
- Sets the return value to the specified string and duplicates
- it to Zend internal memory if desired (see also
- RETURN_STRING).
-
-
-
-
- RETVAL_STRINGL(string, length, duplicate)
-
-
- Sets the return value to the specified string and forces the
- length to become length (see also
- RETVAL_STRING). This macro is faster and
- binary-safe, and should be used whenever the string length is
- known.
-
-
-
-
- RETVAL_EMPTY_STRING
-
-
- Sets the return value to an empty string.
-
-
-
- RETVAL_FALSE
-
- Sets the return value to Boolean false.
-
-
-
- RETVAL_TRUE
-
- Sets the return value to Boolean true.
-
-
-
-
-
-
- Complex types such as arrays and objects can be returned by using
- array_init and
- object_init, as well as the corresponding hash
- functions on return_value. Since these types cannot
- be constructed of trivial information, there are no predefined
- macros for them.
-
-
-
diff --git a/internals2/ze1/zendapi/startup-and-shutdown.xml b/internals2/ze1/zendapi/startup-and-shutdown.xml
deleted file mode 100644
index d076b03ee0bc..000000000000
--- a/internals2/ze1/zendapi/startup-and-shutdown.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
- Startup and Shutdown Functions
-
- Startup and shutdown functions can be used for one-time
- initialization and deinitialization of your modules. As discussed
- earlier in this chapter (see the description of the Zend module
- descriptor block), there are module, and request startup
- and shutdown events.
-
-
- The module startup and shutdown functions are called whenever a
- module is loaded and needs initialization; the request startup and
- shutdown functions are called every time a request is processed
- (meaning that a file is being executed).
-
-
- For dynamic extensions, module and request startup/shutdown events
- happen at the same time.
-
-
- Declaration and implementation of these functions can be done with
- macros; see the earlier section "Declaration of the Zend Module
- Block" for details.
-
-
-
diff --git a/internals2/ze1/zendapi/structure.xml b/internals2/ze1/zendapi/structure.xml
deleted file mode 100644
index da5952d227e9..000000000000
--- a/internals2/ze1/zendapi/structure.xml
+++ /dev/null
@@ -1,724 +0,0 @@
-
-
-
- Source Discussion
-
- Now that you've got a safe build environment and you're able to include
- the modules into PHP files, it's time to discuss how everything works.
-
-
- Module Structure
-
- All PHP modules follow a common structure:
-
-
-
- Header file inclusions (to include all required macros, API
- definitions, etc.)
-
-
-
-
- C declaration of exported functions (required to declare the Zend
- function block)
-
-
-
- Declaration of the Zend function block
-
-
- Declaration of the Zend module block
-
-
- Implementation of get_module
-
-
- Implementation of all exported functions
-
-
-
-
-
- Header File Inclusions
-
- The only header file you really have to include for your modules is
- php.h, located in the PHP directory. This file makes all
- macros and API definitions required to build new modules available to your
- code.
-
-
- Tip: It's good practice to create a separate
- header file for your module that contains module-specific
- definitions. This header file should contain all the forward
- definitions for exported functions and include
- php.h. If you created your module using
- ext_skel you already have such a header file
- prepared.
-
-
-
-
- Declaring Exported Functions
-
- To declare functions that are to be exported (i.e., made available to PHP
- as new native functions), Zend provides a set of macros. A sample declaration
- looks like this:
-
-
-
-
-
- ZEND_FUNCTION declares a new C function that complies
- with Zend's internal API. This means that the function is of
- type void and
- accepts INTERNAL_FUNCTION_PARAMETERS (another macro) as
- parameters. Additionally, it prefixes the function name with
- zif. The immediately expanded version of the above
- definitions would look like this:
-
-
-
- Expanding INTERNAL_FUNCTION_PARAMETERS
- results in the following:
-
-
-
-
-
- Since the interpreter and executor core have been separated from
- the main PHP package, a second API defining macros and function
- sets has evolved: the Zend API. As the Zend API now handles quite
- a few of the responsibilities that previously belonged to PHP, a
- lot of PHP functions have been reduced to macros aliasing to calls
- into the Zend API. The recommended practice is to use the Zend API
- wherever possible, as the old API is only preserved for
- compatibility reasons. For example, the types zval
- and pval are identical. zval is
- Zend's definition; pval is PHP's definition
- (actually, pval is an alias for zval
- now). As the macro INTERNAL_FUNCTION_PARAMETERS
- is a Zend macro, the above declaration contains
- zval. When writing code, you should always use
- zval to conform to the new Zend API.
-
-
- The parameter list of this declaration is very important; you should keep these parameters in mind (see for descriptions).
-
- Zend's Parameters to Functions Called from PHP
-
-
-
-
-
- Parameter
- Description
-
-
- ht
-
- The number of arguments passed to the Zend function.
- You should not touch this directly, but instead use ZEND_NUM_ARGS() to obtain the
- value.
-
-
-
-
- return_value
-
- This variable is used to pass any return values of
- your function back to PHP. Access to this variable is best done using the
- predefined macros. For a description of these see below.
-
-
-
- this_ptr
-
- Using this variable, you can gain access to the object
- in which your function is contained, if it's used within an object. Use
- the function getThis to obtain this pointer.
-
-
-
- return_value_used
-
- This flag indicates whether an eventual return value
- from this function will actually be used by the calling script.
- 0 indicates that the return value is not used;
- 1 indicates that the caller expects a return value.
- Evaluation of this flag can be done to verify correct usage of the function as
- well as speed optimizations in case returning a value requires expensive
- operations (for an example, see how array.c makes use of
- this).
-
-
-
- executor_globals
-
- This variable points to global settings of the Zend
- engine. You'll find this useful when creating new variables, for example
- (more about this later). The executor globals can also be introduced to your
- function by using the macro TSRMLS_FETCH().
-
-
-
-
-
-
-
-
-
- Declaration of the Zend Function Block
-
- Now that you have declared the functions to be exported, you also
- have to introduce them to Zend. Introducing the list of functions is done by
- using an array of zend_function_entry. This array consecutively
- contains all functions that are to be made available externally, with the function's name
- as it should appear in PHP and its name as defined in the C source.
- Internally, zend_function_entry is defined as shown in
- .
-
-
-
- Internal declaration of zend_function_entry.
-
-
-
-
-
-
-
-
-
- Entry
- Description
-
-
- fname
-
- Denotes the function name as seen in PHP (for
- example, fopen, mysql_connect, or, in our
- example, first_module).
-
-
-
- handler
-
- Pointer to the C function responsible for handling calls
- to this function. For example, see the standard macro
- INTERNAL_FUNCTION_PARAMETERS discussed earlier.
-
-
-
- func_arg_types
-
- Allows you to mark certain parameters so that they're forced
- to be passed by reference. You usually should set this to
- NULL.
-
-
-
-
-
-
- In the example above, the declaration looks like this:
-
-
-
- You can see that the last entry in the list always has to be
- ZEND_FE_END.
- This marker has to be set for Zend to know when the end of the
- list of exported functions is reached.
-
-
- The macro ZEND_FE (short for 'Zend Function
- Entry') simply expands to a structure entry in
- zend_function_entry. Note that these macros
- introduce a special naming scheme to your functions - your C
- functions will be prefixed with zif_, meaning
- that ZEND_FE(first_module) will refer to a C
- function zif_first_module. If you want to mix
- macro usage with hand-coded entries (not a good practice), keep
- this in mind.
-
-
- Tip: Compilation errors that refer to functions
- named zif_* relate to functions defined
- with ZEND_FE.
-
-
- shows a list of all the macros
- that you can use to define functions.
-
-
- Macros for Defining Functions
-
-
-
-
-
- Macro Name
- Description
-
-
- ZEND_FE(name, arg_types)
-
- Defines a function entry of the name name in
- zend_function_entry. Requires a corresponding C
- function. arg_types needs to be set to NULL.
- This function uses automatic C function name generation by prefixing the PHP
- function name with zif_.
- For example, ZEND_FE("first_module", NULL) introduces a
- function first_module to PHP and links it to the C
- function zif_first_module. Use in conjunction
- with ZEND_FUNCTION.
-
-
-
-
- ZEND_NAMED_FE(php_name, name, arg_types)
-
-
- Defines a function that will be available to PHP by the
- name php_name and links it to the corresponding C
- function name. arg_types needs to be set
- to NULL. Use this function if you don't want the automatic
- name prefixing introduced by ZEND_FE. Use in conjunction
- with ZEND_NAMED_FUNCTION.
-
-
-
-
- ZEND_FALIAS(name, alias, arg_types)
-
-
- Defines an alias named alias for
- name. arg_types needs to be set
- to NULL. Doesn't require a corresponding C
- function; refers to the alias target instead.
-
-
-
- PHP_FE(name, arg_types)
-
- Old PHP API equivalent of ZEND_FE.
-
-
-
-
- PHP_NAMED_FE(runtime_name, name, arg_types)
-
-
- Old PHP API equivalent of ZEND_NAMED_FE.
-
-
-
-
-
-
- Note: You can't use
- ZEND_FE in conjunction with
- PHP_FUNCTION, or PHP_FE in
- conjunction with ZEND_FUNCTION. However, it's
- perfectly legal to mix ZEND_FE and
- ZEND_FUNCTION with PHP_FE
- and PHP_FUNCTION when staying with the same
- macro set for each function to be declared. But mixing is
- not recommended; instead, you're advised to
- use the ZEND_* macros only.
-
-
-
-
- Declaration of the Zend Module Block
-
- This block is stored in the structure
- zend_module_entry and contains all necessary
- information to describe the contents of this module to Zend. You can
- see the internal definition of this module in
- .
-
-
- Internal declaration of zend_module_entry.
-
-
-
-
-
-
-
-
-
- Entry
- Description
-
-
-
-
-
- size, zend_api,
- zend_debug and zts
-
-
- Usually filled with the
- "STANDARD_MODULE_HEADER", which fills these
- four members with the size of the whole zend_module_entry, the
- ZEND_MODULE_API_NO, whether it is a debug
- build or normal build (ZEND_DEBUG) and if
- ZTS is enabled (USING_ZTS).
-
-
-
- name
-
- Contains the module name (for example, "File
- functions", "Socket functions",
- "Crypt", etc.). This name will show up in
- phpinfo, in the section "Additional
- Modules."
-
-
-
- functions
-
- Points to the Zend function block, discussed in the preceding
- section.
-
-
-
- module_startup_func
-
- This function is called once upon module initialization and can
- be used to do one-time initialization steps (such as initial
- memory allocation, etc.). To indicate a failure during
- initialization, return FAILURE; otherwise,
- SUCCESS. To mark this field as unused, use
- NULL. To declare a function, use the macro
- ZEND_MINIT.
-
-
-
- module_shutdown_func
-
- This function is called once upon module shutdown and can be
- used to do one-time deinitialization steps (such as memory
- deallocation). This is the counterpart to
- module_startup_func. To indicate a failure
- during deinitialization, return FAILURE;
- otherwise, SUCCESS. To mark this field as
- unused, use NULL. To declare a function, use
- the macro ZEND_MSHUTDOWN.
-
-
-
- request_startup_func
-
- This function is called once upon every page request and can be
- used to do one-time initialization steps that are required to
- process a request. To indicate a failure here, return
- FAILURE; otherwise,
- SUCCESS. Note: As
- dynamic loadable modules are loaded only on page requests, the
- request startup function is called right after the module
- startup function (both initialization events happen at the same
- time). To mark this field as unused, use
- NULL. To declare a function, use the macro
- ZEND_RINIT.
-
-
-
- request_shutdown_func
-
- This function is called once after every page request and works
- as counterpart to request_startup_func. To
- indicate a failure here, return FAILURE;
- otherwise, SUCCESS.
- Note: As dynamic loadable modules are
- loaded only on page requests, the request shutdown function is
- immediately followed by a call to the module shutdown handler
- (both deinitialization events happen at the same time). To mark
- this field as unused, use NULL. To declare a
- function, use the macro ZEND_RSHUTDOWN.
-
-
-
- info_func
-
- When phpinfo is called in a script, Zend
- cycles through all loaded modules and calls this function.
- Every module then has the chance to print its own "footprint"
- into the output page. Generally this is used to dump
- environmental or statistical information. To mark this field as
- unused, use NULL. To declare a function, use
- the macro ZEND_MINFO.
-
-
-
- version
-
- The version of the module. You can use
- NO_VERSION_YET if you don't want to give the
- module a version number yet, but we really recommend that you
- add a version string here. Such a version string can look like
- this (in chronological order): "2.5-dev",
- "2.5RC1", "2.5" or
- "2.5pl3".
-
-
-
- Remaining structure elements
-
- These are used internally and can be prefilled by using the
- macro STANDARD_MODULE_PROPERTIES_EX. You
- should not assign any values to them. Use
- STANDARD_MODULE_PROPERTIES_EX only if you
- use global startup and shutdown functions; otherwise, use
- STANDARD_MODULE_PROPERTIES directly.
-
-
-
-
-
-
-
- In our example, this structure is implemented as follows:
-
-
-
- This is basically the easiest and most minimal set of values you
- could ever use. The module name is set to First
- Module, then the function list is referenced, after which
- all startup and shutdown functions are marked as being unused.
-
-
- For reference purposes, you can find a list of the macros involved
- in declared startup and shutdown functions in
- . These are
- not used in our basic example yet, but will be demonstrated later
- on. You should make use of these macros to declare your startup and
- shutdown functions, as these require special arguments to be passed
- (INIT_FUNC_ARGS and
- SHUTDOWN_FUNC_ARGS), which are automatically
- included into the function declaration when using the predefined
- macros. If you declare your functions manually and the PHP
- developers decide that a change in the argument list is necessary,
- you'll have to change your module sources to remain compatible.
-
-
- Macros to Declare Startup and Shutdown Functions
-
-
-
-
-
- Macro
- Description
-
-
- ZEND_MINIT(module)
-
- Declares a function for module startup. The generated name will
- be zend_minit_<module> (for example,
- zend_minit_first_module). Use in
- conjunction with ZEND_MINIT_FUNCTION.
-
-
-
- ZEND_MSHUTDOWN(module)
-
- Declares a function for module shutdown. The generated name
- will be zend_mshutdown_<module> (for
- example, zend_mshutdown_first_module). Use
- in conjunction with ZEND_MSHUTDOWN_FUNCTION.
-
-
-
- ZEND_RINIT(module)
-
- Declares a function for request startup. The generated name
- will be zend_rinit_<module> (for
- example, zend_rinit_first_module). Use in
- conjunction with ZEND_RINIT_FUNCTION.
-
-
-
- ZEND_RSHUTDOWN(module)
-
- Declares a function for request shutdown. The generated name
- will be zend_rshutdown_<module> (for
- example, zend_rshutdown_first_module). Use
- in conjunction with ZEND_RSHUTDOWN_FUNCTION.
-
-
-
- ZEND_MINFO(module)
-
- Declares a function for printing module information, used when
- phpinfo is called. The generated name will
- be zend_info_<module> (for example,
- zend_info_first_module). Use in conjunction
- with ZEND_MINFO_FUNCTION.
-
-
-
-
-
-
-
-
- Creation of get_module
-
- This function is special to all dynamic loadable modules. Take a
- look at the creation via the ZEND_GET_MODULE
- macro first:
-
-
-
-
-
- The function implementation is surrounded by a conditional
- compilation statement. This is needed since the function
- get_module is only required if your module is
- built as a dynamic extension. By specifying a definition of
- COMPILE_DL_FIRSTMOD in the compiler command
- (see above for a discussion of the compilation instructions
- required to build a dynamic extension), you can instruct your
- module whether you intend to build it as a dynamic extension or as
- a built-in module. If you want a built-in module, the
- implementation of get_module is simply left
- out.
-
-
- get_module is called by Zend at load time
- of the module. You can think of it as being invoked by the
- dl call in your script. Its purpose is to pass the
- module information block back to Zend in order to inform the engine about the
- module contents.
-
-
- If you don't implement a get_module function in
- your dynamic loadable module, Zend will compliment you with an error message
- when trying to access it.
-
-
-
-
- Implementation of All Exported Functions
- Implementing the exported functions is the final step. The
- example function in first_module looks like this:
-
-
-
- The function declaration is done
- using ZEND_FUNCTION, which corresponds
- to ZEND_FE in the function entry table (discussed
- earlier).
-
-
- After the declaration, code for checking and retrieving the function's
- arguments, argument conversion, and return value generation follows (more on
- this later).
-
-
-
-
- Summary
-
- That's it, basically - there's nothing more to implementing PHP modules.
- Built-in modules are structured similarly to dynamic modules, so, equipped
- with the information presented in the previous sections, you'll be able to
- fight the odds when encountering PHP module source files.
-
-
- Now, in the following sections, read on about how to make use of PHP's
- internals to build powerful extensions.
-
-
-
-
diff --git a/internals2/ze1/zendapi/troubleshooting.xml b/internals2/ze1/zendapi/troubleshooting.xml
deleted file mode 100644
index 1e4cc633e7e0..000000000000
--- a/internals2/ze1/zendapi/troubleshooting.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
- Troubleshooting
-
- Actually, not much troubleshooting can be done when compiling
- static or dynamic modules. The only problem that could arise is
- that the compiler will complain about missing definitions or
- something similar. In this case, make sure that all header files
- are available and that you specified their path correctly in the
- compilation command. To be sure that everything is located
- correctly, extract a clean PHP source tree and use the automatic
- build in the ext directory with the fresh
- files; this will guarantee a safe compilation environment. If this
- fails, try manual compilation.
-
- PHP might also complain about missing functions in your module.
- (This shouldn't happen with the sample sources if you didn't modify
- them.) If the names of external functions you're trying to access
- from your module are misspelled, they'll remain as "unlinked
- symbols" in the symbol table. During dynamic loading and linkage by
- PHP, they won't resolve because of the typing errors - there are no
- corresponding symbols in the main binary. Look for incorrect
- declarations in your module file or incorrectly written external
- references. Note that this problem is specific to dynamic loadable
- modules; it doesn't occur with static modules. Errors in static
- modules show up at compile time.
-
-
-
diff --git a/internals2/ze1/zendapi/using.xml b/internals2/ze1/zendapi/using.xml
deleted file mode 100644
index f8b2cfdcbc58..000000000000
--- a/internals2/ze1/zendapi/using.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
- Using Extensions
-
- Depending on the build process you selected, you should either end up
- with a new PHP binary to be linked into your Web server (or run as CGI), or with an .so (shared object) file. If you compiled the
- example file first_module.c as a shared object, your result file
- should be first_module.so. To use it, you first have to copy
- it to a place from which it's accessible to PHP. For a simple test procedure,
- you can copy it to your htdocs directory and try it with
- the source in .
- If you compiled it into the PHP binary,
- omit the call to dl, as the module's
- functionality is instantly available to your scripts.
-
-
- For security reasons, you should not put your
- dynamic modules into publicly accessible directories. Even though it can be
- done and it simplifies testing, you should put them into a separate directory
- in production environments.
-
-
-
-
- A test file for first_module.so.
-
-
-]]>
-
-
-
- Calling this PHP file should output the following:
-
-
-
-
-
- If required, the dynamic loadable module is loaded by calling the
- dl function. This function looks for the
- specified shared object, loads it, and makes its functions
- available to PHP. The module exports the function
- first_module, which accepts a single
- parameter, converts it to an integer, and returns the result of the
- conversion.
-
-
- If you've gotten this far, congratulations! You just built your
- first extension to PHP.
-
-
-
diff --git a/internals2/ze1/zendapi/variables.xml b/internals2/ze1/zendapi/variables.xml
deleted file mode 100644
index 19b0690aa2c4..000000000000
--- a/internals2/ze1/zendapi/variables.xml
+++ /dev/null
@@ -1,1265 +0,0 @@
-
-
-
- Creating Variables
-
- When exchanging data from your own extensions with PHP scripts, one
- of the most important issues is the creation of variables. This
- section shows you how to deal with the variable types that PHP
- supports.
-
-
- Overview
-
- To create new variables that can be seen "from the outside" by the
- executing script, you need to allocate a new zval
- container, fill this container with meaningful values, and then
- introduce it to Zend's internal symbol table. This basic process
- is common to all variable creations:
-
-
-
-
-
- The macro MAKE_STD_ZVAL allocates a new
- zval container using ALLOC_ZVAL
- and initializes it using INIT_ZVAL. As
- implemented in Zend at the time of this writing,
- initializing means setting the reference
- count to 1 and clearing the
- is_ref flag, but this process could be extended
- later - this is why it's a good idea to keep using
- MAKE_STD_ZVAL instead of only using
- ALLOC_ZVAL. If you want to optimize for speed
- (and you don't have to explicitly initialize the
- zval container here), you can use
- ALLOC_ZVAL, but this isn't recommended because
- it doesn't ensure data integrity.
-
-
- ZEND_SET_SYMBOL takes care of introducing the
- new variable to Zend's symbol table. This macro checks whether the
- value already exists in the symbol table and converts the new
- symbol to a reference if so (with automatic deallocation of the
- old zval container). This is the preferred method
- if speed is not a crucial issue and you'd like to keep memory
- usage low.
-
-
- Note that ZEND_SET_SYMBOL makes use of the Zend
- executor globals via the macro EG. By
- specifying EG(active_symbol_table), you get access to the
- currently active symbol table, dealing with the active, local scope. The local
- scope may differ depending on whether the function was invoked from
- within a function.
-
-
- If you need to optimize for speed and don't care about optimal memory
- usage, you can omit the check for an existing variable with the same value and instead
- force insertion into the symbol table by using
- zend_hash_update:
-
-
-
- This is actually the standard method used in most modules.
-
-
- The variables generated with the snippet above will always be of local
- scope, so they reside in the context in which the function has been called. To
- create new variables in the global scope, use the same method
- but refer to another symbol table:
-
-
-
- The macro ZEND_SET_SYMBOL is now being
- called with a reference to the main, global symbol table by referring
- EG(symbol_table).
-
-
- Note: The active_symbol_table
- variable is a pointer, but symbol_table is not.
- This is why you have to use
- EG(active_symbol_table) and
- &EG(symbol_table) as parameters to
- ZEND_SET_SYMBOL - it requires a pointer.
-
-
- Similarly, to get a more efficient version, you can hardcode the
- symbol table update:
-
-
-
- shows a sample source that
- creates two variables - local_variable with a local scope
- and global_variable with a global scope (see Figure 9.7).
- The full example can be found on the CD-ROM.
-
-
- Note: You can see that the global variable is actually not accessible from
- within the function. This is because it's not imported into the local scope
- using global $global_variable; in the PHP source.
-
-
- Creating variables with different scopes.
-
-
-
-
- Creating variables with different scopes
-
-
-
-
-
-
-
-
- Longs (Integers)
- Now let's get to the assignment of data to variables, starting with
- longs. Longs are PHP's integers and are very simple to store. Looking at
- the zval.value container structure discussed earlier in this
- chapter, you can see that the long data type is directly contained in the union,
- namely in the lval field. The corresponding
- type value for longs is IS_LONG
- (see ).
-
- Creation of a long.
-
-
-
-
- Alternatively, you can use the macro ZVAL_LONG:
-
-
-
-
-
-
-
- Doubles (Floats)
-
- Doubles are PHP's floats and are as easy to assign as longs, because their value
- is also contained directly in the union. The member in the
- zval.value container is dval;
- the corresponding type is IS_DOUBLE.
-
-
-
- Alternatively, you can use the macro ZVAL_DOUBLE:
-
-
-
-
-
-
-
- Strings
-
- Strings need slightly more effort. As mentioned earlier, all strings
- that will be associated with Zend's internal data structures need to be
- allocated using Zend's own memory-management functions. Referencing of static
- strings or strings allocated with standard routines is not allowed. To assign
- strings, you have to access the structure str in
- the zval.value container. The corresponding type
- is IS_STRING:
-
-
-
- Note the usage of Zend's estrdup here.
- Of course, you can also use the predefined macro
- ZVAL_STRING:
-
-
-
- ZVAL_STRING accepts a third parameter that
- indicates whether the supplied string contents should be duplicated (using
- estrdup). Setting this parameter
- to 1 causes the string to be
- duplicated; 0 simply uses the supplied pointer for the
- variable contents. This is most useful if you want to create a new variable
- referring to a string that's already allocated in Zend internal memory.
-
-
- If you want to truncate the string at a certain position or you
- already know its length, you can use ZVAL_STRINGL(zval,
- string, length, duplicate), which accepts an explicit
- string length to be set for the new string. This macro is faster
- than ZVAL_STRING and also binary-safe.
-
-
- To create empty strings, set the string length to 0 and
- use empty_string as contents:
-
-
-
- Of course, there's a macro for this as
- well (ZVAL_EMPTY_STRING):
-
-
-
-
-
-
-
- Booleans
-
- Booleans are created just like longs, but have the
- type IS_BOOL. Allowed values in
- lval are 0 and 1:
-
-
-
- The corresponding macros for this type
- are ZVAL_BOOL (allowing specification of the value) as well
- as ZVAL_TRUE and ZVAL_FALSE (which
- explicitly set the value to TRUE and FALSE,
- respectively).
-
-
-
-
- Arrays
-
- Arrays are stored using Zend's internal hash tables, which can be
- accessed using the zend_hash_* API. For every
- array that you want to create, you need a new hash table handle,
- which will be stored in the ht member of the
- zval.value container.
-
-
- There's a whole API solely for the creation of arrays, which is extremely
- handy. To start a new array, you call
- array_init.
-
-
-
- array_init always returns SUCCESS.
-
-
- To add new elements to the array, you can use numerous functions,
- depending on what you want to do.
- ,
- and
-
- describe these functions. All functions return
- FAILURE on failure and
- SUCCESS on success.
-
-
- Zend's API for Associative Arrays
-
-
-
-
-
-
- Function
- Description
-
-
-
- add_assoc_long(zval *array, char *key, long n);
-
- Adds an element of type long.
-
-
-
- add_assoc_unset(zval *array, char *key);
- Adds an unset element.
-
-
-
- add_assoc_bool(zval *array, char *key, int b);
-
- Adds a Boolean element.
-
-
-
- add_assoc_resource(zval *array, char *key, int r);
-
- Adds a resource to the array.
-
-
-
- add_assoc_double(zval *array, char *key, double d);
-
- Adds a floating-point value.
-
-
-
- add_assoc_string(zval *array, char *key, char *str, int duplicate);
-
-
- Adds a string to the array. The
- flag duplicate specifies whether the string contents have to be
- copied to Zend internal memory.
-
-
-
-
-
- add_assoc_stringl(zval *array, char *key, char *str, uint length, int duplicate);
-
-
-
- Adds a string with the desired length length
- to the array. Otherwise, behaves like
- add_assoc_string.
-
-
-
- add_assoc_zval(zval *array, char *key, zval *value);
- Adds a zval to the array. Useful for adding other arrays, objects, streams, etc...
-
-
-
-
-
- Zend's API for Indexed Arrays, Part 1
-
-
-
-
-
-
- Function
- Description
-
-
- add_index_long(zval *array, uint idx, long
- n);
- Adds an element of type long.
-
-
- add_index_unset(zval *array, uint
- idx);
- Adds an unset element.
-
-
- add_index_bool(zval *array, uint idx, int
- b);
- Adds a Boolean element.
-
-
- add_index_resource(zval *array, uint idx, int
- r);
- Adds a resource to the array.
-
-
- add_index_double(zval *array, uint idx, double
- d);
- Adds a floating-point value.
-
-
- add_index_string(zval *array, uint idx, char
- *str, int duplicate);
- Adds a string to the array. The
- flag duplicate specifies whether the string contents have to be
- copied to Zend internal memory.
-
-
- add_index_stringl(zval *array, uint idx, char
- *str, uint length, int duplicate);
- Adds a string with the desired
- length length to the array. This function is faster and binary-safe. Otherwise, behaves like add_index_string.
-
-
- add_index_zval(zval *array, uint idx, zval *value);
- Adds a zval to the array. Useful for adding other arrays, objects, streams, etc...
-
-
-
-
-
- Zend's API for Indexed Arrays, Part 2
-
-
-
-
-
-
- Function
- Description
-
-
- add_next_index_long(zval *array, long
- n);
- Adds an element of type long.
-
-
- add_next_index_unset(zval
- *array);
- Adds an unset element.
-
-
- add_next_index_bool(zval *array, int
- b);
- Adds a Boolean element.
-
-
- add_next_index_resource(zval *array, int
- r);
- Adds a resource to the array.
-
-
- add_next_index_double(zval *array, double
- d);
- Adds a floating-point value.
-
-
- add_next_index_string(zval *array, char *str,
- int duplicate);
- Adds a string to the array. The
- flag duplicate specifies whether the string contents have to be
- copied to Zend internal memory.
-
-
- add_next_index_stringl(zval *array, char *str,
- uint length, int duplicate);
- Adds a string with the desired
- length length to the array. This function is faster and binary-safe. Otherwise, behaves like add_index_string.
-
-
- add_next_index_zval(zval *array, zval *value);
- Adds a zval to the array. Useful for adding other arrays, objects, streams, etc...
-
-
-
-
-
- All these functions provide a handy abstraction to Zend's internal hash
- API. Of course, you can also use the hash functions directly - for example, if
- you already have a zval container allocated that you want to
- insert into an array. This is done using zend_hash_update
- for associative arrays (see ) and
- zend_hash_index_update for indexed arrays
- (see ):
-
- Adding an element to an associative array.
-
-
-
-
-
- Adding an element to an indexed array.
-
-
-
-
-
-
- To emulate the functionality of
- add_next_index_*, you can use this:
-
-
-
-
-
- Note: To return arrays from a function, use array_init and
- all following actions on the predefined variable return_value
- (given as argument to your exported function; see the earlier discussion of the call interface). You do not have to use
- MAKE_STD_ZVAL on this.
-
-
- Tip: To avoid having to
- write new_array->value.ht every time, you can
- use HASH_OF(new_array), which is also recommended for
- compatibility and style reasons.
-
-
-
-
- Objects
-
- Since objects can be converted to arrays (and vice versa), you
- might have already guessed that they have a lot of similarities to
- arrays in PHP. Objects are maintained with the same hash
- functions, but there's a different API for creating them.
-
-
- To initialize an object, you use the
- function object_init:
-
-
-
- You can use the functions described in
-
- to add members to your object.
-
-
- Zend's API for Object Creation
-
-
-
-
-
-
- Function
- Description
-
-
- add_property_long(zval *object, char *key, long
- l);
- Adds a long to the object.
-
-
- add_property_unset(zval *object, char
- *key);
- Adds an unset property to the object.
-
-
- add_property_bool(zval *object, char *key, int
- b);
- Adds a Boolean to the object.
-
-
- add_property_resource(zval *object, char *key,
- long r);
- Adds a resource to the object.
-
-
- add_property_double(zval *object, char *key,
- double d);
- Adds a double to the object.
-
-
- add_property_string(zval *object, char *key,
- char *str, int duplicate);
- Adds a string to the object.
-
-
- add_property_stringl(zval *object, char *key,
- char *str, uint length, int duplicate);
- Adds a string of the specified length to the object. This
- function is faster than add_property_string and also
- binary-safe.
-
-
-
-
- add_property_zval(zval *obect, char *key, zval *container):
-
-
- Adds a zval container to the object. This is useful if you
- have to add properties which aren't simple types like integers or strings but
- arrays or other objects.
-
-
-
-
-
-
-
-
-
- Resources
-
- Resources are a special kind of data type in PHP. The term
- resources doesn't really refer to any special
- kind of data, but to an abstraction method for maintaining any kind
- of information. Resources are kept in a special resource list within
- Zend. Each entry in the list has a correspondending type definition
- that denotes the kind of resource to which it refers. Zend then
- internally manages all references to this resource. Access to a
- resource is never possible directly - only via a provided API. As soon
- as all references to a specific resource are lost, a corresponding
- shutdown function is called.
-
-
- For example, resources are used to store database links and file
- descriptors. The de facto standard implementation
- can be found in the MySQL module, but other modules such as the Oracle
- module also make use of resources.
-
-
- In fact, a resource can be a pointer to anything you need to
- handle in your functions (e.g. pointer to a structure) and the
- user only has to pass a single resource variable to your
- function.
-
-
-
-
- To create a new resource you need to register a resource
- destruction handler for it. Since you can store any kind of data as a
- resource, Zend needs to know how to free this resource if its not longer
- needed. This works by registering your own resource destruction handler
- to Zend which in turn gets called by Zend whenever your resource can be
- freed (whether manually or automatically). Registering your resource
- handler within Zend returns you the resource
- type handle for that resource. This handle is needed
- whenever you want to access a resource of this type later and is most
- of time stored in a global static variable within your extension.
- There is no need to worry about thread safety here because you only
- register your resource handler once during module initialization.
-
-
- The Zend function to register your resource handler is defined as:
-
-
-
-
-
- There are two different kinds of resource destruction handlers you can
- pass to this function: a handler for normal resources and a handler
- for persistent resources. Persistent resources are for example used
- for database connection. When registering a resource, either of these
- handlers must be given. For the other handler just pass
- NULL.
-
-
- zend_register_list_destructors_ex accepts the
- following parameters:
-
-
-
-
-
-
- ld
- Normal resource destruction
- handler callback
-
-
- pld
- Pesistent resource destruction
- handler callback
-
-
- type_name
- A string specifying the name of
- your resource. It's always a good thing to
- specify a unique name within PHP for the resource type
- so when the user for example calls
- var_dump($resource);
- he also gets the name of the resource.
-
-
- module_number
- The module_number
- is automatically available in your
- PHP_MINIT_FUNCTION
- function and therefore you just pass it over.
-
-
-
-
- The return value is a unique integer ID for your
- resource type.
-
-
- The resource destruction handler (either normal or persistent
- resources) has the following prototype:
- void resource_destruction_handler(zend_rsrc_list_entry *rsrc TSRMLS_DC);
- The passed rsrc is a pointer to the following structure:
-
-
-
- The member void *ptr is the actual pointer to
- your resource.
-
-
- Now we know how to start things, we define our own resource we want
- register within Zend. It is only a simple structure with two integer
- members:
-
-
-
- Our resource destruction handler is probably going to look something like this:
-
-ptr;
-
- // Now do whatever needs to be done with you resource. Closing
- // Files, Sockets, freeing additional memory, etc.
- // Also, don't forget to actually free the memory for your resource too!
-
- do_whatever_needs_to_be_done_with_the_resource(my_rsrc);
-}
-]]>
-
-
- One important thing to mention: If your resource
- is a rather complex structure which also contains pointers to
- memory you allocated during runtime you have to free them
- before freeing
- the resource itself!
-
-
-
-
- Now that we have defined
-
- what our resource is and
- our resource destruction handler
-
- we can go on and do the rest of the steps:
-
- create a global variable within the extension holding
- the resource ID so it can be accessed from every function
- which needs it
- define the resource name
- write the resource destruction handler
- and finally register the handler
-
-
-ptr;
- do_whatever_needs_to_be_done_with_the_resource(my_rsrc);
- }
-
- [...]
-
- PHP_MINIT_FUNCTION(my_extension) {
-
- // Note that 'module_number' is already provided through the
- // PHP_MINIT_FUNCTION() function definition.
-
- le_myresource = zend_register_list_destructors_ex(my_destruction_handler, NULL, le_myresource_name, module_number);
-
- // You can register additional resources, initialize
- // your global vars, constants, whatever.
- }
-]]>
-
-
-
- To actually register a new resource you use can either use
- the zend_register_resource function or
- the ZEND_REGISTER_RESOURE macro, both
- defined in zend_list.h. Although the arguments for both map
- 1:1 it's a good idea to always use macros to be upwards
- compatible:
-
-
-
-
-
-
-
-
-
- rsrc_result
- This is an already initialized
- zval * container.
-
-
- rsrc_pointer
- Your resource pointer you want to
- store.
-
-
- rsrc_type
- The type which you received when
- you registered the resource destruction handler. If you
- followed the naming scheme this would be
- le_myresource.
-
-
-
-
- The return value is a unique integer identifier for that resource.
-
-
- What is really going on when you register a new resource is it gets
- inserted in an internal list in Zend and the result is just stored
- in the given zval * container:
-
-value.lval = rsrc_id;
- rsrc_result->type = IS_RESOURCE;
- }
-
- return rsrc_id;
-]]>
-
- The returned rsrc_id uniquely identifies the newly
- registered resource. You can use the macro
- RETURN_RESOURE to return it to the user:
- RETURN_RESOURCE(rsrc_id)
- It is common practice that if you want to return the resource
- immediately to the user you specify the return_value
- as the zval * container.
-
-
-
-
- Zend now keeps track of all references to this resource. As soon as
- all references to the resource are lost, the destructor that you
- previously registered for this resource is called. The nice thing
- about this setup is that you don't have to worry about memory leakages
- introduced by allocations in your module - just register all memory
- allocations that your calling script will refer to as resources. As
- soon as the script decides it doesn't need them anymore, Zend will
- find out and tell you.
-
-
- Now that the user got his resource, at some point he is passing it
- back to one of your functions. The value.lval inside
- the zval * container contains the key to your
- resource and thus can be used to fetch the resource with the following
- macro:
- ZEND_FETCH_RESOURCE:
-
-
-
-
-
-
-
-
-
- rsrc
- This is your pointer which will
- point to your previously registered resource.
-
-
- rsrc_type
- This is the typecast argument for
- your pointer, e.g. myresource *.
-
-
- rsrc_id
- This is the address of the
- zval *container the user passed to
- your function, e.g. &z_resource if
- zval *z_resource is given.
-
-
- default_rsrc_id
- This integer specifies the default
- resource ID if no resource could be fetched
- or -1.
-
-
- resource_type_name
- This is the name of the requested resource.
- It's a string and is used when the resource can't be
- found or is invalid to form a meaningful error
- message.
-
-
- resource_type
- The resource_type
- you got back when registering the resource destruction handler.
- In our example this was le_myresource.
-
-
-
-
- This macro has no return value.
- It is for the developers convenience and takes care
- of TSRMLS arguments passing and also does check if the resource
- could be fetched.
- It throws a warning message and returns the current PHP function
- with NULL if there was a problem retrieving the
- resource.
-
-
- To force removal of a resource from the list, use the function
- zend_list_delete. You can also force the
- reference count to increase if you know that you're creating another
- reference for a previously allocated value (for example, if you're
- automatically reusing a default database link). For this case, use the
- function zend_list_addref. To search for
- previously allocated resource entries, use
- zend_list_find. The complete API can be found
- in zend_list.h.
-
-
-
-
- Macros for Automatic Global Variable Creation
-
- In addition to the macros discussed earlier, a few macros allow
- easy creation of simple global variables. These are nice to know
- in case you want to introduce global flags, for example. This is
- somewhat bad practice, but Table
- describes macros that do
- exactly this task. They don't need any zval
- allocation; you simply have to supply a variable name and value.
-
-
- Macros for Global Variable Creation
-
-
-
-
-
-
- Macro
- Description
-
-
- SET_VAR_STRING(name, value)
- Creates a new string.
-
-
- SET_VAR_STRINGL(name, value,
- length)
- Creates a new string of the specified length. This macro
- is faster than SET_VAR_STRING and also binary-safe.
-
-
- SET_VAR_LONG(name, value)
- Creates a new long.
-
-
- SET_VAR_DOUBLE(name, value)
- Creates a new double.
-
-
-
-
-
-
-
- Creating Constants
-
- Zend supports the creation of true constants (as opposed to
- regular variables). Constants are accessed without the typical
- dollar sign ($) prefix and are available in all
- scopes. Examples include TRUE and
- FALSE, to name just two.
-
-
- To create your own constants, you can use the macros in
- .
- All the macros create a constant with the specified name and value.
-
-
- You can also specify flags for each constant:
-
-
-
- CONST_CS - This constant's name is to be
- treated as case sensitive.
-
-
-
-
- CONST_PERSISTENT - This constant is
- persistent and won't be "forgotten" when the current process
- carrying this constant shuts down.
-
-
- To use the flags, combine them using a inary OR:
- // register a new constant of type "long"
- REGISTER_LONG_CONSTANT("NEW_MEANINGFUL_CONSTANT", 324, CONST_CS |
- CONST_PERSISTENT); There are two types of
- macros - REGISTER_*_CONSTANT
- andREGISTER_MAIN_*_CONSTANT. The first type
- creates constants bound to the current module. These constants are
- dumped from the symbol table as soon as the module that registered
- the constant is unloaded from memory. The second type creates
- constants that remain in the symbol table independently of the
- module.
-
-
- Macros for Creating Constants
-
-
-
-
-
- Macro
- Description
-
-
-
- REGISTER_LONG_CONSTANT(name, value, flags)
- REGISTER_MAIN_LONG_CONSTANT(name, value, flags)
-
- Registers a new constant of type long.
-
-
-
- REGISTER_DOUBLE_CONSTANT(name, value, flags)
- REGISTER_MAIN_DOUBLE_CONSTANT(name, value, flags)
-
- Registers a new constant of type double.
-
-
-
- REGISTER_STRING_CONSTANT(name, value, flags)
- REGISTER_MAIN_STRING_CONSTANT(name, value, flags)
-
- Registers a new constant of type string. The specified
- string must reside in Zend's internal memory.
-
-
-
- REGISTER_STRINGL_CONSTANT(name, value, length, flags)
- REGISTER_MAIN_STRINGL_CONSTANT(name, value, length,
- flags)
-
- Registers a new constant of type string. The string length
- is explicitly set to length. The specified string must reside
- in Zend's internal memory.
-
-
-
-
-
-
-
diff --git a/internals2/ze1/zendapi/where-to-go.xml b/internals2/ze1/zendapi/where-to-go.xml
deleted file mode 100644
index 28f16ac7306d..000000000000
--- a/internals2/ze1/zendapi/where-to-go.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
- Where to Go from Here
-
- You've learned a lot about PHP. You now know how to create
- dynamic loadable modules and statically linked extensions. You've
- learned how PHP and Zend deal with internal storage of variables and how you
- can create and access these variables. You know quite a set of tool functions
- that do a lot of routine tasks such as printing informational texts,
- automatically introducing variables to the symbol table, and so on.
-
-
- Even though this chapter often had a mostly "referential" character, we
- hope that it gave you insight on how to start writing your own extensions.
- For the sake of space, we had to leave out a lot; we suggest that you take the time to
- study the header files and some modules (especially the ones in the
- ext/standard directory and the MySQL module, as these
- implement commonly known functionality). This will give you an idea of how
- other people have used the API functions - particularly those that didn't make it into
- this chapter.
-
-
-
diff --git a/reference/opcache/ini.xml b/reference/opcache/ini.xml
index 390257380b1f..ecbdce3a5c66 100644
--- a/reference/opcache/ini.xml
+++ b/reference/opcache/ini.xml
@@ -494,7 +494,7 @@
In PHP < 5.3, OPcache stores the places where
- DECLARE_CLASS
+ DECLARE_CLASS
opcodes used inheritance; when the file is loaded, OPcache then tries to
bind the inherited classes using the current environment. The problem is
that while the DECLARE_CLASS opcode may not be needed for the current
diff --git a/reference/stream/book.xml b/reference/stream/book.xml
index 01bf587a629e..57992cb57d32 100644
--- a/reference/stream/book.xml
+++ b/reference/stream/book.xml
@@ -25,7 +25,7 @@
built into PHP by default (See ),
and additional, custom wrappers may be added either within a
PHP script using stream_wrapper_register,
- or directly from an extension using the API Reference in .
+ or directly from an extension.
Because any variety of wrapper may be added to PHP,
there is no set limit on what can be done with them. To access the list
of currently registered wrappers, use stream_get_wrappers.
@@ -54,14 +54,6 @@
-
-
-
- Information on using streams within the PHP source code can be found in the
- Streams API for PHP Extension Authors reference.
-
-
-
&reference.stream.setup;
diff --git a/reference/stream/filters.xml b/reference/stream/filters.xml
index 4a7a1ab70be6..e9fe4b1844d8 100644
--- a/reference/stream/filters.xml
+++ b/reference/stream/filters.xml
@@ -8,8 +8,8 @@
operations on data as it is being read from or written to a stream.
Any number of filters may be stacked onto a stream. Custom
filters can be defined in a PHP script using
- stream_filter_register or in an extension using the
- API Reference in . To access the list of currently
+ stream_filter_register or in an extension.
+ To access the list of currently
registered filters, use stream_get_filters.