Skip to content


Subversion checkout URL

You can clone with
Download ZIP
The PHP Interpreter
C PHP C++ Shell JavaScript Lex Other
branch: experimental/f…

This branch is 2 commits ahead, 44343 commits behind master

Failed to load latest commit information.
TSRM - silent warning
Zend - Fixed bug #50383 (Exceptions thrown in __call / __callStatic do not…
build - Update shtool to 2.0.8
ext - Committing my session cookie patch; it's a bug fix and good to have…
main add backlock socket context option for stream_socket_server(),
netware sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php
sapi - Fixed bug #51237 (milter SAPI crash on startup)
scripts Fixed bug #50795 (man pages have bad whatis entries)
win32 - prevent unexpectable behaviors (for the user) with invalid path
CREDITS Let's pretend this is up-to-date now
ChangeLog ChangeLog update
ChangeLog.1999.gz * separated and compressed changelogs from 1999 and 2000
ChangeLog.2000.gz * separated and compressed changelogs from 1999 and 2000
ChangeLog.2001.gz * archive the 2001 changelog
ChangeLog.2002.gz rotate changelog
ChangeLog.2003.gz - Compress 2003 changelog
ChangeLog.2004.gz - Compressed 2004 Changelog
ChangeLog.2005.gz 2005 -> 2006
INSTALL cvs->svn
Makefile.frag MFB 5.3: Rest of the changes for re2c merge
Makefile.gcov merge r294022. 5.2 branch doesnt need it
NEWS pff
README.EXT_SKEL ok, re-adding this mostly un-maintained awk/sed/sh nightmare for now ...
README.NEW-OUTPUT-API - revise output handler alias API
README.PARAMETER_PARSING_API Restored double->long conversion behavior to that of PHP 5.2 (on most…
README.PEAR Apparenty go-pear no longer exists (bug#44699)
README.PHP4-TO-PHP5-THIN-CHANGES new incompatibilities. maybe someone from the doc group will update the
README.REDIST.BINS - MF53: add licenses info for bundled libs, codes merged from other p…
README.RELEASE_PROCESS Where using svn now, use svn paths
README.SELF-CONTAINED-EXTENSIONS Improve the wording in this paragraph.
README.STREAMS Added notes about locking functions.
README.SUBMITTING_PATCH Add info on PHP doc contributions and add internals references
README.TESTING clarification of wwwhether 'make test' needs the PHP xecutable to be set
README.TESTING2 Fixed bug#46445 (run-tests2.php is missing or README.TESTING2 is unne…
README.UNICODE - Fix small typo
README.UNIX-BUILD-SYSTEM Update documentation for PHP 5.
README.UPDATING_TO_PHP6 - Use the right variable name
README.WIN32-BUILD-SYSTEM - if they are outdated/wrong, no need to confuse the users
README.Zeus - Change from PHP5 -> PHP 5
README.input_filter - Fix docs
README.namespaces - Changed namespace separator
TODO Update
TODO-5.1 test commit
TODO-PHP5 Remove finished tasks Wipe out and rewrite some checks to use PHP_ARG_ENABLE.
buildconf - Removed unused parts
buildconf.bat Check if configure script was copied, and output an error if it wasn't
config.guess - Upgraded bundled libtool to 1.5.26
config.sub - Upgraded bundled libtool to 1.5.26 Revert commit 292222. It's not needed anymore to specify c99.
footer consistent with the used style
genfiles MFB53: genfiles update
header correct year and version - Upgraded bundled libtool to 1.5.26
makedist CVS->SVN
makerpm php5.spec was never used, as far as can be determined. also, php 5 ->…
php.gif change these in HEAD too
php.ini-development Remove magic_quotes from php.ini to match code reality
php.ini-production Remove magic_quotes from php.ini to match code reality
run-tests.php sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php
server-tests-config.php - Fix filename
server-tests.php sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php
snapshot Integration of -ng changes. Changes: # Fix ColorResolve bogosity
stub.c Add newline. Recent GCC snapshots segfault, if the input file is comp…
svnclean.bat - rename to svn
unicode-gotchas.txt Add note about md5().
unicode-issues.txt Unicode support.
unicode-progress.txt - Update unicode progress on SPL, looks like nearly done, actually al…
unicode-todo.txt Implement JIT request decoding support for $_GET and $_POST.
vcsclean dropped some more mime types, svnclean -> clean for multiple VCS


(NOTE: you may also want to take a look at the pear package
	     PECL_Gen, a PHP-only alternative for this script that
			 supports way more extension writing tasks and is 
			 supposed to replace ext_skel completely in the long run ...)


  It's a tool for automatically creating the basic framework for a PHP module
  and writing C code handling arguments passed to your functions from a simple
  configuration file. See an example at the end of this file.


  Very simple. First, change to the ext/ directory of the PHP 4 sources. If
  you just need the basic framework and will be writing all the code in your
  functions yourself, you can now do

   ./ext_skel --extname=module_name

  and everything you need is placed in directory module_name. 

  [ Note that GNU awk is likely required for this script to work.  Debian 
    systems seem to default to using mawk, so you may need to change the 
    #! line in skeleton/create_stubs and the cat $proto | awk line in
    ext_skel to use gawk explicitly. ]

  If you don't need to test the existence of any external header files, 
  libraries or functions in them, the module is already almost ready to be 
  compiled in PHP.  Just remove 3 comments in your_module_name/config.m4, 
  change back up to PHP sources top directory, and do

    ./buildconf; ./configure --enable-module_name; make

  But if you already have planned the overall scheme of your module, what
  functions it will contain, their return types and the arguments they take
  (a very good idea) and don't want to bother yourself with creating function
  definitions and handling arguments passed yourself, it's time to create a
  function definitions file, which you will give as an argument to ext_skel
  with option



  All the definitions must be on one line. In it's simplest form, it's just
  the function name, e.g.


  but then you'll be left with an almost empty function body without any
  argument handling.

  Arguments are given in parenthesis after the function name, and are of
  the form 'argument_type argument_name'. Arguments are separated from each
  other with a comma and optional space. Argument_type can be one of int,
  bool, double, float, string, array, object or mixed.

  An optional argument is separated from the previous by an optional space,
  then '[' and of course comma and optional space, like all the other
  arguments. You should close a row of optional arguments with same amount of
  ']'s as there where '['s. Currently, it does not harm if you forget to do it
  or there is a wrong amount of ']'s, but this may change in the future.

	An additional short description may be added after the parameters. 
  If present it will be filled into the 'proto' header comments in the stubs
  code and the <refpurpose> tag in the XML documentation.

  An example:

    my_function(int arg1, int arg2 [, int arg3 [, int arg4]]) this is my 1st

  Arguments arg3 and arg4 are optional.

  If possible, the function definition should also contain it's return type
  in front of the definition. It's not actually used for any C code generating
  purposes but PHP in-source documentation instead, and as such, very useful.
  It can be any of int, double, string, bool, array, object, resource, mixed
  or void.

  The file must contain nothing else but function definitions, no comments or
  empty lines.



  By default, ext_skel creates both comments in the source code and a test
  function to help first time module writers to get started and testing
  configuring and compiling their module. This option turns off all such things
  which may just annoy experienced PHP module coders. Especially useful with


  which will leave out also all module specific stuff and write just function
  stubs with function value declarations and passed argument handling, and
  function entries and definitions at the end of the file, for copying and
  pasting into an already existing module.


  By default, function proto 'void foo(string bar)' creates the following:
     zval **bar;
     ... (zend_get_parameters_ex() called in the middle...)

  Specifying both of these options changes the generated code to:
     zval **bar_arg;
     int bar_len;
     char *bar = NULL;
     ... (zend_get_parameters_ex() called in the middle...)
     bar = Z_STRVAL_PP(bar_arg);
     bar_len = Z_STRLEN_PP(bar_arg);

  You shouldn't have to ask what happens if you leave --string-lens out. If you
  have to, it's questionable whether you should be reading this document.


  Creates the basics for phpdoc .xml file.


  Not implemented yet. When or if there will ever be created a framework for
  self-contained extensions to use phpdoc system for their documentation, this
  option enables it on the created xml file.


  Only arguments of types int, bool, double, float, string and array are
  handled. For other types you must write the code yourself. And for type
  mixed, it wouldn't even be possible to write anything, because only you
  know what to expect.
  It can't handle correctly, and probably never will, variable list of
  of arguments. (void foo(int bar [, ...])

  Don't trust the generated code too much. It tries to be useful in most of
  the situations you might encounter, but automatic code generation will never
  beat a programmer who knows the real situation at hand. ext_skel is generally
  best suited for quickly generating a wrapper for c-library functions you
  might want to have available in PHP too.

  This program doesn't have a --help option. It has --no-help instead.


  The following _one_ line

  bool my_drawtext(resource image, string text, resource font, int x, int y [, int color])

  will create this function definition for you (note that there are a few
  question marks to be replaced by you, and you must of course add your own
  value definitions too):

/* {{{ proto bool my_drawtext(resource image, string text, resource font, int x, int y[, int color])
	zval **image, **text, **font, **x, **y, **color;
	int argc;
	int image_id = -1;
	int font_id = -1;

	argc = ZEND_NUM_ARGS();
	if (argc < 5 || argc > 6 || zend_get_parameters_ex(argc, &image, &text, &font, &x, &y, &color) == FAILURE) {

	ZEND_FETCH_RESOURCE(???, ???, image, image_id, "???", ???_rsrc_id);
	ZEND_FETCH_RESOURCE(???, ???, font, font_id, "???", ???_rsrc_id);

	switch (argc) {
		case 6:
			/* Fall-through. */
		case 5:
			/* font: fetching resources already handled. */
			/* image: fetching resources already handled. */

	php_error(E_WARNING, "my_drawtext: not yet implemented");
/* }}} */

Something went wrong with that request. Please try again.