# PaCkAgE DaTaStReAm php 1 32856 # end of header 07070100180cdf000081a40000000000000000000000014dc2232a000000bf000000b600010002ffffffffffffffff0000000c00000000php/pkginfoPKG=php NAME=php 5.3.6 i86pc Solaris 11 VERSION=5.3.6 PSTAMP=4th May 2011 EMAIL=http://php.net/downloads.php DESC=PHP scripting language ARCH=i386 CATEGORY=application CLASSES=none BASEDIR=/ 07070100180cde000081a40000000000000000000000014dc2232a0000b2fa000000b600010002ffffffffffffffff0000000b00000000php/pkgmap: 1 32856 1 d none /opt ? ? ? 1 d none /usr ? ? ? 1 d none /usr/local ? ? ? 1 d none /usr/local/bin 0755 root root 1 f none /usr/local/bin/pear 0755 root root 799 62128 1304491028 1 f none /usr/local/bin/peardev 0755 root root 820 63863 1304491028 1 f none /usr/local/bin/pecl 0755 root root 736 56562 1304491028 1 s none /usr/local/bin/phar=/usr/local/bin/phar.phar 1 f none /usr/local/bin/phar.phar 0755 root root 14796 36980 1304491028 1 f none /usr/local/bin/php 0755 root root 9361964 23871 1304491020 1 f none /usr/local/bin/php-config 0755 root root 3460 31068 1304491027 1 f none /usr/local/bin/phpize 0755 root root 4503 36867 1304491027 1 d none /usr/local/etc 0755 root root 1 f none /usr/local/etc/pear.conf 0644 root root 1164 30851 1304491028 1 d none /usr/local/include 0755 root root 1 d none /usr/local/include/php 0755 root root 1 d none /usr/local/include/php/TSRM 0755 root root 1 f none /usr/local/include/php/TSRM/TSRM.h 0644 root root 5337 37352 1304491026 1 f none /usr/local/include/php/TSRM/acconfig.h 0644 root root 16 1210 1304491026 1 f none /usr/local/include/php/TSRM/readdir.h 0644 root root 1102 22854 1304491026 1 f none /usr/local/include/php/TSRM/tsrm_config.h 0644 root root 32 2749 1304491026 1 f none /usr/local/include/php/TSRM/tsrm_config.w32.h 0644 root root 328 26029 1304491026 1 f none /usr/local/include/php/TSRM/tsrm_config_common.h 0644 root root 1462 49255 1304491026 1 f none /usr/local/include/php/TSRM/tsrm_nw.h 0644 root root 1384 23761 1304491026 1 f none /usr/local/include/php/TSRM/tsrm_strtok_r.h 0644 root root 115 9536 1304491026 1 f none /usr/local/include/php/TSRM/tsrm_virtual_cwd.h 0644 root root 12061 43893 1304491026 1 f none /usr/local/include/php/TSRM/tsrm_win32.h 0644 root root 3247 46832 1304491026 1 d none /usr/local/include/php/Zend 0755 root root 1 f none /usr/local/include/php/Zend/acconfig.h 0644 root root 3464 59494 1304491026 1 f none /usr/local/include/php/Zend/zend.h 0644 root root 24589 1272 1304491026 1 f none /usr/local/include/php/Zend/zend_API.h 0644 root root 38662 13584 1304491026 1 f none /usr/local/include/php/Zend/zend_alloc.h 0644 root root 12512 28928 1304491026 1 f none /usr/local/include/php/Zend/zend_build.h 0644 root root 1627 44397 1304491026 1 f none /usr/local/include/php/Zend/zend_builtin_functions.h 0644 root root 1681 48084 1304491026 1 f none /usr/local/include/php/Zend/zend_closures.h 0644 root root 1850 64044 1304491026 1 f none /usr/local/include/php/Zend/zend_compile.h 0644 root root 29717 38996 1304491026 1 f none /usr/local/include/php/Zend/zend_config.h 0644 root root 107 8464 1304491026 1 f none /usr/local/include/php/Zend/zend_config.nw.h 0644 root root 2556 51243 1304491026 1 f none /usr/local/include/php/Zend/zend_config.w32.h 0644 root root 3125 35718 1304491026 1 f none /usr/local/include/php/Zend/zend_constants.h 0644 root root 5067 11333 1304491026 1 f none /usr/local/include/php/Zend/zend_dynamic_array.h 0644 root root 1964 8615 1304491026 1 f none /usr/local/include/php/Zend/zend_errors.h 0644 root root 2199 14600 1304491026 1 f none /usr/local/include/php/Zend/zend_exceptions.h 0644 root root 3076 37288 1304491026 1 f none /usr/local/include/php/Zend/zend_execute.h 0644 root root 13221 14149 1304491026 1 f none /usr/local/include/php/Zend/zend_extensions.h 0644 root root 4663 48158 1304491026 1 f none /usr/local/include/php/Zend/zend_fast_cache.h 0644 root root 4176 32557 1304491026 1 f none /usr/local/include/php/Zend/zend_float.h 0644 root root 15707 48285 1304491026 1 f none /usr/local/include/php/Zend/zend_gc.h 0644 root root 7453 28602 1304491026 1 f none /usr/local/include/php/Zend/zend_globals.h 0644 root root 7346 28030 1304491026 1 f none /usr/local/include/php/Zend/zend_globals_macros.h 0644 root root 3285 56268 1304491026 1 f none /usr/local/include/php/Zend/zend_hash.h 0644 root root 17413 45175 1304491026 1 f none /usr/local/include/php/Zend/zend_highlight.h 0644 root root 2527 51740 1304491026 1 f none /usr/local/include/php/Zend/zend_indent.h 0644 root root 1521 33270 1304491026 1 f none /usr/local/include/php/Zend/zend_ini.h 0644 root root 10089 44662 1304491026 1 f none /usr/local/include/php/Zend/zend_ini_parser.h 0644 root root 2695 14993 1304491026 1 f none /usr/local/include/php/Zend/zend_ini_scanner.h 0644 root root 2007 10167 1304491026 1 f none /usr/local/include/php/Zend/zend_ini_scanner_defs.h 0644 root root 254 18992 1304491026 1 f none /usr/local/include/php/Zend/zend_interfaces.h 0644 root root 4132 9344 1304491026 1 f none /usr/local/include/php/Zend/zend_istdiostream.h 0644 root root 1703 49143 1304491026 1 f none /usr/local/include/php/Zend/zend_iterators.h 0644 root root 3747 35952 1304491026 1 f none /usr/local/include/php/Zend/zend_language_parser.h 0644 root root 7777 15479 1304491026 1 f none /usr/local/include/php/Zend/zend_language_scanner.h 0644 root root 2495 56246 1304491026 1 f none /usr/local/include/php/Zend/zend_language_scanner_defs.h 0644 root root 326 24608 1304491026 1 f none /usr/local/include/php/Zend/zend_list.h 0644 root root 5213 31386 1304491026 1 f none /usr/local/include/php/Zend/zend_llist.h 0644 root root 4027 1303 1304491026 1 f none /usr/local/include/php/Zend/zend_modules.h 0644 root root 5094 3850 1304491026 1 f none /usr/local/include/php/Zend/zend_multibyte.h 0644 root root 3861 44773 1304491026 1 f none /usr/local/include/php/Zend/zend_multiply.h 0644 root root 2562 30888 1304491026 1 f none /usr/local/include/php/Zend/zend_object_handlers.h 0644 root root 8681 19232 1304491026 1 f none /usr/local/include/php/Zend/zend_objects.h 0644 root root 2267 36174 1304491026 1 f none /usr/local/include/php/Zend/zend_objects_API.h 0644 root root 4406 36631 1304491026 1 f none /usr/local/include/php/Zend/zend_operators.h 0644 root root 15816 64895 1304491026 1 f none /usr/local/include/php/Zend/zend_ptr_stack.h 0644 root root 4135 56193 1304491026 1 f none /usr/local/include/php/Zend/zend_qsort.h 0644 root root 1512 35318 1304491026 1 f none /usr/local/include/php/Zend/zend_stack.h 0644 root root 2431 48537 1304491026 1 f none /usr/local/include/php/Zend/zend_static_allocator.h 0644 root root 1918 5917 1304491026 1 f none /usr/local/include/php/Zend/zend_stream.h 0644 root root 3001 23208 1304491026 1 f none /usr/local/include/php/Zend/zend_strtod.h 0644 root root 1829 64402 1304491026 1 f none /usr/local/include/php/Zend/zend_ts_hash.h 0644 root root 7077 1527 1304491026 1 f none /usr/local/include/php/Zend/zend_types.h 0644 root root 2368 46037 1304491026 1 f none /usr/local/include/php/Zend/zend_variables.h 0644 root root 4088 3397 1304491026 1 f none /usr/local/include/php/Zend/zend_vm.h 0644 root root 1435 31557 1304491026 1 f none /usr/local/include/php/Zend/zend_vm_def.h 0644 root root 134565 6076 1304491026 1 f none /usr/local/include/php/Zend/zend_vm_execute.h 0644 root root 1061735 34920 1304491026 1 f none /usr/local/include/php/Zend/zend_vm_opcodes.h 0644 root root 7914 56088 1304491026 1 d none /usr/local/include/php/ext 0755 root root 1 d none /usr/local/include/php/ext/date 0755 root root 1 d none /usr/local/include/php/ext/date/lib 0755 root root 1 f none /usr/local/include/php/ext/date/lib/timelib.h 0644 root root 5886 40128 1304491022 1 f none /usr/local/include/php/ext/date/lib/timelib_config.h 0644 root root 80 6423 1304491022 1 f none /usr/local/include/php/ext/date/lib/timelib_structs.h 0644 root root 6341 33034 1304491022 1 f none /usr/local/include/php/ext/date/php_date.h 0644 root root 5748 64150 1304491022 1 d none /usr/local/include/php/ext/dom 0755 root root 1 f none /usr/local/include/php/ext/dom/xml_common.h 0644 root root 3765 20346 1304491023 1 d none /usr/local/include/php/ext/ereg 0755 root root 1 f none /usr/local/include/php/ext/ereg/php_ereg.h 0644 root root 2001 9744 1304491022 1 f none /usr/local/include/php/ext/ereg/php_regex.h 0644 root root 2078 10764 1304491022 1 d none /usr/local/include/php/ext/ereg/regex 0755 root root 1 f none /usr/local/include/php/ext/ereg/regex/cclass.h 0644 root root 992 6590 1304491022 1 f none /usr/local/include/php/ext/ereg/regex/cname.h 0644 root root 2070 6899 1304491022 1 f none /usr/local/include/php/ext/ereg/regex/regex.h 0644 root root 2165 33927 1304491022 1 f none /usr/local/include/php/ext/ereg/regex/regex2.h 0644 root root 5536 42460 1304491022 1 f none /usr/local/include/php/ext/ereg/regex/utils.h 0644 root root 501 39192 1304491022 1 d none /usr/local/include/php/ext/filter 0755 root root 1 f none /usr/local/include/php/ext/filter/php_filter.h 0644 root root 3609 15613 1304491023 1 d none /usr/local/include/php/ext/gd 0755 root root 1 f none /usr/local/include/php/ext/gd/gdcache.h 0644 root root 2866 38464 1304491023 1 d none /usr/local/include/php/ext/gd/libgd 0755 root root 1 f none /usr/local/include/php/ext/gd/libgd/gd.h 0644 root root 26208 12437 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gd_compat.h 0644 root root 1762 21786 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gd_intern.h 0644 root root 261 17896 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gd_io.h 0644 root root 950 13099 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gdcache.h 0644 root root 2716 27851 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gdfontg.h 0644 root root 529 43358 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gdfontl.h 0644 root root 527 43410 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gdfontmb.h 0644 root root 495 40471 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gdfonts.h 0644 root root 491 40278 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gdfontt.h 0644 root root 522 42891 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gdhelpers.h 0644 root root 1351 52229 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/jisx0208.h 0644 root root 71350 42899 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/wbmp.h 0644 root root 1283 32935 1304491023 1 f none /usr/local/include/php/ext/gd/php_gd.h 0644 root root 6228 17604 1304491023 1 d none /usr/local/include/php/ext/hash 0755 root root 1 f none /usr/local/include/php/ext/hash/php_hash.h 0644 root root 5123 21471 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_adler32.h 0644 root root 1881 63017 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_crc32.h 0644 root root 1955 3953 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_gost.h 0644 root root 1794 56034 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_haval.h 0644 root root 2315 26590 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_md.h 0644 root root 3945 40298 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_ripemd.h 0644 root root 3123 28815 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_salsa.h 0644 root root 1969 4204 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_sha.h 0644 root root 3934 27471 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_snefru.h 0644 root root 1911 65000 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_tiger.h 0644 root root 2057 12281 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_types.h 0644 root root 2196 24122 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_whirlpool.h 0644 root root 1828 57892 1304491023 1 d none /usr/local/include/php/ext/iconv 0755 root root 1 f none /usr/local/include/php/ext/iconv/php_have_bsd_iconv.h 0644 root root 1 10 1304491023 1 f none /usr/local/include/php/ext/iconv/php_have_glibc_iconv.h 0644 root root 1 10 1304491023 1 f none /usr/local/include/php/ext/iconv/php_have_ibm_iconv.h 0644 root root 1 10 1304491023 1 f none /usr/local/include/php/ext/iconv/php_have_iconv.h 0644 root root 21 1547 1304491023 1 f none /usr/local/include/php/ext/iconv/php_have_libiconv.h 0644 root root 1 10 1304491023 1 f none /usr/local/include/php/ext/iconv/php_iconv.h 0644 root root 4149 47589 1304491023 1 f none /usr/local/include/php/ext/iconv/php_iconv_aliased_libiconv.h 0644 root root 1 10 1304491023 1 f none /usr/local/include/php/ext/iconv/php_iconv_supports_errno.h 0644 root root 31 2396 1304491023 1 f none /usr/local/include/php/ext/iconv/php_php_iconv_h_path.h 0644 root root 54 4613 1304491023 1 f none /usr/local/include/php/ext/iconv/php_php_iconv_impl.h 0644 root root 1 10 1304491023 1 d none /usr/local/include/php/ext/json 0755 root root 1 f none /usr/local/include/php/ext/json/php_json.h 0644 root root 2408 40044 1304491024 1 d none /usr/local/include/php/ext/libxml 0755 root root 1 f none /usr/local/include/php/ext/libxml/php_libxml.h 0644 root root 4406 28001 1304491022 1 d none /usr/local/include/php/ext/pcre 0755 root root 1 f none /usr/local/include/php/ext/pcre/php_pcre.h 0644 root root 3280 57860 1304491023 1 d none /usr/local/include/php/ext/pdo 0755 root root 1 f none /usr/local/include/php/ext/pdo/php_pdo.h 0644 root root 3138 34471 1304491028 1 f none /usr/local/include/php/ext/pdo/php_pdo_driver.h 0644 root root 24209 8692 1304491028 1 d none /usr/local/include/php/ext/session 0755 root root 1 f none /usr/local/include/php/ext/session/mod_files.h 0644 root root 1343 20957 1304491024 1 f none /usr/local/include/php/ext/session/mod_user.h 0644 root root 1336 20433 1304491024 1 f none /usr/local/include/php/ext/session/php_session.h 0644 root root 8261 51721 1304491024 1 d none /usr/local/include/php/ext/sockets 0755 root root 1 f none /usr/local/include/php/ext/sockets/php_sockets.h 0644 root root 3849 31586 1304491024 1 d none /usr/local/include/php/ext/spl 0755 root root 1 f none /usr/local/include/php/ext/spl/php_spl.h 0644 root root 2825 10191 1304491024 1 f none /usr/local/include/php/ext/spl/spl_array.h 0644 root root 1825 62113 1304491024 1 f none /usr/local/include/php/ext/spl/spl_directory.h 0644 root root 6008 61896 1304491024 1 f none /usr/local/include/php/ext/spl/spl_dllist.h 0644 root root 1628 43752 1304491024 1 f none /usr/local/include/php/ext/spl/spl_engine.h 0644 root root 2417 46769 1304491024 1 f none /usr/local/include/php/ext/spl/spl_exceptions.h 0644 root root 2266 38955 1304491024 1 f none /usr/local/include/php/ext/spl/spl_fixedarray.h 0644 root root 1583 38205 1304491024 1 f none /usr/local/include/php/ext/spl/spl_functions.h 0644 root root 4550 39639 1304491024 1 f none /usr/local/include/php/ext/spl/spl_heap.h 0644 root root 1668 47292 1304491024 1 f none /usr/local/include/php/ext/spl/spl_iterators.h 0644 root root 5529 27271 1304491024 1 f none /usr/local/include/php/ext/spl/spl_observer.h 0644 root root 1697 50265 1304491024 1 d none /usr/local/include/php/ext/sqlite 0755 root root 1 d none /usr/local/include/php/ext/sqlite/libsqlite 0755 root root 1 d none /usr/local/include/php/ext/sqlite/libsqlite/src 0755 root root 1 f none /usr/local/include/php/ext/sqlite/libsqlite/src/sqlite.h 0644 root root 38776 52809 1304491024 1 d none /usr/local/include/php/ext/sqlite3 0755 root root 1 d none /usr/local/include/php/ext/sqlite3/libsqlite 0755 root root 1 f none /usr/local/include/php/ext/sqlite3/libsqlite/sqlite3.h 0644 root root 295268 23423 1304491023 1 d none /usr/local/include/php/ext/standard 0755 root root 1 f none /usr/local/include/php/ext/standard/base64.h 0644 root root 1658 45110 1304491025 1 f none /usr/local/include/php/ext/standard/basic_functions.h 0644 root root 7007 42670 1304491025 1 f none /usr/local/include/php/ext/standard/crc32.h 0644 root root 4940 63771 1304491025 1 f none /usr/local/include/php/ext/standard/credits.h 0644 root root 1784 48850 1304491025 1 f none /usr/local/include/php/ext/standard/credits_ext.h 0644 root root 5622 64237 1304491025 1 f none /usr/local/include/php/ext/standard/credits_sapi.h 0644 root root 1574 60152 1304491025 1 f none /usr/local/include/php/ext/standard/crypt_freesec.h 0644 root root 1002 17346 1304491025 1 f none /usr/local/include/php/ext/standard/css.h 0644 root root 1282 15329 1304491025 1 f none /usr/local/include/php/ext/standard/cyr_convert.h 0644 root root 1320 17706 1304491025 1 f none /usr/local/include/php/ext/standard/datetime.h 0644 root root 1446 25595 1304491025 1 f none /usr/local/include/php/ext/standard/dl.h 0644 root root 1652 41986 1304491025 1 f none /usr/local/include/php/ext/standard/exec.h 0644 root root 1748 54050 1304491025 1 f none /usr/local/include/php/ext/standard/file.h 0644 root root 4453 16353 1304491025 1 f none /usr/local/include/php/ext/standard/flock_compat.h 0644 root root 2172 20546 1304491025 1 f none /usr/local/include/php/ext/standard/fsock.h 0644 root root 1655 39420 1304491025 1 f none /usr/local/include/php/ext/standard/head.h 0644 root root 1673 48793 1304491025 1 f none /usr/local/include/php/ext/standard/html.h 0644 root root 2260 32445 1304491025 1 f none /usr/local/include/php/ext/standard/info.h 0644 root root 3753 11131 1304491025 1 f none /usr/local/include/php/ext/standard/md5.h 0644 root root 2212 26307 1304491025 1 f none /usr/local/include/php/ext/standard/microtime.h 0644 root root 1414 25860 1304491025 1 f none /usr/local/include/php/ext/standard/pack.h 0644 root root 1323 17892 1304491025 1 f none /usr/local/include/php/ext/standard/pageinfo.h 0644 root root 1513 34345 1304491025 1 f none /usr/local/include/php/ext/standard/php_array.h 0644 root root 4430 6593 1304491025 1 f none /usr/local/include/php/ext/standard/php_assert.h 0644 root root 1479 30770 1304491025 1 f none /usr/local/include/php/ext/standard/php_browscap.h 0644 root root 1380 22404 1304491025 1 f none /usr/local/include/php/ext/standard/php_crypt.h 0644 root root 1610 36644 1304491025 1 f none /usr/local/include/php/ext/standard/php_crypt_r.h 0644 root root 2178 27015 1304491025 1 f none /usr/local/include/php/ext/standard/php_dir.h 0644 root root 1653 43842 1304491025 1 f none /usr/local/include/php/ext/standard/php_dns.h 0644 root root 2932 12600 1304491025 1 f none /usr/local/include/php/ext/standard/php_ext_syslog.h 0644 root root 1603 40934 1304491025 1 f none /usr/local/include/php/ext/standard/php_filestat.h 0644 root root 3410 53060 1304491025 1 f none /usr/local/include/php/ext/standard/php_fopen_wrappers.h 0644 root root 2000 12724 1304491025 1 f none /usr/local/include/php/ext/standard/php_ftok.h 0644 root root 1312 17299 1304491025 1 f none /usr/local/include/php/ext/standard/php_http.h 0644 root root 1838 60464 1304491025 1 f none /usr/local/include/php/ext/standard/php_image.h 0644 root root 2435 37145 1304491025 1 f none /usr/local/include/php/ext/standard/php_incomplete_class.h 0644 root root 2571 53828 1304491025 1 f none /usr/local/include/php/ext/standard/php_iptc.h 0644 root root 1322 18008 1304491025 1 f none /usr/local/include/php/ext/standard/php_lcg.h 0644 root root 1583 40325 1304491025 1 f none /usr/local/include/php/ext/standard/php_link.h 0644 root root 1419 23438 1304491025 1 f none /usr/local/include/php/ext/standard/php_mail.h 0644 root root 1455 29201 1304491025 1 f none /usr/local/include/php/ext/standard/php_math.h 0644 root root 4687 61812 1304491025 1 f none /usr/local/include/php/ext/standard/php_metaphone.h 0644 root root 1296 16193 1304491025 1 f none /usr/local/include/php/ext/standard/php_rand.h 0644 root root 2651 45111 1304491025 1 f none /usr/local/include/php/ext/standard/php_smart_str.h 0644 root root 6584 10198 1304491025 1 f none /usr/local/include/php/ext/standard/php_smart_str_public.h 0644 root root 1379 23783 1304491025 1 f none /usr/local/include/php/ext/standard/php_standard.h 0644 root root 2293 34209 1304491025 1 f none /usr/local/include/php/ext/standard/php_string.h 0644 root root 6170 31798 1304491025 1 f none /usr/local/include/php/ext/standard/php_type.h 0644 root root 1640 44520 1304491025 1 f none /usr/local/include/php/ext/standard/php_uuencode.h 0644 root root 1549 36361 1304491025 1 f none /usr/local/include/php/ext/standard/php_var.h 0644 root root 5639 20384 1304491025 1 f none /usr/local/include/php/ext/standard/php_versioning.h 0644 root root 1460 30997 1304491025 1 f none /usr/local/include/php/ext/standard/proc_open.h 0644 root root 1900 4067 1304491025 1 f none /usr/local/include/php/ext/standard/quot_print.h 0644 root root 1592 43197 1304491025 1 f none /usr/local/include/php/ext/standard/scanf.h 0644 root root 2369 28917 1304491025 1 f none /usr/local/include/php/ext/standard/sha1.h 0644 root root 1795 55825 1304491025 1 f none /usr/local/include/php/ext/standard/streamsfuncs.h 0644 root root 2864 23963 1304491025 1 f none /usr/local/include/php/ext/standard/uniqid.h 0644 root root 1318 17308 1304491025 1 f none /usr/local/include/php/ext/standard/url.h 0644 root root 2316 34943 1304491025 1 f none /usr/local/include/php/ext/standard/url_scanner_ex.h 0644 root root 2195 29048 1304491025 1 f none /usr/local/include/php/ext/standard/winver.h 0644 root root 3330 23071 1304491025 1 d none /usr/local/include/php/ext/xml 0755 root root 1 f none /usr/local/include/php/ext/xml/expat_compat.h 0644 root root 6143 26328 1304491025 1 f none /usr/local/include/php/ext/xml/php_xml.h 0644 root root 4624 41219 1304491025 1 d none /usr/local/include/php/include 0755 root root 1 d none /usr/local/include/php/main 0755 root root 1 f none /usr/local/include/php/main/SAPI.h 0644 root root 9804 24761 1304491027 1 f none /usr/local/include/php/main/build-defs.h 0644 root root 5012 28841 1304491027 1 f none /usr/local/include/php/main/fopen_wrappers.h 0644 root root 2711 4346 1304491027 1 f none /usr/local/include/php/main/logos.h 0644 root root 56039 56307 1304491027 1 f none /usr/local/include/php/main/php.h 0644 root root 12259 29865 1304491027 1 f none /usr/local/include/php/main/php3_compat.h 0644 root root 4613 8602 1304491027 1 f none /usr/local/include/php/main/php_compat.h 0644 root root 18113 21852 1304491027 1 f none /usr/local/include/php/main/php_config.h 0644 root root 60456 39890 1304491027 1 f none /usr/local/include/php/main/php_content_types.h 0644 root root 1565 38761 1304491027 1 f none /usr/local/include/php/main/php_getopt.h 0644 root root 2121 21137 1304491027 1 f none /usr/local/include/php/main/php_globals.h 0644 root root 4323 24237 1304491027 1 f none /usr/local/include/php/main/php_ini.h 0644 root root 3805 29676 1304491027 1 f none /usr/local/include/php/main/php_logos.h 0644 root root 1587 41225 1304491027 1 f none /usr/local/include/php/main/php_main.h 0644 root root 2765 16233 1304491027 1 f none /usr/local/include/php/main/php_memory_streams.h 0644 root root 3387 2544 1304491027 1 f none /usr/local/include/php/main/php_network.h 0644 root root 9469 48153 1304491027 1 f none /usr/local/include/php/main/php_open_temporary_file.h 0644 root root 1806 60911 1304491027 1 f none /usr/local/include/php/main/php_output.h 0644 root root 4763 61062 1304491027 1 f none /usr/local/include/php/main/php_reentrancy.h 0644 root root 3745 23050 1304491027 1 f none /usr/local/include/php/main/php_scandir.h 0644 root root 1982 7012 1304491027 1 f none /usr/local/include/php/main/php_streams.h 0644 root root 29240 46795 1304491027 1 f none /usr/local/include/php/main/php_syslog.h 0644 root root 1624 42685 1304491027 1 f none /usr/local/include/php/main/php_ticks.h 0644 root root 1610 42145 1304491027 1 f none /usr/local/include/php/main/php_variables.h 0644 root root 2097 16119 1304491027 1 f none /usr/local/include/php/main/php_version.h 0644 root root 264 20905 1304491027 1 f none /usr/local/include/php/main/rfc1867.h 0644 root root 2582 63201 1304491027 1 f none /usr/local/include/php/main/safe_mode.h 0644 root root 1819 56924 1304491027 1 f none /usr/local/include/php/main/snprintf.h 0644 root root 7077 22839 1304491027 1 f none /usr/local/include/php/main/spprintf.h 0644 root root 2119 20753 1304491027 1 d none /usr/local/include/php/main/streams 0755 root root 1 f none /usr/local/include/php/main/streams/php_stream_context.h 0644 root root 6395 64713 1304491027 1 f none /usr/local/include/php/main/streams/php_stream_filter_api.h 0644 root root 7273 20263 1304491027 1 f none /usr/local/include/php/main/streams/php_stream_glob_wrapper.h 0644 root root 2179 27192 1304491027 1 f none /usr/local/include/php/main/streams/php_stream_mmap.h 0644 root root 3565 14313 1304491027 1 f none /usr/local/include/php/main/streams/php_stream_plain_wrapper.h 0644 root root 3842 43167 1304491027 1 f none /usr/local/include/php/main/streams/php_stream_transport.h 0644 root root 6775 27956 1304491027 1 f none /usr/local/include/php/main/streams/php_stream_userspace.h 0644 root root 1615 44273 1304491027 1 f none /usr/local/include/php/main/streams/php_streams_int.h 0644 root root 3087 35691 1304491027 1 f none /usr/local/include/php/main/win32_internal_function_disabled.h 0644 root root 1668 44341 1304491027 1 f none /usr/local/include/php/main/win95nt.h 0644 root root 2740 60424 1304491027 1 d none /usr/local/lib 0755 root root 1 d none /usr/local/lib/php 0755 root root 1 d none /usr/local/lib/php/.channels 0755 root root 1 d none /usr/local/lib/php/.channels/.alias 0755 root root 1 f none /usr/local/lib/php/.channels/.alias/pear.txt 0644 root root 12 1171 1304491027 1 f none /usr/local/lib/php/.channels/.alias/pecl.txt 0644 root root 12 1167 1304491027 1 f none /usr/local/lib/php/.channels/.alias/phpdocs.txt 0644 root root 11 1057 1304491027 1 f none /usr/local/lib/php/.channels/__uri.reg 0644 root root 293 22962 1304491027 1 f none /usr/local/lib/php/.channels/doc.php.net.reg 0644 root root 559 44535 1304491027 1 f none /usr/local/lib/php/.channels/pear.php.net.reg 0644 root root 578 46458 1304491027 1 f none /usr/local/lib/php/.channels/pecl.php.net.reg 0644 root root 581 46717 1304491027 1 f none /usr/local/lib/php/.depdb 0644 root root 2437 62643 1304491028 1 f none /usr/local/lib/php/.depdblock 0644 root root 0 0 1304491028 1 f none /usr/local/lib/php/.filemap 0644 root root 8267 62379 1304491028 1 f none /usr/local/lib/php/.lock 0644 root root 0 0 1304491028 1 d none /usr/local/lib/php/.registry 0755 root root 1 d none /usr/local/lib/php/.registry/.channel.__uri 0755 root root 1 d none /usr/local/lib/php/.registry/.channel.doc.php.net 0755 root root 1 d none /usr/local/lib/php/.registry/.channel.pecl.php.net 0755 root root 1 f none /usr/local/lib/php/.registry/archive_tar.reg 0644 root root 11030 34538 1304491027 1 f none /usr/local/lib/php/.registry/console_getopt.reg 0644 root root 6518 61629 1304491028 1 f none /usr/local/lib/php/.registry/pear.reg 0644 root root 83503 3489 1304491028 1 f none /usr/local/lib/php/.registry/structures_graph.reg 0644 root root 19658 10351 1304491028 1 f none /usr/local/lib/php/.registry/xml_util.reg 0644 root root 25333 46618 1304491028 1 d none /usr/local/lib/php/Archive 0755 root root 1 f none /usr/local/lib/php/Archive/Tar.php 0644 root root 64332 37024 1304491027 1 d none /usr/local/lib/php/Console 0755 root root 1 f none /usr/local/lib/php/Console/Getopt.php 0644 root root 13469 42627 1304491028 1 d none /usr/local/lib/php/OS 0755 root root 1 f none /usr/local/lib/php/OS/Guess.php 0644 root root 10652 64621 1304491028 1 d none /usr/local/lib/php/PEAR 0755 root root 1 f none /usr/local/lib/php/PEAR.php 0644 root root 33897 12973 1304491028 1 f none /usr/local/lib/php/PEAR/Autoloader.php 0644 root root 6565 43457 1304491028 1 f none /usr/local/lib/php/PEAR/Builder.php 0644 root root 16475 43422 1304491028 1 d none /usr/local/lib/php/PEAR/ChannelFile 0755 root root 1 f none /usr/local/lib/php/PEAR/ChannelFile.php 0644 root root 50923 47666 1304491028 1 f none /usr/local/lib/php/PEAR/ChannelFile/Parser.php 0644 root root 1778 3843 1304491028 1 d none /usr/local/lib/php/PEAR/Command 0755 root root 1 f none /usr/local/lib/php/PEAR/Command.php 0644 root root 12699 14229 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Auth.php 0644 root root 2654 13953 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Auth.xml 0644 root root 1228 45820 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Build.php 0644 root root 2347 42315 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Build.xml 0644 root root 260 22723 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Channels.php 0644 root root 33535 14258 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Channels.xml 0644 root root 4218 47577 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Common.php 0644 root root 8292 30379 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Config.php 0644 root root 15422 5850 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Config.xml 0644 root root 3382 41603 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Install.php 0644 root root 50838 57862 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Install.xml 0644 root root 8574 18185 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Mirror.php 0644 root root 4594 18123 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Mirror.xml 0644 root root 617 55020 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Package.php 0644 root root 40253 22519 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Package.xml 0644 root root 7222 25087 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Pickle.php 0644 root root 15982 35572 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Pickle.xml 0644 root root 1179 38432 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Registry.php 0644 root root 46350 646 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Registry.xml 0644 root root 1790 22068 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Remote.php 0644 root root 30070 41925 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Remote.xml 0644 root root 3311 26837 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Test.php 0644 root root 11958 57541 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Test.xml 0644 root root 1641 7831 1304491028 1 f none /usr/local/lib/php/PEAR/Common.php 0644 root root 25773 61354 1304491028 1 f none /usr/local/lib/php/PEAR/Config.php 0644 root root 67882 64854 1304491028 1 f none /usr/local/lib/php/PEAR/Dependency2.php 0644 root root 50511 19089 1304491028 1 f none /usr/local/lib/php/PEAR/DependencyDB.php 0644 root root 24238 11233 1304491028 1 d none /usr/local/lib/php/PEAR/Downloader 0755 root root 1 f none /usr/local/lib/php/PEAR/Downloader.php 0644 root root 66575 40941 1304491028 1 f none /usr/local/lib/php/PEAR/Downloader/Package.php 0644 root root 76198 43539 1304491028 1 f none /usr/local/lib/php/PEAR/ErrorStack.php 0644 root root 33961 13896 1304491028 1 f none /usr/local/lib/php/PEAR/Exception.php 0644 root root 14006 61074 1304491028 1 f none /usr/local/lib/php/PEAR/FixPHP5PEARWarnings.php 0644 root root 153 11670 1304491028 1 d none /usr/local/lib/php/PEAR/Frontend 0755 root root 1 f none /usr/local/lib/php/PEAR/Frontend.php 0644 root root 6719 39624 1304491028 1 f none /usr/local/lib/php/PEAR/Frontend/CLI.php 0644 root root 25742 9245 1304491028 1 d none /usr/local/lib/php/PEAR/Installer 0755 root root 1 f none /usr/local/lib/php/PEAR/Installer.php 0644 root root 70863 36453 1304491028 1 d none /usr/local/lib/php/PEAR/Installer/Role 0755 root root 1 f none /usr/local/lib/php/PEAR/Installer/Role.php 0644 root root 7988 53230 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Cfg.php 0644 root root 4034 29149 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Cfg.xml 0644 root root 421 39111 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Common.php 0644 root root 6299 13627 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Data.php 0644 root root 851 789 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Data.xml 0644 root root 402 37127 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Doc.php 0644 root root 848 489 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Doc.xml 0644 root root 401 37027 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Ext.php 0644 root root 848 570 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Ext.xml 0644 root root 322 29582 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Php.php 0644 root root 848 543 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Php.xml 0644 root root 429 39902 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Script.php 0644 root root 857 1542 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Script.xml 0644 root root 432 40201 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Src.php 0644 root root 949 8114 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Src.xml 0644 root root 290 26283 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Test.php 0644 root root 851 903 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Test.xml 0644 root root 402 37165 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Www.php 0644 root root 844 310 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Www.xml 0644 root root 420 39048 1304491028 1 d none /usr/local/lib/php/PEAR/PackageFile 0755 root root 1 f none /usr/local/lib/php/PEAR/PackageFile.php 0644 root root 15898 14049 1304491028 1 d none /usr/local/lib/php/PEAR/PackageFile/Generator 0755 root root 1 f none /usr/local/lib/php/PEAR/PackageFile/Generator/v1.php 0644 root root 50402 41492 1304491028 1 f none /usr/local/lib/php/PEAR/PackageFile/Generator/v2.php 0644 root root 33520 19614 1304491028 1 d none /usr/local/lib/php/PEAR/PackageFile/Parser 0755 root root 1 f none /usr/local/lib/php/PEAR/PackageFile/Parser/v1.php 0644 root root 16588 4895 1304491028 1 f none /usr/local/lib/php/PEAR/PackageFile/Parser/v2.php 0644 root root 3213 42113 1304491028 1 f none /usr/local/lib/php/PEAR/PackageFile/v1.php 0644 root root 51184 24041 1304491028 1 d none /usr/local/lib/php/PEAR/PackageFile/v2 0755 root root 1 f none /usr/local/lib/php/PEAR/PackageFile/v2.php 0644 root root 69502 58131 1304491028 1 f none /usr/local/lib/php/PEAR/PackageFile/v2/Validator.php 0644 root root 86121 31845 1304491028 1 f none /usr/local/lib/php/PEAR/PackageFile/v2/rw.php 0644 root root 63112 43712 1304491028 1 f none /usr/local/lib/php/PEAR/Packager.php 0644 root root 7785 18751 1304491028 1 d none /usr/local/lib/php/PEAR/REST 0755 root root 1 f none /usr/local/lib/php/PEAR/REST.php 0644 root root 16538 60662 1304491028 1 f none /usr/local/lib/php/PEAR/REST/10.php 0644 root root 32645 17676 1304491028 1 f none /usr/local/lib/php/PEAR/REST/11.php 0644 root root 11308 6671 1304491028 1 f none /usr/local/lib/php/PEAR/REST/13.php 0644 root root 11620 10650 1304491028 1 f none /usr/local/lib/php/PEAR/Registry.php 0644 root root 75860 40984 1304491028 1 f none /usr/local/lib/php/PEAR/RunTest.php 0644 root root 35962 45106 1304491028 1 d none /usr/local/lib/php/PEAR/Task 0755 root root 1 f none /usr/local/lib/php/PEAR/Task/Common.php 0644 root root 6110 13581 1304491028 1 d none /usr/local/lib/php/PEAR/Task/Postinstallscript 0755 root root 1 f none /usr/local/lib/php/PEAR/Task/Postinstallscript.php 0644 root root 14418 12622 1304491028 1 f none /usr/local/lib/php/PEAR/Task/Postinstallscript/rw.php 0644 root root 5833 46982 1304491028 1 d none /usr/local/lib/php/PEAR/Task/Replace 0755 root root 1 f none /usr/local/lib/php/PEAR/Task/Replace.php 0644 root root 6810 14052 1304491028 1 f none /usr/local/lib/php/PEAR/Task/Replace/rw.php 0644 root root 1613 57569 1304491028 1 d none /usr/local/lib/php/PEAR/Task/Unixeol 0755 root root 1 f none /usr/local/lib/php/PEAR/Task/Unixeol.php 0644 root root 2273 45896 1304491028 1 f none /usr/local/lib/php/PEAR/Task/Unixeol/rw.php 0644 root root 1373 38840 1304491028 1 d none /usr/local/lib/php/PEAR/Task/Windowseol 0755 root root 1 f none /usr/local/lib/php/PEAR/Task/Windowseol.php 0644 root root 2269 45798 1304491028 1 f none /usr/local/lib/php/PEAR/Task/Windowseol/rw.php 0644 root root 1394 41129 1304491028 1 f none /usr/local/lib/php/PEAR/Validate.php 0644 root root 22061 40427 1304491028 1 d none /usr/local/lib/php/PEAR/Validator 0755 root root 1 f none /usr/local/lib/php/PEAR/Validator/PECL.php 0644 root root 2173 32463 1304491028 1 f none /usr/local/lib/php/PEAR/XMLParser.php 0644 root root 7169 48316 1304491028 1 f none /usr/local/lib/php/PEAR5.php 0644 root root 1087 20603 1304491028 1 d none /usr/local/lib/php/Structures 0755 root root 1 d none /usr/local/lib/php/Structures/Graph 0755 root root 1 f none /usr/local/lib/php/Structures/Graph.php 0644 root root 5747 24959 1304491028 1 d none /usr/local/lib/php/Structures/Graph/Manipulator 0755 root root 1 f none /usr/local/lib/php/Structures/Graph/Manipulator/AcyclicTest.php 0644 root root 5744 30242 1304491028 1 f none /usr/local/lib/php/Structures/Graph/Manipulator/TopologicalSorter.php 0644 root root 6694 45862 1304491028 1 f none /usr/local/lib/php/Structures/Graph/Node.php 0644 root root 11048 30713 1304491028 1 f none /usr/local/lib/php/System.php 0644 root root 19967 62304 1304491028 1 d none /usr/local/lib/php/XML 0755 root root 1 f none /usr/local/lib/php/XML/Util.php 0644 root root 30440 53652 1304491028 1 d none /usr/local/lib/php/build 0755 root root 1 f none /usr/local/lib/php/build/Makefile.global 0644 root root 5498 22477 1304491021 1 f none /usr/local/lib/php/build/acinclude.m4 0644 root root 75979 1711 1304491021 1 f none /usr/local/lib/php/build/config.guess 0755 root root 44892 23949 1304491021 1 f none /usr/local/lib/php/build/config.sub 0755 root root 33387 42120 1304491021 1 f none /usr/local/lib/php/build/libtool.m4 0644 root root 230324 8547 1304491021 1 f none /usr/local/lib/php/build/ltmain.sh 0644 root root 199728 29169 1304491021 1 f none /usr/local/lib/php/build/mkdep.awk 0644 root root 2272 17033 1304491021 1 f none /usr/local/lib/php/build/phpize.m4 0644 root root 4639 35636 1304491021 1 f none /usr/local/lib/php/build/run-tests.php 0644 root root 69309 17938 1304491021 1 f none /usr/local/lib/php/build/scan_makefile_in.awk 0644 root root 410 29019 1304491021 1 f none /usr/local/lib/php/build/shtool 0755 root root 65467 40759 1304491021 1 d none /usr/local/lib/php/data 0755 root root 1 d none /usr/local/lib/php/data/PEAR 0755 root root 1 f none /usr/local/lib/php/data/PEAR/package.dtd 0644 root root 3391 37669 1304491028 1 f none /usr/local/lib/php/data/PEAR/template.spec 0644 root root 2005 41492 1304491028 1 d none /usr/local/lib/php/data/Structures_Graph 0755 root root 1 f none /usr/local/lib/php/data/Structures_Graph/LICENSE 0644 root root 26430 8501 1304491028 1 d none /usr/local/lib/php/doc 0755 root root 1 d none /usr/local/lib/php/doc/Archive_Tar 0755 root root 1 d none /usr/local/lib/php/doc/Archive_Tar/docs 0755 root root 1 f none /usr/local/lib/php/doc/Archive_Tar/docs/Archive_Tar.txt 0644 root root 18363 42700 1304491027 1 d none /usr/local/lib/php/doc/PEAR 0755 root root 1 f none /usr/local/lib/php/doc/PEAR/INSTALL 0644 root root 2217 63663 1304491028 1 f none /usr/local/lib/php/doc/PEAR/LICENSE 0644 root root 1477 50946 1304491028 1 f none /usr/local/lib/php/doc/PEAR/README 0644 root root 1189 36408 1304491028 1 d none /usr/local/lib/php/doc/Structures_Graph 0755 root root 1 d none /usr/local/lib/php/doc/Structures_Graph/docs 0755 root root 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/generate.sh 0644 root root 365 31831 1304491028 1 d none /usr/local/lib/php/doc/Structures_Graph/docs/html 0755 root root 1 d none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph 0755 root root 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/Structures_Graph.html 0644 root root 8891 56254 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html 0644 root root 3848 47398 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html 0644 root root 4193 14339 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/Structures_Graph_Node.html 0644 root root 20537 9343 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_Manipulator_AcyclicTest_php.html 0644 root root 3890 45143 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_Manipulator_TopologicalSorter_php.html 0644 root root 4437 26621 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_Node_php.html 0644 root root 3310 60002 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_php.html 0644 root root 4231 63225 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/tutorial_Structures_Graph.pkg.html 0644 root root 4678 15136 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/classtrees_Structures_Graph.html 0644 root root 1368 51677 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/elementindex.html 0644 root root 15623 63283 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/elementindex_Structures_Graph.html 0644 root root 15952 33295 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/errors.html 0644 root root 725 58228 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/index.html 0644 root root 1009 15383 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/li_Structures_Graph.html 0644 root root 2544 5567 1304491028 1 d none /usr/local/lib/php/doc/Structures_Graph/docs/html/media 0755 root root 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/media/banner.css 0644 root root 393 30727 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/media/stylesheet.css 0644 root root 4996 30326 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/packages.html 0644 root root 929 1827 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/todolist.html 0644 root root 876 5677 1304491028 1 d none /usr/local/lib/php/doc/Structures_Graph/docs/tutorials 0755 root root 1 d none /usr/local/lib/php/doc/Structures_Graph/docs/tutorials/Structures_Graph 0755 root root 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/tutorials/Structures_Graph/Structures_Graph.pkg 0644 root root 4044 26071 1304491028 1 d none /usr/local/lib/php/doc/XML_Util 0755 root root 1 d none /usr/local/lib/php/doc/XML_Util/examples 0755 root root 1 f none /usr/local/lib/php/doc/XML_Util/examples/example.php 0644 root root 9213 38187 1304491028 1 f none /usr/local/lib/php/doc/XML_Util/examples/example2.php 0644 root root 4897 48706 1304491028 1 f none /usr/local/lib/php/pearcmd.php 0644 root root 14436 3616 1304491028 1 f none /usr/local/lib/php/peclcmd.php 0644 root root 934 6486 1304491028 1 d none /usr/local/lib/php/test 0755 root root 1 d none /usr/local/lib/php/test/Structures_Graph 0755 root root 1 d none /usr/local/lib/php/test/Structures_Graph/tests 0755 root root 1 f none /usr/local/lib/php/test/Structures_Graph/tests/AllTests.php 0644 root root 3340 5242 1304491028 1 d none /usr/local/lib/php/test/Structures_Graph/tests/testCase 0755 root root 1 f none /usr/local/lib/php/test/Structures_Graph/tests/testCase/BasicGraph.php 0644 root root 9097 25804 1304491028 1 d none /usr/local/lib/php/test/XML_Util 0755 root root 1 d none /usr/local/lib/php/test/XML_Util/tests 0755 root root 1 f none /usr/local/lib/php/test/XML_Util/tests/AllTests.php 0644 root root 3632 23755 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_apiVersion.phpt 0644 root root 449 34704 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_attributesToString.phpt 0644 root root 3631 17955 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_collapseEmptyTags.phpt 0644 root root 1795 13118 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_createCDataSection.phpt 0644 root root 494 38676 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_createComment.phpt 0644 root root 471 36399 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_createEndElement.phpt 0644 root root 696 55132 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_createStartElement.phpt 0644 root root 3773 36699 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_createTag.phpt 0644 root root 5916 3444 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_createTagFromArray.phpt 0644 root root 9305 36544 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_getDocTypeDeclaration.phpt 0644 root root 1516 53150 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_getXmlDeclaration.phpt 0644 root root 1167 27570 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_isValidName.phpt 0644 root root 1410 45839 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_raiseError.phpt 0644 root root 502 38519 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_replaceEntities.phpt 0644 root root 3248 61763 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_reverseEntities.phpt 0644 root root 3233 58945 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_splitQualifiedName.phpt 0644 root root 983 15045 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBug_4950.phpt 0644 root root 675 52660 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBug_5392.phpt 0644 root root 1097 23405 1304491028 1 d none /usr/local/man 0755 root root 1 d none /usr/local/man/man1 0755 root root 1 f none /usr/local/man/man1/php-config.1 0644 root root 1679 8899 1304491027 1 f none /usr/local/man/man1/php.1 0644 root root 8708 65177 1304491020 1 f none /usr/local/man/man1/phpize.1 0644 root root 1015 17417 1304491027 1 d none /var ? ? ? 1 d none /var/opt ? ? ? 1 i checkinstall 790 2505 1304568702 1 i pkginfo 191 14904 1304568618 07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000b00000000TRAILER!!!07070100180cdf000081a40000000000000000000000014dc2232a000000bf000000b600010002ffffffffffffffff0000000800000000pkginfoPKG=php NAME=php 5.3.6 i86pc Solaris 11 VERSION=5.3.6 PSTAMP=4th May 2011 EMAIL=http://php.net/downloads.php DESC=PHP scripting language ARCH=i386 CATEGORY=application CLASSES=none BASEDIR=/ 07070100180cde000081a40000000000000000000000014dc2232a0000b2fa000000b600010002ffffffffffffffff0000000700000000pkgmap: 1 32856 1 d none /opt ? ? ? 1 d none /usr ? ? ? 1 d none /usr/local ? ? ? 1 d none /usr/local/bin 0755 root root 1 f none /usr/local/bin/pear 0755 root root 799 62128 1304491028 1 f none /usr/local/bin/peardev 0755 root root 820 63863 1304491028 1 f none /usr/local/bin/pecl 0755 root root 736 56562 1304491028 1 s none /usr/local/bin/phar=/usr/local/bin/phar.phar 1 f none /usr/local/bin/phar.phar 0755 root root 14796 36980 1304491028 1 f none /usr/local/bin/php 0755 root root 9361964 23871 1304491020 1 f none /usr/local/bin/php-config 0755 root root 3460 31068 1304491027 1 f none /usr/local/bin/phpize 0755 root root 4503 36867 1304491027 1 d none /usr/local/etc 0755 root root 1 f none /usr/local/etc/pear.conf 0644 root root 1164 30851 1304491028 1 d none /usr/local/include 0755 root root 1 d none /usr/local/include/php 0755 root root 1 d none /usr/local/include/php/TSRM 0755 root root 1 f none /usr/local/include/php/TSRM/TSRM.h 0644 root root 5337 37352 1304491026 1 f none /usr/local/include/php/TSRM/acconfig.h 0644 root root 16 1210 1304491026 1 f none /usr/local/include/php/TSRM/readdir.h 0644 root root 1102 22854 1304491026 1 f none /usr/local/include/php/TSRM/tsrm_config.h 0644 root root 32 2749 1304491026 1 f none /usr/local/include/php/TSRM/tsrm_config.w32.h 0644 root root 328 26029 1304491026 1 f none /usr/local/include/php/TSRM/tsrm_config_common.h 0644 root root 1462 49255 1304491026 1 f none /usr/local/include/php/TSRM/tsrm_nw.h 0644 root root 1384 23761 1304491026 1 f none /usr/local/include/php/TSRM/tsrm_strtok_r.h 0644 root root 115 9536 1304491026 1 f none /usr/local/include/php/TSRM/tsrm_virtual_cwd.h 0644 root root 12061 43893 1304491026 1 f none /usr/local/include/php/TSRM/tsrm_win32.h 0644 root root 3247 46832 1304491026 1 d none /usr/local/include/php/Zend 0755 root root 1 f none /usr/local/include/php/Zend/acconfig.h 0644 root root 3464 59494 1304491026 1 f none /usr/local/include/php/Zend/zend.h 0644 root root 24589 1272 1304491026 1 f none /usr/local/include/php/Zend/zend_API.h 0644 root root 38662 13584 1304491026 1 f none /usr/local/include/php/Zend/zend_alloc.h 0644 root root 12512 28928 1304491026 1 f none /usr/local/include/php/Zend/zend_build.h 0644 root root 1627 44397 1304491026 1 f none /usr/local/include/php/Zend/zend_builtin_functions.h 0644 root root 1681 48084 1304491026 1 f none /usr/local/include/php/Zend/zend_closures.h 0644 root root 1850 64044 1304491026 1 f none /usr/local/include/php/Zend/zend_compile.h 0644 root root 29717 38996 1304491026 1 f none /usr/local/include/php/Zend/zend_config.h 0644 root root 107 8464 1304491026 1 f none /usr/local/include/php/Zend/zend_config.nw.h 0644 root root 2556 51243 1304491026 1 f none /usr/local/include/php/Zend/zend_config.w32.h 0644 root root 3125 35718 1304491026 1 f none /usr/local/include/php/Zend/zend_constants.h 0644 root root 5067 11333 1304491026 1 f none /usr/local/include/php/Zend/zend_dynamic_array.h 0644 root root 1964 8615 1304491026 1 f none /usr/local/include/php/Zend/zend_errors.h 0644 root root 2199 14600 1304491026 1 f none /usr/local/include/php/Zend/zend_exceptions.h 0644 root root 3076 37288 1304491026 1 f none /usr/local/include/php/Zend/zend_execute.h 0644 root root 13221 14149 1304491026 1 f none /usr/local/include/php/Zend/zend_extensions.h 0644 root root 4663 48158 1304491026 1 f none /usr/local/include/php/Zend/zend_fast_cache.h 0644 root root 4176 32557 1304491026 1 f none /usr/local/include/php/Zend/zend_float.h 0644 root root 15707 48285 1304491026 1 f none /usr/local/include/php/Zend/zend_gc.h 0644 root root 7453 28602 1304491026 1 f none /usr/local/include/php/Zend/zend_globals.h 0644 root root 7346 28030 1304491026 1 f none /usr/local/include/php/Zend/zend_globals_macros.h 0644 root root 3285 56268 1304491026 1 f none /usr/local/include/php/Zend/zend_hash.h 0644 root root 17413 45175 1304491026 1 f none /usr/local/include/php/Zend/zend_highlight.h 0644 root root 2527 51740 1304491026 1 f none /usr/local/include/php/Zend/zend_indent.h 0644 root root 1521 33270 1304491026 1 f none /usr/local/include/php/Zend/zend_ini.h 0644 root root 10089 44662 1304491026 1 f none /usr/local/include/php/Zend/zend_ini_parser.h 0644 root root 2695 14993 1304491026 1 f none /usr/local/include/php/Zend/zend_ini_scanner.h 0644 root root 2007 10167 1304491026 1 f none /usr/local/include/php/Zend/zend_ini_scanner_defs.h 0644 root root 254 18992 1304491026 1 f none /usr/local/include/php/Zend/zend_interfaces.h 0644 root root 4132 9344 1304491026 1 f none /usr/local/include/php/Zend/zend_istdiostream.h 0644 root root 1703 49143 1304491026 1 f none /usr/local/include/php/Zend/zend_iterators.h 0644 root root 3747 35952 1304491026 1 f none /usr/local/include/php/Zend/zend_language_parser.h 0644 root root 7777 15479 1304491026 1 f none /usr/local/include/php/Zend/zend_language_scanner.h 0644 root root 2495 56246 1304491026 1 f none /usr/local/include/php/Zend/zend_language_scanner_defs.h 0644 root root 326 24608 1304491026 1 f none /usr/local/include/php/Zend/zend_list.h 0644 root root 5213 31386 1304491026 1 f none /usr/local/include/php/Zend/zend_llist.h 0644 root root 4027 1303 1304491026 1 f none /usr/local/include/php/Zend/zend_modules.h 0644 root root 5094 3850 1304491026 1 f none /usr/local/include/php/Zend/zend_multibyte.h 0644 root root 3861 44773 1304491026 1 f none /usr/local/include/php/Zend/zend_multiply.h 0644 root root 2562 30888 1304491026 1 f none /usr/local/include/php/Zend/zend_object_handlers.h 0644 root root 8681 19232 1304491026 1 f none /usr/local/include/php/Zend/zend_objects.h 0644 root root 2267 36174 1304491026 1 f none /usr/local/include/php/Zend/zend_objects_API.h 0644 root root 4406 36631 1304491026 1 f none /usr/local/include/php/Zend/zend_operators.h 0644 root root 15816 64895 1304491026 1 f none /usr/local/include/php/Zend/zend_ptr_stack.h 0644 root root 4135 56193 1304491026 1 f none /usr/local/include/php/Zend/zend_qsort.h 0644 root root 1512 35318 1304491026 1 f none /usr/local/include/php/Zend/zend_stack.h 0644 root root 2431 48537 1304491026 1 f none /usr/local/include/php/Zend/zend_static_allocator.h 0644 root root 1918 5917 1304491026 1 f none /usr/local/include/php/Zend/zend_stream.h 0644 root root 3001 23208 1304491026 1 f none /usr/local/include/php/Zend/zend_strtod.h 0644 root root 1829 64402 1304491026 1 f none /usr/local/include/php/Zend/zend_ts_hash.h 0644 root root 7077 1527 1304491026 1 f none /usr/local/include/php/Zend/zend_types.h 0644 root root 2368 46037 1304491026 1 f none /usr/local/include/php/Zend/zend_variables.h 0644 root root 4088 3397 1304491026 1 f none /usr/local/include/php/Zend/zend_vm.h 0644 root root 1435 31557 1304491026 1 f none /usr/local/include/php/Zend/zend_vm_def.h 0644 root root 134565 6076 1304491026 1 f none /usr/local/include/php/Zend/zend_vm_execute.h 0644 root root 1061735 34920 1304491026 1 f none /usr/local/include/php/Zend/zend_vm_opcodes.h 0644 root root 7914 56088 1304491026 1 d none /usr/local/include/php/ext 0755 root root 1 d none /usr/local/include/php/ext/date 0755 root root 1 d none /usr/local/include/php/ext/date/lib 0755 root root 1 f none /usr/local/include/php/ext/date/lib/timelib.h 0644 root root 5886 40128 1304491022 1 f none /usr/local/include/php/ext/date/lib/timelib_config.h 0644 root root 80 6423 1304491022 1 f none /usr/local/include/php/ext/date/lib/timelib_structs.h 0644 root root 6341 33034 1304491022 1 f none /usr/local/include/php/ext/date/php_date.h 0644 root root 5748 64150 1304491022 1 d none /usr/local/include/php/ext/dom 0755 root root 1 f none /usr/local/include/php/ext/dom/xml_common.h 0644 root root 3765 20346 1304491023 1 d none /usr/local/include/php/ext/ereg 0755 root root 1 f none /usr/local/include/php/ext/ereg/php_ereg.h 0644 root root 2001 9744 1304491022 1 f none /usr/local/include/php/ext/ereg/php_regex.h 0644 root root 2078 10764 1304491022 1 d none /usr/local/include/php/ext/ereg/regex 0755 root root 1 f none /usr/local/include/php/ext/ereg/regex/cclass.h 0644 root root 992 6590 1304491022 1 f none /usr/local/include/php/ext/ereg/regex/cname.h 0644 root root 2070 6899 1304491022 1 f none /usr/local/include/php/ext/ereg/regex/regex.h 0644 root root 2165 33927 1304491022 1 f none /usr/local/include/php/ext/ereg/regex/regex2.h 0644 root root 5536 42460 1304491022 1 f none /usr/local/include/php/ext/ereg/regex/utils.h 0644 root root 501 39192 1304491022 1 d none /usr/local/include/php/ext/filter 0755 root root 1 f none /usr/local/include/php/ext/filter/php_filter.h 0644 root root 3609 15613 1304491023 1 d none /usr/local/include/php/ext/gd 0755 root root 1 f none /usr/local/include/php/ext/gd/gdcache.h 0644 root root 2866 38464 1304491023 1 d none /usr/local/include/php/ext/gd/libgd 0755 root root 1 f none /usr/local/include/php/ext/gd/libgd/gd.h 0644 root root 26208 12437 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gd_compat.h 0644 root root 1762 21786 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gd_intern.h 0644 root root 261 17896 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gd_io.h 0644 root root 950 13099 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gdcache.h 0644 root root 2716 27851 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gdfontg.h 0644 root root 529 43358 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gdfontl.h 0644 root root 527 43410 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gdfontmb.h 0644 root root 495 40471 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gdfonts.h 0644 root root 491 40278 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gdfontt.h 0644 root root 522 42891 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/gdhelpers.h 0644 root root 1351 52229 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/jisx0208.h 0644 root root 71350 42899 1304491023 1 f none /usr/local/include/php/ext/gd/libgd/wbmp.h 0644 root root 1283 32935 1304491023 1 f none /usr/local/include/php/ext/gd/php_gd.h 0644 root root 6228 17604 1304491023 1 d none /usr/local/include/php/ext/hash 0755 root root 1 f none /usr/local/include/php/ext/hash/php_hash.h 0644 root root 5123 21471 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_adler32.h 0644 root root 1881 63017 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_crc32.h 0644 root root 1955 3953 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_gost.h 0644 root root 1794 56034 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_haval.h 0644 root root 2315 26590 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_md.h 0644 root root 3945 40298 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_ripemd.h 0644 root root 3123 28815 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_salsa.h 0644 root root 1969 4204 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_sha.h 0644 root root 3934 27471 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_snefru.h 0644 root root 1911 65000 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_tiger.h 0644 root root 2057 12281 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_types.h 0644 root root 2196 24122 1304491023 1 f none /usr/local/include/php/ext/hash/php_hash_whirlpool.h 0644 root root 1828 57892 1304491023 1 d none /usr/local/include/php/ext/iconv 0755 root root 1 f none /usr/local/include/php/ext/iconv/php_have_bsd_iconv.h 0644 root root 1 10 1304491023 1 f none /usr/local/include/php/ext/iconv/php_have_glibc_iconv.h 0644 root root 1 10 1304491023 1 f none /usr/local/include/php/ext/iconv/php_have_ibm_iconv.h 0644 root root 1 10 1304491023 1 f none /usr/local/include/php/ext/iconv/php_have_iconv.h 0644 root root 21 1547 1304491023 1 f none /usr/local/include/php/ext/iconv/php_have_libiconv.h 0644 root root 1 10 1304491023 1 f none /usr/local/include/php/ext/iconv/php_iconv.h 0644 root root 4149 47589 1304491023 1 f none /usr/local/include/php/ext/iconv/php_iconv_aliased_libiconv.h 0644 root root 1 10 1304491023 1 f none /usr/local/include/php/ext/iconv/php_iconv_supports_errno.h 0644 root root 31 2396 1304491023 1 f none /usr/local/include/php/ext/iconv/php_php_iconv_h_path.h 0644 root root 54 4613 1304491023 1 f none /usr/local/include/php/ext/iconv/php_php_iconv_impl.h 0644 root root 1 10 1304491023 1 d none /usr/local/include/php/ext/json 0755 root root 1 f none /usr/local/include/php/ext/json/php_json.h 0644 root root 2408 40044 1304491024 1 d none /usr/local/include/php/ext/libxml 0755 root root 1 f none /usr/local/include/php/ext/libxml/php_libxml.h 0644 root root 4406 28001 1304491022 1 d none /usr/local/include/php/ext/pcre 0755 root root 1 f none /usr/local/include/php/ext/pcre/php_pcre.h 0644 root root 3280 57860 1304491023 1 d none /usr/local/include/php/ext/pdo 0755 root root 1 f none /usr/local/include/php/ext/pdo/php_pdo.h 0644 root root 3138 34471 1304491028 1 f none /usr/local/include/php/ext/pdo/php_pdo_driver.h 0644 root root 24209 8692 1304491028 1 d none /usr/local/include/php/ext/session 0755 root root 1 f none /usr/local/include/php/ext/session/mod_files.h 0644 root root 1343 20957 1304491024 1 f none /usr/local/include/php/ext/session/mod_user.h 0644 root root 1336 20433 1304491024 1 f none /usr/local/include/php/ext/session/php_session.h 0644 root root 8261 51721 1304491024 1 d none /usr/local/include/php/ext/sockets 0755 root root 1 f none /usr/local/include/php/ext/sockets/php_sockets.h 0644 root root 3849 31586 1304491024 1 d none /usr/local/include/php/ext/spl 0755 root root 1 f none /usr/local/include/php/ext/spl/php_spl.h 0644 root root 2825 10191 1304491024 1 f none /usr/local/include/php/ext/spl/spl_array.h 0644 root root 1825 62113 1304491024 1 f none /usr/local/include/php/ext/spl/spl_directory.h 0644 root root 6008 61896 1304491024 1 f none /usr/local/include/php/ext/spl/spl_dllist.h 0644 root root 1628 43752 1304491024 1 f none /usr/local/include/php/ext/spl/spl_engine.h 0644 root root 2417 46769 1304491024 1 f none /usr/local/include/php/ext/spl/spl_exceptions.h 0644 root root 2266 38955 1304491024 1 f none /usr/local/include/php/ext/spl/spl_fixedarray.h 0644 root root 1583 38205 1304491024 1 f none /usr/local/include/php/ext/spl/spl_functions.h 0644 root root 4550 39639 1304491024 1 f none /usr/local/include/php/ext/spl/spl_heap.h 0644 root root 1668 47292 1304491024 1 f none /usr/local/include/php/ext/spl/spl_iterators.h 0644 root root 5529 27271 1304491024 1 f none /usr/local/include/php/ext/spl/spl_observer.h 0644 root root 1697 50265 1304491024 1 d none /usr/local/include/php/ext/sqlite 0755 root root 1 d none /usr/local/include/php/ext/sqlite/libsqlite 0755 root root 1 d none /usr/local/include/php/ext/sqlite/libsqlite/src 0755 root root 1 f none /usr/local/include/php/ext/sqlite/libsqlite/src/sqlite.h 0644 root root 38776 52809 1304491024 1 d none /usr/local/include/php/ext/sqlite3 0755 root root 1 d none /usr/local/include/php/ext/sqlite3/libsqlite 0755 root root 1 f none /usr/local/include/php/ext/sqlite3/libsqlite/sqlite3.h 0644 root root 295268 23423 1304491023 1 d none /usr/local/include/php/ext/standard 0755 root root 1 f none /usr/local/include/php/ext/standard/base64.h 0644 root root 1658 45110 1304491025 1 f none /usr/local/include/php/ext/standard/basic_functions.h 0644 root root 7007 42670 1304491025 1 f none /usr/local/include/php/ext/standard/crc32.h 0644 root root 4940 63771 1304491025 1 f none /usr/local/include/php/ext/standard/credits.h 0644 root root 1784 48850 1304491025 1 f none /usr/local/include/php/ext/standard/credits_ext.h 0644 root root 5622 64237 1304491025 1 f none /usr/local/include/php/ext/standard/credits_sapi.h 0644 root root 1574 60152 1304491025 1 f none /usr/local/include/php/ext/standard/crypt_freesec.h 0644 root root 1002 17346 1304491025 1 f none /usr/local/include/php/ext/standard/css.h 0644 root root 1282 15329 1304491025 1 f none /usr/local/include/php/ext/standard/cyr_convert.h 0644 root root 1320 17706 1304491025 1 f none /usr/local/include/php/ext/standard/datetime.h 0644 root root 1446 25595 1304491025 1 f none /usr/local/include/php/ext/standard/dl.h 0644 root root 1652 41986 1304491025 1 f none /usr/local/include/php/ext/standard/exec.h 0644 root root 1748 54050 1304491025 1 f none /usr/local/include/php/ext/standard/file.h 0644 root root 4453 16353 1304491025 1 f none /usr/local/include/php/ext/standard/flock_compat.h 0644 root root 2172 20546 1304491025 1 f none /usr/local/include/php/ext/standard/fsock.h 0644 root root 1655 39420 1304491025 1 f none /usr/local/include/php/ext/standard/head.h 0644 root root 1673 48793 1304491025 1 f none /usr/local/include/php/ext/standard/html.h 0644 root root 2260 32445 1304491025 1 f none /usr/local/include/php/ext/standard/info.h 0644 root root 3753 11131 1304491025 1 f none /usr/local/include/php/ext/standard/md5.h 0644 root root 2212 26307 1304491025 1 f none /usr/local/include/php/ext/standard/microtime.h 0644 root root 1414 25860 1304491025 1 f none /usr/local/include/php/ext/standard/pack.h 0644 root root 1323 17892 1304491025 1 f none /usr/local/include/php/ext/standard/pageinfo.h 0644 root root 1513 34345 1304491025 1 f none /usr/local/include/php/ext/standard/php_array.h 0644 root root 4430 6593 1304491025 1 f none /usr/local/include/php/ext/standard/php_assert.h 0644 root root 1479 30770 1304491025 1 f none /usr/local/include/php/ext/standard/php_browscap.h 0644 root root 1380 22404 1304491025 1 f none /usr/local/include/php/ext/standard/php_crypt.h 0644 root root 1610 36644 1304491025 1 f none /usr/local/include/php/ext/standard/php_crypt_r.h 0644 root root 2178 27015 1304491025 1 f none /usr/local/include/php/ext/standard/php_dir.h 0644 root root 1653 43842 1304491025 1 f none /usr/local/include/php/ext/standard/php_dns.h 0644 root root 2932 12600 1304491025 1 f none /usr/local/include/php/ext/standard/php_ext_syslog.h 0644 root root 1603 40934 1304491025 1 f none /usr/local/include/php/ext/standard/php_filestat.h 0644 root root 3410 53060 1304491025 1 f none /usr/local/include/php/ext/standard/php_fopen_wrappers.h 0644 root root 2000 12724 1304491025 1 f none /usr/local/include/php/ext/standard/php_ftok.h 0644 root root 1312 17299 1304491025 1 f none /usr/local/include/php/ext/standard/php_http.h 0644 root root 1838 60464 1304491025 1 f none /usr/local/include/php/ext/standard/php_image.h 0644 root root 2435 37145 1304491025 1 f none /usr/local/include/php/ext/standard/php_incomplete_class.h 0644 root root 2571 53828 1304491025 1 f none /usr/local/include/php/ext/standard/php_iptc.h 0644 root root 1322 18008 1304491025 1 f none /usr/local/include/php/ext/standard/php_lcg.h 0644 root root 1583 40325 1304491025 1 f none /usr/local/include/php/ext/standard/php_link.h 0644 root root 1419 23438 1304491025 1 f none /usr/local/include/php/ext/standard/php_mail.h 0644 root root 1455 29201 1304491025 1 f none /usr/local/include/php/ext/standard/php_math.h 0644 root root 4687 61812 1304491025 1 f none /usr/local/include/php/ext/standard/php_metaphone.h 0644 root root 1296 16193 1304491025 1 f none /usr/local/include/php/ext/standard/php_rand.h 0644 root root 2651 45111 1304491025 1 f none /usr/local/include/php/ext/standard/php_smart_str.h 0644 root root 6584 10198 1304491025 1 f none /usr/local/include/php/ext/standard/php_smart_str_public.h 0644 root root 1379 23783 1304491025 1 f none /usr/local/include/php/ext/standard/php_standard.h 0644 root root 2293 34209 1304491025 1 f none /usr/local/include/php/ext/standard/php_string.h 0644 root root 6170 31798 1304491025 1 f none /usr/local/include/php/ext/standard/php_type.h 0644 root root 1640 44520 1304491025 1 f none /usr/local/include/php/ext/standard/php_uuencode.h 0644 root root 1549 36361 1304491025 1 f none /usr/local/include/php/ext/standard/php_var.h 0644 root root 5639 20384 1304491025 1 f none /usr/local/include/php/ext/standard/php_versioning.h 0644 root root 1460 30997 1304491025 1 f none /usr/local/include/php/ext/standard/proc_open.h 0644 root root 1900 4067 1304491025 1 f none /usr/local/include/php/ext/standard/quot_print.h 0644 root root 1592 43197 1304491025 1 f none /usr/local/include/php/ext/standard/scanf.h 0644 root root 2369 28917 1304491025 1 f none /usr/local/include/php/ext/standard/sha1.h 0644 root root 1795 55825 1304491025 1 f none /usr/local/include/php/ext/standard/streamsfuncs.h 0644 root root 2864 23963 1304491025 1 f none /usr/local/include/php/ext/standard/uniqid.h 0644 root root 1318 17308 1304491025 1 f none /usr/local/include/php/ext/standard/url.h 0644 root root 2316 34943 1304491025 1 f none /usr/local/include/php/ext/standard/url_scanner_ex.h 0644 root root 2195 29048 1304491025 1 f none /usr/local/include/php/ext/standard/winver.h 0644 root root 3330 23071 1304491025 1 d none /usr/local/include/php/ext/xml 0755 root root 1 f none /usr/local/include/php/ext/xml/expat_compat.h 0644 root root 6143 26328 1304491025 1 f none /usr/local/include/php/ext/xml/php_xml.h 0644 root root 4624 41219 1304491025 1 d none /usr/local/include/php/include 0755 root root 1 d none /usr/local/include/php/main 0755 root root 1 f none /usr/local/include/php/main/SAPI.h 0644 root root 9804 24761 1304491027 1 f none /usr/local/include/php/main/build-defs.h 0644 root root 5012 28841 1304491027 1 f none /usr/local/include/php/main/fopen_wrappers.h 0644 root root 2711 4346 1304491027 1 f none /usr/local/include/php/main/logos.h 0644 root root 56039 56307 1304491027 1 f none /usr/local/include/php/main/php.h 0644 root root 12259 29865 1304491027 1 f none /usr/local/include/php/main/php3_compat.h 0644 root root 4613 8602 1304491027 1 f none /usr/local/include/php/main/php_compat.h 0644 root root 18113 21852 1304491027 1 f none /usr/local/include/php/main/php_config.h 0644 root root 60456 39890 1304491027 1 f none /usr/local/include/php/main/php_content_types.h 0644 root root 1565 38761 1304491027 1 f none /usr/local/include/php/main/php_getopt.h 0644 root root 2121 21137 1304491027 1 f none /usr/local/include/php/main/php_globals.h 0644 root root 4323 24237 1304491027 1 f none /usr/local/include/php/main/php_ini.h 0644 root root 3805 29676 1304491027 1 f none /usr/local/include/php/main/php_logos.h 0644 root root 1587 41225 1304491027 1 f none /usr/local/include/php/main/php_main.h 0644 root root 2765 16233 1304491027 1 f none /usr/local/include/php/main/php_memory_streams.h 0644 root root 3387 2544 1304491027 1 f none /usr/local/include/php/main/php_network.h 0644 root root 9469 48153 1304491027 1 f none /usr/local/include/php/main/php_open_temporary_file.h 0644 root root 1806 60911 1304491027 1 f none /usr/local/include/php/main/php_output.h 0644 root root 4763 61062 1304491027 1 f none /usr/local/include/php/main/php_reentrancy.h 0644 root root 3745 23050 1304491027 1 f none /usr/local/include/php/main/php_scandir.h 0644 root root 1982 7012 1304491027 1 f none /usr/local/include/php/main/php_streams.h 0644 root root 29240 46795 1304491027 1 f none /usr/local/include/php/main/php_syslog.h 0644 root root 1624 42685 1304491027 1 f none /usr/local/include/php/main/php_ticks.h 0644 root root 1610 42145 1304491027 1 f none /usr/local/include/php/main/php_variables.h 0644 root root 2097 16119 1304491027 1 f none /usr/local/include/php/main/php_version.h 0644 root root 264 20905 1304491027 1 f none /usr/local/include/php/main/rfc1867.h 0644 root root 2582 63201 1304491027 1 f none /usr/local/include/php/main/safe_mode.h 0644 root root 1819 56924 1304491027 1 f none /usr/local/include/php/main/snprintf.h 0644 root root 7077 22839 1304491027 1 f none /usr/local/include/php/main/spprintf.h 0644 root root 2119 20753 1304491027 1 d none /usr/local/include/php/main/streams 0755 root root 1 f none /usr/local/include/php/main/streams/php_stream_context.h 0644 root root 6395 64713 1304491027 1 f none /usr/local/include/php/main/streams/php_stream_filter_api.h 0644 root root 7273 20263 1304491027 1 f none /usr/local/include/php/main/streams/php_stream_glob_wrapper.h 0644 root root 2179 27192 1304491027 1 f none /usr/local/include/php/main/streams/php_stream_mmap.h 0644 root root 3565 14313 1304491027 1 f none /usr/local/include/php/main/streams/php_stream_plain_wrapper.h 0644 root root 3842 43167 1304491027 1 f none /usr/local/include/php/main/streams/php_stream_transport.h 0644 root root 6775 27956 1304491027 1 f none /usr/local/include/php/main/streams/php_stream_userspace.h 0644 root root 1615 44273 1304491027 1 f none /usr/local/include/php/main/streams/php_streams_int.h 0644 root root 3087 35691 1304491027 1 f none /usr/local/include/php/main/win32_internal_function_disabled.h 0644 root root 1668 44341 1304491027 1 f none /usr/local/include/php/main/win95nt.h 0644 root root 2740 60424 1304491027 1 d none /usr/local/lib 0755 root root 1 d none /usr/local/lib/php 0755 root root 1 d none /usr/local/lib/php/.channels 0755 root root 1 d none /usr/local/lib/php/.channels/.alias 0755 root root 1 f none /usr/local/lib/php/.channels/.alias/pear.txt 0644 root root 12 1171 1304491027 1 f none /usr/local/lib/php/.channels/.alias/pecl.txt 0644 root root 12 1167 1304491027 1 f none /usr/local/lib/php/.channels/.alias/phpdocs.txt 0644 root root 11 1057 1304491027 1 f none /usr/local/lib/php/.channels/__uri.reg 0644 root root 293 22962 1304491027 1 f none /usr/local/lib/php/.channels/doc.php.net.reg 0644 root root 559 44535 1304491027 1 f none /usr/local/lib/php/.channels/pear.php.net.reg 0644 root root 578 46458 1304491027 1 f none /usr/local/lib/php/.channels/pecl.php.net.reg 0644 root root 581 46717 1304491027 1 f none /usr/local/lib/php/.depdb 0644 root root 2437 62643 1304491028 1 f none /usr/local/lib/php/.depdblock 0644 root root 0 0 1304491028 1 f none /usr/local/lib/php/.filemap 0644 root root 8267 62379 1304491028 1 f none /usr/local/lib/php/.lock 0644 root root 0 0 1304491028 1 d none /usr/local/lib/php/.registry 0755 root root 1 d none /usr/local/lib/php/.registry/.channel.__uri 0755 root root 1 d none /usr/local/lib/php/.registry/.channel.doc.php.net 0755 root root 1 d none /usr/local/lib/php/.registry/.channel.pecl.php.net 0755 root root 1 f none /usr/local/lib/php/.registry/archive_tar.reg 0644 root root 11030 34538 1304491027 1 f none /usr/local/lib/php/.registry/console_getopt.reg 0644 root root 6518 61629 1304491028 1 f none /usr/local/lib/php/.registry/pear.reg 0644 root root 83503 3489 1304491028 1 f none /usr/local/lib/php/.registry/structures_graph.reg 0644 root root 19658 10351 1304491028 1 f none /usr/local/lib/php/.registry/xml_util.reg 0644 root root 25333 46618 1304491028 1 d none /usr/local/lib/php/Archive 0755 root root 1 f none /usr/local/lib/php/Archive/Tar.php 0644 root root 64332 37024 1304491027 1 d none /usr/local/lib/php/Console 0755 root root 1 f none /usr/local/lib/php/Console/Getopt.php 0644 root root 13469 42627 1304491028 1 d none /usr/local/lib/php/OS 0755 root root 1 f none /usr/local/lib/php/OS/Guess.php 0644 root root 10652 64621 1304491028 1 d none /usr/local/lib/php/PEAR 0755 root root 1 f none /usr/local/lib/php/PEAR.php 0644 root root 33897 12973 1304491028 1 f none /usr/local/lib/php/PEAR/Autoloader.php 0644 root root 6565 43457 1304491028 1 f none /usr/local/lib/php/PEAR/Builder.php 0644 root root 16475 43422 1304491028 1 d none /usr/local/lib/php/PEAR/ChannelFile 0755 root root 1 f none /usr/local/lib/php/PEAR/ChannelFile.php 0644 root root 50923 47666 1304491028 1 f none /usr/local/lib/php/PEAR/ChannelFile/Parser.php 0644 root root 1778 3843 1304491028 1 d none /usr/local/lib/php/PEAR/Command 0755 root root 1 f none /usr/local/lib/php/PEAR/Command.php 0644 root root 12699 14229 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Auth.php 0644 root root 2654 13953 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Auth.xml 0644 root root 1228 45820 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Build.php 0644 root root 2347 42315 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Build.xml 0644 root root 260 22723 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Channels.php 0644 root root 33535 14258 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Channels.xml 0644 root root 4218 47577 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Common.php 0644 root root 8292 30379 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Config.php 0644 root root 15422 5850 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Config.xml 0644 root root 3382 41603 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Install.php 0644 root root 50838 57862 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Install.xml 0644 root root 8574 18185 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Mirror.php 0644 root root 4594 18123 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Mirror.xml 0644 root root 617 55020 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Package.php 0644 root root 40253 22519 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Package.xml 0644 root root 7222 25087 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Pickle.php 0644 root root 15982 35572 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Pickle.xml 0644 root root 1179 38432 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Registry.php 0644 root root 46350 646 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Registry.xml 0644 root root 1790 22068 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Remote.php 0644 root root 30070 41925 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Remote.xml 0644 root root 3311 26837 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Test.php 0644 root root 11958 57541 1304491028 1 f none /usr/local/lib/php/PEAR/Command/Test.xml 0644 root root 1641 7831 1304491028 1 f none /usr/local/lib/php/PEAR/Common.php 0644 root root 25773 61354 1304491028 1 f none /usr/local/lib/php/PEAR/Config.php 0644 root root 67882 64854 1304491028 1 f none /usr/local/lib/php/PEAR/Dependency2.php 0644 root root 50511 19089 1304491028 1 f none /usr/local/lib/php/PEAR/DependencyDB.php 0644 root root 24238 11233 1304491028 1 d none /usr/local/lib/php/PEAR/Downloader 0755 root root 1 f none /usr/local/lib/php/PEAR/Downloader.php 0644 root root 66575 40941 1304491028 1 f none /usr/local/lib/php/PEAR/Downloader/Package.php 0644 root root 76198 43539 1304491028 1 f none /usr/local/lib/php/PEAR/ErrorStack.php 0644 root root 33961 13896 1304491028 1 f none /usr/local/lib/php/PEAR/Exception.php 0644 root root 14006 61074 1304491028 1 f none /usr/local/lib/php/PEAR/FixPHP5PEARWarnings.php 0644 root root 153 11670 1304491028 1 d none /usr/local/lib/php/PEAR/Frontend 0755 root root 1 f none /usr/local/lib/php/PEAR/Frontend.php 0644 root root 6719 39624 1304491028 1 f none /usr/local/lib/php/PEAR/Frontend/CLI.php 0644 root root 25742 9245 1304491028 1 d none /usr/local/lib/php/PEAR/Installer 0755 root root 1 f none /usr/local/lib/php/PEAR/Installer.php 0644 root root 70863 36453 1304491028 1 d none /usr/local/lib/php/PEAR/Installer/Role 0755 root root 1 f none /usr/local/lib/php/PEAR/Installer/Role.php 0644 root root 7988 53230 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Cfg.php 0644 root root 4034 29149 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Cfg.xml 0644 root root 421 39111 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Common.php 0644 root root 6299 13627 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Data.php 0644 root root 851 789 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Data.xml 0644 root root 402 37127 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Doc.php 0644 root root 848 489 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Doc.xml 0644 root root 401 37027 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Ext.php 0644 root root 848 570 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Ext.xml 0644 root root 322 29582 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Php.php 0644 root root 848 543 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Php.xml 0644 root root 429 39902 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Script.php 0644 root root 857 1542 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Script.xml 0644 root root 432 40201 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Src.php 0644 root root 949 8114 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Src.xml 0644 root root 290 26283 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Test.php 0644 root root 851 903 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Test.xml 0644 root root 402 37165 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Www.php 0644 root root 844 310 1304491028 1 f none /usr/local/lib/php/PEAR/Installer/Role/Www.xml 0644 root root 420 39048 1304491028 1 d none /usr/local/lib/php/PEAR/PackageFile 0755 root root 1 f none /usr/local/lib/php/PEAR/PackageFile.php 0644 root root 15898 14049 1304491028 1 d none /usr/local/lib/php/PEAR/PackageFile/Generator 0755 root root 1 f none /usr/local/lib/php/PEAR/PackageFile/Generator/v1.php 0644 root root 50402 41492 1304491028 1 f none /usr/local/lib/php/PEAR/PackageFile/Generator/v2.php 0644 root root 33520 19614 1304491028 1 d none /usr/local/lib/php/PEAR/PackageFile/Parser 0755 root root 1 f none /usr/local/lib/php/PEAR/PackageFile/Parser/v1.php 0644 root root 16588 4895 1304491028 1 f none /usr/local/lib/php/PEAR/PackageFile/Parser/v2.php 0644 root root 3213 42113 1304491028 1 f none /usr/local/lib/php/PEAR/PackageFile/v1.php 0644 root root 51184 24041 1304491028 1 d none /usr/local/lib/php/PEAR/PackageFile/v2 0755 root root 1 f none /usr/local/lib/php/PEAR/PackageFile/v2.php 0644 root root 69502 58131 1304491028 1 f none /usr/local/lib/php/PEAR/PackageFile/v2/Validator.php 0644 root root 86121 31845 1304491028 1 f none /usr/local/lib/php/PEAR/PackageFile/v2/rw.php 0644 root root 63112 43712 1304491028 1 f none /usr/local/lib/php/PEAR/Packager.php 0644 root root 7785 18751 1304491028 1 d none /usr/local/lib/php/PEAR/REST 0755 root root 1 f none /usr/local/lib/php/PEAR/REST.php 0644 root root 16538 60662 1304491028 1 f none /usr/local/lib/php/PEAR/REST/10.php 0644 root root 32645 17676 1304491028 1 f none /usr/local/lib/php/PEAR/REST/11.php 0644 root root 11308 6671 1304491028 1 f none /usr/local/lib/php/PEAR/REST/13.php 0644 root root 11620 10650 1304491028 1 f none /usr/local/lib/php/PEAR/Registry.php 0644 root root 75860 40984 1304491028 1 f none /usr/local/lib/php/PEAR/RunTest.php 0644 root root 35962 45106 1304491028 1 d none /usr/local/lib/php/PEAR/Task 0755 root root 1 f none /usr/local/lib/php/PEAR/Task/Common.php 0644 root root 6110 13581 1304491028 1 d none /usr/local/lib/php/PEAR/Task/Postinstallscript 0755 root root 1 f none /usr/local/lib/php/PEAR/Task/Postinstallscript.php 0644 root root 14418 12622 1304491028 1 f none /usr/local/lib/php/PEAR/Task/Postinstallscript/rw.php 0644 root root 5833 46982 1304491028 1 d none /usr/local/lib/php/PEAR/Task/Replace 0755 root root 1 f none /usr/local/lib/php/PEAR/Task/Replace.php 0644 root root 6810 14052 1304491028 1 f none /usr/local/lib/php/PEAR/Task/Replace/rw.php 0644 root root 1613 57569 1304491028 1 d none /usr/local/lib/php/PEAR/Task/Unixeol 0755 root root 1 f none /usr/local/lib/php/PEAR/Task/Unixeol.php 0644 root root 2273 45896 1304491028 1 f none /usr/local/lib/php/PEAR/Task/Unixeol/rw.php 0644 root root 1373 38840 1304491028 1 d none /usr/local/lib/php/PEAR/Task/Windowseol 0755 root root 1 f none /usr/local/lib/php/PEAR/Task/Windowseol.php 0644 root root 2269 45798 1304491028 1 f none /usr/local/lib/php/PEAR/Task/Windowseol/rw.php 0644 root root 1394 41129 1304491028 1 f none /usr/local/lib/php/PEAR/Validate.php 0644 root root 22061 40427 1304491028 1 d none /usr/local/lib/php/PEAR/Validator 0755 root root 1 f none /usr/local/lib/php/PEAR/Validator/PECL.php 0644 root root 2173 32463 1304491028 1 f none /usr/local/lib/php/PEAR/XMLParser.php 0644 root root 7169 48316 1304491028 1 f none /usr/local/lib/php/PEAR5.php 0644 root root 1087 20603 1304491028 1 d none /usr/local/lib/php/Structures 0755 root root 1 d none /usr/local/lib/php/Structures/Graph 0755 root root 1 f none /usr/local/lib/php/Structures/Graph.php 0644 root root 5747 24959 1304491028 1 d none /usr/local/lib/php/Structures/Graph/Manipulator 0755 root root 1 f none /usr/local/lib/php/Structures/Graph/Manipulator/AcyclicTest.php 0644 root root 5744 30242 1304491028 1 f none /usr/local/lib/php/Structures/Graph/Manipulator/TopologicalSorter.php 0644 root root 6694 45862 1304491028 1 f none /usr/local/lib/php/Structures/Graph/Node.php 0644 root root 11048 30713 1304491028 1 f none /usr/local/lib/php/System.php 0644 root root 19967 62304 1304491028 1 d none /usr/local/lib/php/XML 0755 root root 1 f none /usr/local/lib/php/XML/Util.php 0644 root root 30440 53652 1304491028 1 d none /usr/local/lib/php/build 0755 root root 1 f none /usr/local/lib/php/build/Makefile.global 0644 root root 5498 22477 1304491021 1 f none /usr/local/lib/php/build/acinclude.m4 0644 root root 75979 1711 1304491021 1 f none /usr/local/lib/php/build/config.guess 0755 root root 44892 23949 1304491021 1 f none /usr/local/lib/php/build/config.sub 0755 root root 33387 42120 1304491021 1 f none /usr/local/lib/php/build/libtool.m4 0644 root root 230324 8547 1304491021 1 f none /usr/local/lib/php/build/ltmain.sh 0644 root root 199728 29169 1304491021 1 f none /usr/local/lib/php/build/mkdep.awk 0644 root root 2272 17033 1304491021 1 f none /usr/local/lib/php/build/phpize.m4 0644 root root 4639 35636 1304491021 1 f none /usr/local/lib/php/build/run-tests.php 0644 root root 69309 17938 1304491021 1 f none /usr/local/lib/php/build/scan_makefile_in.awk 0644 root root 410 29019 1304491021 1 f none /usr/local/lib/php/build/shtool 0755 root root 65467 40759 1304491021 1 d none /usr/local/lib/php/data 0755 root root 1 d none /usr/local/lib/php/data/PEAR 0755 root root 1 f none /usr/local/lib/php/data/PEAR/package.dtd 0644 root root 3391 37669 1304491028 1 f none /usr/local/lib/php/data/PEAR/template.spec 0644 root root 2005 41492 1304491028 1 d none /usr/local/lib/php/data/Structures_Graph 0755 root root 1 f none /usr/local/lib/php/data/Structures_Graph/LICENSE 0644 root root 26430 8501 1304491028 1 d none /usr/local/lib/php/doc 0755 root root 1 d none /usr/local/lib/php/doc/Archive_Tar 0755 root root 1 d none /usr/local/lib/php/doc/Archive_Tar/docs 0755 root root 1 f none /usr/local/lib/php/doc/Archive_Tar/docs/Archive_Tar.txt 0644 root root 18363 42700 1304491027 1 d none /usr/local/lib/php/doc/PEAR 0755 root root 1 f none /usr/local/lib/php/doc/PEAR/INSTALL 0644 root root 2217 63663 1304491028 1 f none /usr/local/lib/php/doc/PEAR/LICENSE 0644 root root 1477 50946 1304491028 1 f none /usr/local/lib/php/doc/PEAR/README 0644 root root 1189 36408 1304491028 1 d none /usr/local/lib/php/doc/Structures_Graph 0755 root root 1 d none /usr/local/lib/php/doc/Structures_Graph/docs 0755 root root 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/generate.sh 0644 root root 365 31831 1304491028 1 d none /usr/local/lib/php/doc/Structures_Graph/docs/html 0755 root root 1 d none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph 0755 root root 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/Structures_Graph.html 0644 root root 8891 56254 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html 0644 root root 3848 47398 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html 0644 root root 4193 14339 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/Structures_Graph_Node.html 0644 root root 20537 9343 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_Manipulator_AcyclicTest_php.html 0644 root root 3890 45143 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_Manipulator_TopologicalSorter_php.html 0644 root root 4437 26621 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_Node_php.html 0644 root root 3310 60002 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_php.html 0644 root root 4231 63225 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/tutorial_Structures_Graph.pkg.html 0644 root root 4678 15136 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/classtrees_Structures_Graph.html 0644 root root 1368 51677 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/elementindex.html 0644 root root 15623 63283 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/elementindex_Structures_Graph.html 0644 root root 15952 33295 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/errors.html 0644 root root 725 58228 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/index.html 0644 root root 1009 15383 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/li_Structures_Graph.html 0644 root root 2544 5567 1304491028 1 d none /usr/local/lib/php/doc/Structures_Graph/docs/html/media 0755 root root 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/media/banner.css 0644 root root 393 30727 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/media/stylesheet.css 0644 root root 4996 30326 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/packages.html 0644 root root 929 1827 1304491028 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/html/todolist.html 0644 root root 876 5677 1304491028 1 d none /usr/local/lib/php/doc/Structures_Graph/docs/tutorials 0755 root root 1 d none /usr/local/lib/php/doc/Structures_Graph/docs/tutorials/Structures_Graph 0755 root root 1 f none /usr/local/lib/php/doc/Structures_Graph/docs/tutorials/Structures_Graph/Structures_Graph.pkg 0644 root root 4044 26071 1304491028 1 d none /usr/local/lib/php/doc/XML_Util 0755 root root 1 d none /usr/local/lib/php/doc/XML_Util/examples 0755 root root 1 f none /usr/local/lib/php/doc/XML_Util/examples/example.php 0644 root root 9213 38187 1304491028 1 f none /usr/local/lib/php/doc/XML_Util/examples/example2.php 0644 root root 4897 48706 1304491028 1 f none /usr/local/lib/php/pearcmd.php 0644 root root 14436 3616 1304491028 1 f none /usr/local/lib/php/peclcmd.php 0644 root root 934 6486 1304491028 1 d none /usr/local/lib/php/test 0755 root root 1 d none /usr/local/lib/php/test/Structures_Graph 0755 root root 1 d none /usr/local/lib/php/test/Structures_Graph/tests 0755 root root 1 f none /usr/local/lib/php/test/Structures_Graph/tests/AllTests.php 0644 root root 3340 5242 1304491028 1 d none /usr/local/lib/php/test/Structures_Graph/tests/testCase 0755 root root 1 f none /usr/local/lib/php/test/Structures_Graph/tests/testCase/BasicGraph.php 0644 root root 9097 25804 1304491028 1 d none /usr/local/lib/php/test/XML_Util 0755 root root 1 d none /usr/local/lib/php/test/XML_Util/tests 0755 root root 1 f none /usr/local/lib/php/test/XML_Util/tests/AllTests.php 0644 root root 3632 23755 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_apiVersion.phpt 0644 root root 449 34704 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_attributesToString.phpt 0644 root root 3631 17955 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_collapseEmptyTags.phpt 0644 root root 1795 13118 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_createCDataSection.phpt 0644 root root 494 38676 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_createComment.phpt 0644 root root 471 36399 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_createEndElement.phpt 0644 root root 696 55132 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_createStartElement.phpt 0644 root root 3773 36699 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_createTag.phpt 0644 root root 5916 3444 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_createTagFromArray.phpt 0644 root root 9305 36544 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_getDocTypeDeclaration.phpt 0644 root root 1516 53150 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_getXmlDeclaration.phpt 0644 root root 1167 27570 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_isValidName.phpt 0644 root root 1410 45839 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_raiseError.phpt 0644 root root 502 38519 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_replaceEntities.phpt 0644 root root 3248 61763 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_reverseEntities.phpt 0644 root root 3233 58945 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBasic_splitQualifiedName.phpt 0644 root root 983 15045 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBug_4950.phpt 0644 root root 675 52660 1304491028 1 f none /usr/local/lib/php/test/XML_Util/tests/testBug_5392.phpt 0644 root root 1097 23405 1304491028 1 d none /usr/local/man 0755 root root 1 d none /usr/local/man/man1 0755 root root 1 f none /usr/local/man/man1/php-config.1 0644 root root 1679 8899 1304491027 1 f none /usr/local/man/man1/php.1 0644 root root 8708 65177 1304491020 1 f none /usr/local/man/man1/phpize.1 0644 root root 1015 17417 1304491027 1 d none /var ? ? ? 1 d none /var/opt ? ? ? 1 i checkinstall 790 2505 1304568702 1 i pkginfo 191 14904 1304568618 07070100180eed000041ed0000000000000000000000024dc2232a00000000000000b600010002ffffffffffffffff0000000800000000install07070100180eee000081ed0000000000000000000000014dc2237e00000316000000b600010002ffffffffffffffff0000001500000000install/checkinstall#!/bin/sh # expected_bits="64" expected_release="5.11" expected_platform="i386" # release=`uname -r` platform=`uname -p` bits=`isainfo -b` # if [ ${platform} != ${expected_platform} ]; then echo "\n\n\n\tThis package must be installed on a ${expected_platform} architecture\n" echo "\tAborting installation.\n\n\n" exit 1 fi if [ ${release} != ${expected_release} ]; then echo "\n\n\n\tThis package must be installed on a ${expected_release} machine\n" echo "\tAborting installation.\n\n\n" exit 1 fi #if [ ${bits} != ${expected_bits} ]; then # echo "\n\n\n\tThis package must be installed on a ${expected_bits} bit machine\n" # echo "\tYour machine is running a ${bits} bit O.S. currently\n" # echo "\tAborting installation.\n\n\n" # exit 1 #fi exit 0 07070100180ce0000041ed0000000000000000000000034dc2232a00000000000000b600010002ffffffffffffffff0000000500000000root07070100180ce1000041ed0000000000000000000000034dc2232a00000000000000b600010002ffffffffffffffff0000000900000000root/usr07070100180ce2000041ed0000000000000000000000074dc2232a00000000000000b600010002ffffffffffffffff0000000f00000000root/usr/local07070100180ced000041ed0000000000000000000000034dc2232a00000000000000b600010002ffffffffffffffff0000001700000000root/usr/local/include07070100180cee000041ed0000000000000000000000064dc2232a00000000000000b600010002ffffffffffffffff0000001b00000000root/usr/local/include/php07070100180dd4000041ed0000000000000000000000034dc2232a00000000000000b600010002ffffffffffffffff0000002000000000root/usr/local/include/php/main07070100180dd9000081a40000000000000000000000014dc0f41300002fe3000000b600010002ffffffffffffffff0000002600000000root/usr/local/include/php/main/php.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: php.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef PHP_H #define PHP_H #ifdef HAVE_DMALLOC #include #endif #define PHP_API_VERSION 20090626 #define PHP_HAVE_STREAMS #define YYDEBUG 0 #include "php_version.h" #include "zend.h" #include "zend_qsort.h" #include "php_compat.h" #include "zend_API.h" #undef sprintf #define sprintf php_sprintf /* PHP's DEBUG value must match Zend's ZEND_DEBUG value */ #undef PHP_DEBUG #define PHP_DEBUG ZEND_DEBUG #ifdef PHP_WIN32 # include "tsrm_win32.h" # include "win95nt.h" # ifdef PHP_EXPORTS # define PHPAPI __declspec(dllexport) # else # define PHPAPI __declspec(dllimport) # endif # define PHP_DIR_SEPARATOR '\\' # define PHP_EOL "\r\n" #else # if defined(__GNUC__) && __GNUC__ >= 4 # define PHPAPI __attribute__ ((visibility("default"))) # else # define PHPAPI # endif #define THREAD_LS #define PHP_DIR_SEPARATOR '/' #if defined(__MacOSX__) #define PHP_EOL "\r" #else #define PHP_EOL "\n" #endif #endif #ifdef NETWARE /* For php_get_uname() function */ #define PHP_UNAME "NetWare" #define PHP_OS PHP_UNAME #endif #if HAVE_ASSERT_H #if PHP_DEBUG #undef NDEBUG #else #ifndef NDEBUG #define NDEBUG #endif #endif #include #else /* HAVE_ASSERT_H */ #define assert(expr) ((void) (0)) #endif /* HAVE_ASSERT_H */ #define APACHE 0 #if HAVE_UNIX_H #include #endif #if HAVE_ALLOCA_H #include #endif #if HAVE_BUILD_DEFS_H #include #endif /* * This is a fast version of strlcpy which should be used, if you * know the size of the destination buffer and if you know * the length of the source string. * * size is the allocated number of bytes of dst * src_size is the number of bytes excluding the NUL of src */ #define PHP_STRLCPY(dst, src, size, src_size) \ { \ size_t php_str_len; \ \ if (src_size >= size) \ php_str_len = size - 1; \ else \ php_str_len = src_size; \ memcpy(dst, src, php_str_len); \ dst[php_str_len] = '\0'; \ } #ifndef HAVE_STRLCPY BEGIN_EXTERN_C() PHPAPI size_t php_strlcpy(char *dst, const char *src, size_t siz); END_EXTERN_C() #undef strlcpy #define strlcpy php_strlcpy #endif #ifndef HAVE_STRLCAT BEGIN_EXTERN_C() PHPAPI size_t php_strlcat(char *dst, const char *src, size_t siz); END_EXTERN_C() #undef strlcat #define strlcat php_strlcat #endif #ifndef HAVE_STRTOK_R BEGIN_EXTERN_C() char *strtok_r(char *s, const char *delim, char **last); END_EXTERN_C() #endif #ifndef HAVE_SOCKLEN_T typedef unsigned int socklen_t; #endif #define CREATE_MUTEX(a, b) #define SET_MUTEX(a) #define FREE_MUTEX(a) /* * Then the ODBC support can use both iodbc and Solid, * uncomment this. * #define HAVE_ODBC (HAVE_IODBC|HAVE_SOLID) */ #include #include #if HAVE_UNISTD_H #include #endif #if HAVE_STDARG_H #include #else # if HAVE_SYS_VARARGS_H # include # endif #endif #ifndef va_copy # ifdef __va_copy # define va_copy(ap1, ap2) __va_copy((ap1), (ap2)) # else # define va_copy(ap1, ap2) memcpy((&ap1), (&ap2), sizeof(va_list)) # endif #endif #include "zend_hash.h" #include "php3_compat.h" #include "zend_alloc.h" #include "zend_stack.h" #if STDC_HEADERS # include #else # ifndef HAVE_MEMCPY # define memcpy(d, s, n) bcopy((s), (d), (n)) # endif # ifndef HAVE_MEMMOVE # define memmove(d, s, n) bcopy ((s), (d), (n)) # endif #endif #include "safe_mode.h" #ifndef HAVE_STRERROR char *strerror(int); #endif #if HAVE_PWD_H # ifdef PHP_WIN32 #include "win32/param.h" # else #include #include # endif #endif #if HAVE_LIMITS_H #include #endif #ifndef LONG_MAX #define LONG_MAX 2147483647L #endif #ifndef LONG_MIN #define LONG_MIN (- LONG_MAX - 1) #endif #ifndef INT_MAX #define INT_MAX 2147483647 #endif #ifndef INT_MIN #define INT_MIN (- INT_MAX - 1) #endif #define PHP_GCC_VERSION ZEND_GCC_VERSION #define PHP_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_MALLOC #define PHP_ATTRIBUTE_FORMAT ZEND_ATTRIBUTE_FORMAT BEGIN_EXTERN_C() #include "snprintf.h" END_EXTERN_C() #include "spprintf.h" #define EXEC_INPUT_BUF 4096 #define PHP_MIME_TYPE "application/x-httpd-php" /* macros */ #define STR_PRINT(str) ((str)?(str):"") #ifndef MAXPATHLEN # ifdef PATH_MAX # define MAXPATHLEN PATH_MAX # elif defined(MAX_PATH) # define MAXPATHLEN MAX_PATH # else # define MAXPATHLEN 256 /* Should be safe for any weird systems that do not define it */ # endif #endif /* global variables */ #if !defined(PHP_WIN32) #define PHP_SLEEP_NON_VOID #define php_sleep sleep extern char **environ; #endif /* !defined(PHP_WIN32) */ #ifdef PHP_PWRITE_64 ssize_t pwrite(int, void *, size_t, off64_t); #endif #ifdef PHP_PREAD_64 ssize_t pread(int, void *, size_t, off64_t); #endif BEGIN_EXTERN_C() void phperror(char *error); PHPAPI int php_write(void *buf, uint size TSRMLS_DC); PHPAPI int php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); PHPAPI void php_log_err(char *log_message TSRMLS_DC); int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); int cfgparse(void); END_EXTERN_C() #define php_error zend_error #define error_handling_t zend_error_handling_t BEGIN_EXTERN_C() static inline ZEND_ATTRIBUTE_DEPRECATED void php_set_error_handling(error_handling_t error_handling, zend_class_entry *exception_class TSRMLS_DC) { zend_replace_error_handling(error_handling, exception_class, NULL TSRMLS_CC); } static inline ZEND_ATTRIBUTE_DEPRECATED void php_std_error_handling() {} PHPAPI void php_verror(const char *docref, const char *params, int type, const char *format, va_list args TSRMLS_DC) PHP_ATTRIBUTE_FORMAT(printf, 4, 0); #ifdef ZTS #define PHP_ATTR_FMT_OFFSET 1 #else #define PHP_ATTR_FMT_OFFSET 0 #endif /* PHPAPI void php_error(int type, const char *format, ...); */ PHPAPI void php_error_docref0(const char *docref TSRMLS_DC, int type, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 3, PHP_ATTR_FMT_OFFSET + 4); PHPAPI void php_error_docref1(const char *docref TSRMLS_DC, const char *param1, int type, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 4, PHP_ATTR_FMT_OFFSET + 5); PHPAPI void php_error_docref2(const char *docref TSRMLS_DC, const char *param1, const char *param2, int type, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, PHP_ATTR_FMT_OFFSET + 5, PHP_ATTR_FMT_OFFSET + 6); #ifdef PHP_WIN32 PHPAPI void php_win32_docref2_from_error(DWORD error, const char *param1, const char *param2 TSRMLS_DC); #endif END_EXTERN_C() #define php_error_docref php_error_docref0 #define zenderror phperror #define zendlex phplex #define phpparse zendparse #define phprestart zendrestart #define phpin zendin #define php_memnstr zend_memnstr /* functions */ BEGIN_EXTERN_C() PHPAPI extern int (*php_register_internal_extensions_func)(TSRMLS_D); PHPAPI int php_register_internal_extensions(TSRMLS_D); PHPAPI int php_mergesort(void *base, size_t nmemb, register size_t size, int (*cmp)(const void *, const void * TSRMLS_DC) TSRMLS_DC); PHPAPI void php_register_pre_request_shutdown(void (*func)(void *), void *userdata); PHPAPI void php_com_initialize(TSRMLS_D); END_EXTERN_C() /* PHP-named Zend macro wrappers */ #define PHP_FN ZEND_FN #define PHP_MN ZEND_MN #define PHP_NAMED_FUNCTION ZEND_NAMED_FUNCTION #define PHP_FUNCTION ZEND_FUNCTION #define PHP_METHOD ZEND_METHOD #define PHP_RAW_NAMED_FE ZEND_RAW_NAMED_FE #define PHP_NAMED_FE ZEND_NAMED_FE #define PHP_FE ZEND_FE #define PHP_DEP_FE ZEND_DEP_FE #define PHP_FALIAS ZEND_FALIAS #define PHP_DEP_FALIAS ZEND_DEP_FALIAS #define PHP_ME ZEND_ME #define PHP_MALIAS ZEND_MALIAS #define PHP_ABSTRACT_ME ZEND_ABSTRACT_ME #define PHP_ME_MAPPING ZEND_ME_MAPPING #define PHP_MODULE_STARTUP_N ZEND_MODULE_STARTUP_N #define PHP_MODULE_SHUTDOWN_N ZEND_MODULE_SHUTDOWN_N #define PHP_MODULE_ACTIVATE_N ZEND_MODULE_ACTIVATE_N #define PHP_MODULE_DEACTIVATE_N ZEND_MODULE_DEACTIVATE_N #define PHP_MODULE_INFO_N ZEND_MODULE_INFO_N #define PHP_MODULE_STARTUP_D ZEND_MODULE_STARTUP_D #define PHP_MODULE_SHUTDOWN_D ZEND_MODULE_SHUTDOWN_D #define PHP_MODULE_ACTIVATE_D ZEND_MODULE_ACTIVATE_D #define PHP_MODULE_DEACTIVATE_D ZEND_MODULE_DEACTIVATE_D #define PHP_MODULE_INFO_D ZEND_MODULE_INFO_D /* Compatibility macros */ #define PHP_MINIT ZEND_MODULE_STARTUP_N #define PHP_MSHUTDOWN ZEND_MODULE_SHUTDOWN_N #define PHP_RINIT ZEND_MODULE_ACTIVATE_N #define PHP_RSHUTDOWN ZEND_MODULE_DEACTIVATE_N #define PHP_MINFO ZEND_MODULE_INFO_N #define PHP_GINIT ZEND_GINIT #define PHP_GSHUTDOWN ZEND_GSHUTDOWN #define PHP_MINIT_FUNCTION ZEND_MODULE_STARTUP_D #define PHP_MSHUTDOWN_FUNCTION ZEND_MODULE_SHUTDOWN_D #define PHP_RINIT_FUNCTION ZEND_MODULE_ACTIVATE_D #define PHP_RSHUTDOWN_FUNCTION ZEND_MODULE_DEACTIVATE_D #define PHP_MINFO_FUNCTION ZEND_MODULE_INFO_D #define PHP_GINIT_FUNCTION ZEND_GINIT_FUNCTION #define PHP_GSHUTDOWN_FUNCTION ZEND_GSHUTDOWN_FUNCTION #define PHP_MODULE_GLOBALS ZEND_MODULE_GLOBALS /* Output support */ #include "main/php_output.h" #define PHPWRITE(str, str_len) php_body_write((str), (str_len) TSRMLS_CC) #define PUTS(str) do { \ const char *__str = (str); \ php_body_write(__str, strlen(__str) TSRMLS_CC); \ } while (0) #define PUTC(c) (php_body_write(&(c), 1 TSRMLS_CC), (c)) #define PHPWRITE_H(str, str_len) php_header_write((str), (str_len) TSRMLS_CC) #define PUTS_H(str) do { \ const char *__str = (str); \ php_header_write(__str, strlen(__str) TSRMLS_CC); \ } while (0) #define PUTC_H(c) (php_header_write(&(c), 1 TSRMLS_CC), (c)) #include "php_streams.h" #include "php_memory_streams.h" #include "fopen_wrappers.h" /* Virtual current working directory support */ #include "tsrm_virtual_cwd.h" #include "zend_constants.h" /* connection status states */ #define PHP_CONNECTION_NORMAL 0 #define PHP_CONNECTION_ABORTED 1 #define PHP_CONNECTION_TIMEOUT 2 #include "php_reentrancy.h" /* Finding offsets of elements within structures. * Taken from the Apache code, which in turn, was taken from X code... */ #ifndef XtOffset #if defined(CRAY) || (defined(__arm) && !(defined(LINUX) || defined(__riscos__))) #ifdef __STDC__ #define XtOffset(p_type, field) _Offsetof(p_type, field) #else #ifdef CRAY2 #define XtOffset(p_type, field) \ (sizeof(int)*((unsigned int)&(((p_type)NULL)->field))) #else /* !CRAY2 */ #define XtOffset(p_type, field) ((unsigned int)&(((p_type)NULL)->field)) #endif /* !CRAY2 */ #endif /* __STDC__ */ #else /* ! (CRAY || __arm) */ #define XtOffset(p_type, field) \ ((long) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL))) #endif /* !CRAY */ #endif /* ! XtOffset */ #ifndef XtOffsetOf #ifdef offsetof #define XtOffsetOf(s_type, field) offsetof(s_type, field) #else #define XtOffsetOf(s_type, field) XtOffset(s_type*, field) #endif #endif /* !XtOffsetOf */ #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: sw=4 ts=4 fdm=marker * vim<600: sw=4 ts=4 */ 07070100180dd7000081a40000000000000000000000014dc0f41300000a97000000b600010002ffffffffffffffff0000003100000000root/usr/local/include/php/main/fopen_wrappers.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Jim Winstead | +----------------------------------------------------------------------+ */ /* $Id: fopen_wrappers.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef FOPEN_WRAPPERS_H #define FOPEN_WRAPPERS_H BEGIN_EXTERN_C() #include "php_globals.h" #include "php_ini.h" PHPAPI int php_fopen_primary_script(zend_file_handle *file_handle TSRMLS_DC); PHPAPI char *expand_filepath(const char *filepath, char *real_path TSRMLS_DC); PHPAPI char *expand_filepath_ex(const char *filepath, char *real_path, const char *relative_to, size_t relative_to_len TSRMLS_DC); PHPAPI int php_check_open_basedir(const char *path TSRMLS_DC); PHPAPI int php_check_open_basedir_ex(const char *path, int warn TSRMLS_DC); PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path TSRMLS_DC); /* {{{ OPENBASEDIR_CHECKPATH(filename) to ease merge between 6.x and 5.x */ #if (PHP_MAJOR_VERSION < 6) # define OPENBASEDIR_CHECKPATH(filename) \ (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(filename TSRMLS_CC) #else #define OPENBASEDIR_CHECKPATH(filename) \ php_check_open_basedir(filename TSRMLS_CC) #endif /* }}} */ PHPAPI int php_check_safe_mode_include_dir(const char *path TSRMLS_DC); PHPAPI char *php_resolve_path(const char *filename, int filename_len, const char *path TSRMLS_DC); PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const char *path, char **opened_path TSRMLS_DC); PHPAPI char *php_strip_url_passwd(char *path); PHPAPI ZEND_INI_MH(OnUpdateBaseDir); END_EXTERN_C() #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: */ 07070100180de7000081a40000000000000000000000014dc0f4130000129b000000b600010002ffffffffffffffff0000002d00000000root/usr/local/include/php/main/php_output.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: php_output.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef PHP_OUTPUT_H #define PHP_OUTPUT_H typedef void (*php_output_handler_func_t)(char *output, uint output_len, char **handled_output, uint *handled_output_len, int mode TSRMLS_DC); BEGIN_EXTERN_C() PHPAPI void php_output_startup(void); PHPAPI void php_output_activate(TSRMLS_D); PHPAPI void php_output_set_status(zend_bool status TSRMLS_DC); PHPAPI void php_output_register_constants(TSRMLS_D); PHPAPI int php_default_output_func(const char *str, uint str_len TSRMLS_DC); PHPAPI int php_ub_body_write(const char *str, uint str_length TSRMLS_DC); PHPAPI int php_ub_body_write_no_header(const char *str, uint str_length TSRMLS_DC); PHPAPI int php_body_write(const char *str, uint str_length TSRMLS_DC); PHPAPI int php_header_write(const char *str, uint str_length TSRMLS_DC); PHPAPI int php_start_ob_buffer(zval *output_handler, uint chunk_size, zend_bool erase TSRMLS_DC); PHPAPI int php_start_ob_buffer_named(const char *output_handler_name, uint chunk_size, zend_bool erase TSRMLS_DC); PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush TSRMLS_DC); PHPAPI void php_end_ob_buffers(zend_bool send_buffer TSRMLS_DC); PHPAPI int php_ob_get_buffer(zval *p TSRMLS_DC); PHPAPI int php_ob_get_length(zval *p TSRMLS_DC); PHPAPI void php_start_implicit_flush(TSRMLS_D); PHPAPI void php_end_implicit_flush(TSRMLS_D); PHPAPI char *php_get_output_start_filename(TSRMLS_D); PHPAPI int php_get_output_start_lineno(TSRMLS_D); PHPAPI void php_ob_set_internal_handler(php_output_handler_func_t internal_output_handler, uint buffer_size, char *handler_name, zend_bool erase TSRMLS_DC); PHPAPI int php_ob_handler_used(char *handler_name TSRMLS_DC); PHPAPI int php_ob_init_conflict(char *handler_new, char *handler_set TSRMLS_DC); PHPAPI int php_ob_get_buffer(zval *p TSRMLS_DC); PHPAPI int php_ob_get_length(zval *p TSRMLS_DC); END_EXTERN_C() PHP_FUNCTION(ob_start); PHP_FUNCTION(ob_flush); PHP_FUNCTION(ob_clean); PHP_FUNCTION(ob_end_flush); PHP_FUNCTION(ob_end_clean); PHP_FUNCTION(ob_get_flush); PHP_FUNCTION(ob_get_clean); PHP_FUNCTION(ob_get_contents); PHP_FUNCTION(ob_get_length); PHP_FUNCTION(ob_get_level); PHP_FUNCTION(ob_get_status); PHP_FUNCTION(ob_implicit_flush); PHP_FUNCTION(ob_list_handlers); typedef struct _php_ob_buffer { char *buffer; uint size; uint text_length; int block_size; uint chunk_size; int status; zval *output_handler; php_output_handler_func_t internal_output_handler; char *internal_output_handler_buffer; uint internal_output_handler_buffer_size; char *handler_name; zend_bool erase; } php_ob_buffer; typedef struct _php_output_globals { int (*php_body_write)(const char *str, uint str_length TSRMLS_DC); /* string output */ int (*php_header_write)(const char *str, uint str_length TSRMLS_DC); /* unbuffer string output */ php_ob_buffer active_ob_buffer; unsigned char implicit_flush; char *output_start_filename; int output_start_lineno; zend_stack ob_buffers; int ob_nesting_level; zend_bool ob_lock; zend_bool disable_output; } php_output_globals; #ifdef ZTS #define OG(v) TSRMG(output_globals_id, php_output_globals *, v) ZEND_API extern int output_globals_id; #else #define OG(v) (output_globals.v) ZEND_API extern php_output_globals output_globals; #endif #define PHP_OUTPUT_HANDLER_START (1<<0) #define PHP_OUTPUT_HANDLER_CONT (1<<1) #define PHP_OUTPUT_HANDLER_END (1<<2) #define PHP_OUTPUT_HANDLER_INTERNAL 0 #define PHP_OUTPUT_HANDLER_USER 1 PHP_FUNCTION(output_add_rewrite_var); PHP_FUNCTION(output_reset_rewrite_vars); #endif /* PHP_OUTPUT_H */ 07070100180de8000081a40000000000000000000000014dc0f41300000ea1000000b600010002ffffffffffffffff0000003100000000root/usr/local/include/php/main/php_reentrancy.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Sascha Schumann | +----------------------------------------------------------------------+ */ /* $Id: php_reentrancy.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef PHP_REENTRANCY_H #define PHP_REENTRANCY_H #include "php.h" #include #ifdef HAVE_DIRENT_H #include #endif #include /* currently, PHP does not check for these functions, but assumes that they are available on all systems. */ #define HAVE_LOCALTIME 1 #define HAVE_GMTIME 1 #define HAVE_ASCTIME 1 #define HAVE_CTIME 1 #if defined(PHP_IRIX_TIME_R) #undef HAVE_ASCTIME_R #undef HAVE_CTIME_R #endif #if defined(PHP_HPUX_TIME_R) #undef HAVE_LOCALTIME_R #undef HAVE_ASCTIME_R #undef HAVE_CTIME_R #undef HAVE_GMTIME_R #endif BEGIN_EXTERN_C() #if defined(HAVE_POSIX_READDIR_R) #define php_readdir_r readdir_r #else PHPAPI int php_readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result); #endif #if !defined(HAVE_LOCALTIME_R) && defined(HAVE_LOCALTIME) #define PHP_NEED_REENTRANCY 1 PHPAPI struct tm *php_localtime_r(const time_t *const timep, struct tm *p_tm); #else #define php_localtime_r localtime_r #ifdef MISSING_LOCALTIME_R_DECL struct tm *localtime_r(const time_t *const timep, struct tm *p_tm); #endif #endif #if !defined(HAVE_CTIME_R) && defined(HAVE_CTIME) #define PHP_NEED_REENTRANCY 1 PHPAPI char *php_ctime_r(const time_t *clock, char *buf); #else #define php_ctime_r ctime_r #ifdef MISSING_CTIME_R_DECL char *ctime_r(const time_t *clock, char *buf); #endif #endif #if !defined(HAVE_ASCTIME_R) && defined(HAVE_ASCTIME) #define PHP_NEED_REENTRANCY 1 PHPAPI char *php_asctime_r(const struct tm *tm, char *buf); #else #define php_asctime_r asctime_r #ifdef MISSING_ASCTIME_R_DECL char *asctime_r(const struct tm *tm, char *buf); #endif #endif #if !defined(HAVE_GMTIME_R) && defined(HAVE_GMTIME) || defined(__BEOS__) #define PHP_NEED_REENTRANCY 1 PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm); #else #define php_gmtime_r gmtime_r #ifdef MISSING_GMTIME_R_DECL struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm); #endif #endif #if !defined(HAVE_STRTOK_R) PHPAPI char *php_strtok_r(char *s, const char *delim, char **last); #else #define php_strtok_r strtok_r #ifdef MISSING_STRTOK_R_DECL char *strtok_r(char *s, const char *delim, char **last); #endif #endif #if !defined(HAVE_RAND_R) PHPAPI int php_rand_r(unsigned int *seed); #else #define php_rand_r rand_r #endif END_EXTERN_C() #if !defined(ZTS) #undef PHP_NEED_REENTRANCY #endif #if defined(PHP_NEED_REENTRANCY) void reentrancy_startup(void); void reentrancy_shutdown(void); #else #define reentrancy_startup() #define reentrancy_shutdown() #endif #endif 07070100180dda000081a40000000000000000000000014dc0f41300001205000000b600010002ffffffffffffffff0000002e00000000root/usr/local/include/php/main/php3_compat.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: | +----------------------------------------------------------------------+ */ /* $Id: php3_compat.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef PHP3_COMPAT_H #define PHP3_COMPAT_H typedef zval pval; #define pval_copy_constructor zval_copy_ctor #define pval_destructor zval_dtor #define _php3_hash_init zend_hash_init #define _php3_hash_destroy zend_hash_destroy #define _php3_hash_clean zend_hash_clean #define _php3_hash_add_or_update zend_hash_add_or_update #define _php3_hash_add zend_hash_add #define _php3_hash_update zend_hash_update #define _php3_hash_quick_add_or_update zend_hash_quick_add_or_update #define _php3_hash_quick_add zend_hash_quick_add #define _php3_hash_quick_update zend_hash_quick_update #define _php3_hash_index_update_or_next_insert zend_hash_index_update_or_next_insert #define _php3_hash_index_update zend_hash_index_update #define _php3_hash_next_index_insert zend_hash_next_index_insert #define _php3_hash_pointer_update zend_hash_pointer_update #define _php3_hash_pointer_index_update_or_next_insert zend_hash_pointer_index_update_or_next_insert #define _php3_hash_pointer_index_update zend_hash_pointer_index_update #define _php3_hash_next_index_pointer_update zend_hash_next_index_pointer_update #define _php3_hash_next_index_pointer_insert zend_hash_next_index_pointer_insert #define _php3_hash_del_key_or_index zend_hash_del_key_or_index #define _php3_hash_del zend_hash_del #define _php3_hash_index_del zend_hash_index_del #define _php3_hash_find zend_hash_find #define _php3_hash_quick_find zend_hash_quick_find #define _php3_hash_index_find zend_hash_index_find #define _php3_hash_exists zend_hash_exists #define _php3_hash_index_exists zend_hash_index_exists #define _php3_hash_is_pointer zend_hash_is_pointer #define _php3_hash_index_is_pointer zend_hash_index_is_pointer #define _php3_hash_next_free_element zend_hash_next_free_element #define _php3_hash_move_forward zend_hash_move_forward #define _php3_hash_move_backwards zend_hash_move_backwards #define _php3_hash_get_current_key zend_hash_get_current_key #define _php3_hash_get_current_data zend_hash_get_current_data #define _php3_hash_internal_pointer_reset zend_hash_internal_pointer_reset #define _php3_hash_internal_pointer_end zend_hash_internal_pointer_end #define _php3_hash_copy zend_hash_copy #define _php3_hash_merge zend_hash_merge #define _php3_hash_sort zend_hash_sort #define _php3_hash_minmax zend_hash_minmax #define _php3_hash_num_elements zend_hash_num_elements #define _php3_hash_apply zend_hash_apply #define _php3_hash_apply_with_argument zend_hash_apply_with_argument #define php3_error php_error #define php3_printf php_printf #define _php3_sprintf php_sprintf #define php3_module_entry zend_module_entry #define php3_strndup zend_strndup #define php3_str_tolower zend_str_tolower #define php3_binary_strcmp zend_binary_strcmp #define php3_list_insert zend_list_insert #define php3_list_find zend_list_find #define php3_list_delete zend_list_delete #define php3_plist_insert zend_plist_insert #define php3_plist_find zend_plist_find #define php3_plist_delete zend_plist_delete #define zend_print_pval zend_print_zval #define zend_print_pval_r zend_print_zval_r #define function_entry zend_function_entry #define _php3_addslashes php_addslashes #define _php3_stripslashes php_stripslashes #define php3_dl php_dl #define getParameters zend_get_parameters #define getParametersArray zend_get_parameters_array #define list_entry zend_rsrc_list_entry #endif /* PHP3_COMPAT_H */ 07070100180df3000041ed0000000000000000000000024dc2232a00000000000000b600010002ffffffffffffffff0000002800000000root/usr/local/include/php/main/streams07070100180df9000081a40000000000000000000000014dc0f41300000f02000000b600010002ffffffffffffffff0000004300000000root/usr/local/include/php/main/streams/php_stream_plain_wrapper.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Wez Furlong | +----------------------------------------------------------------------+ */ /* $Id: php_stream_plain_wrapper.h 306939 2011-01-01 02:19:59Z felipe $ */ /* definitions for the plain files wrapper */ /* operations for a plain file; use the php_stream_fopen_XXX funcs below */ PHPAPI extern php_stream_ops php_stream_stdio_ops; PHPAPI extern php_stream_wrapper php_plain_files_wrapper; BEGIN_EXTERN_C() /* like fopen, but returns a stream */ PHPAPI php_stream *_php_stream_fopen(const char *filename, const char *mode, char **opened_path, int options STREAMS_DC TSRMLS_DC); #define php_stream_fopen(filename, mode, opened) _php_stream_fopen((filename), (mode), (opened), 0 STREAMS_CC TSRMLS_CC) PHPAPI php_stream *_php_stream_fopen_with_path(char *filename, char *mode, char *path, char **opened_path, int options STREAMS_DC TSRMLS_DC); #define php_stream_fopen_with_path(filename, mode, path, opened) _php_stream_fopen_with_path((filename), (mode), (path), (opened) STREAMS_CC TSRMLS_CC) PHPAPI php_stream *_php_stream_fopen_from_file(FILE *file, const char *mode STREAMS_DC TSRMLS_DC); #define php_stream_fopen_from_file(file, mode) _php_stream_fopen_from_file((file), (mode) STREAMS_CC TSRMLS_CC) PHPAPI php_stream *_php_stream_fopen_from_fd(int fd, const char *mode, const char *persistent_id STREAMS_DC TSRMLS_DC); #define php_stream_fopen_from_fd(fd, mode, persistent_id) _php_stream_fopen_from_fd((fd), (mode), (persistent_id) STREAMS_CC TSRMLS_CC) PHPAPI php_stream *_php_stream_fopen_from_pipe(FILE *file, const char *mode STREAMS_DC TSRMLS_DC); #define php_stream_fopen_from_pipe(file, mode) _php_stream_fopen_from_pipe((file), (mode) STREAMS_CC TSRMLS_CC) PHPAPI php_stream *_php_stream_fopen_tmpfile(int dummy STREAMS_DC TSRMLS_DC); #define php_stream_fopen_tmpfile() _php_stream_fopen_tmpfile(0 STREAMS_CC TSRMLS_CC) PHPAPI php_stream *_php_stream_fopen_temporary_file(const char *dir, const char *pfx, char **opened_path STREAMS_DC TSRMLS_DC); #define php_stream_fopen_temporary_file(dir, pfx, opened_path) _php_stream_fopen_temporary_file((dir), (pfx), (opened_path) STREAMS_CC TSRMLS_CC) /* This is a utility API for extensions that are opening a stream, converting it * to a FILE* and then closing it again. Be warned that fileno() on the result * will most likely fail on systems with fopencookie. */ PHPAPI FILE * _php_stream_open_wrapper_as_file(char * path, char * mode, int options, char **opened_path STREAMS_DC TSRMLS_DC); #define php_stream_open_wrapper_as_file(path, mode, options, opened_path) _php_stream_open_wrapper_as_file((path), (mode), (options), (opened_path) STREAMS_CC TSRMLS_CC) END_EXTERN_C() /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: sw=4 ts=4 fdm=marker * vim<600: sw=4 ts=4 */ 07070100180dfc000081a40000000000000000000000014dc0f41300000c0f000000b600010002ffffffffffffffff0000003a00000000root/usr/local/include/php/main/streams/php_streams_int.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Wez Furlong | +----------------------------------------------------------------------+ */ /* $Id: php_streams_int.h 306939 2011-01-01 02:19:59Z felipe $ */ #if ZEND_DEBUG #define emalloc_rel_orig(size) \ ( __php_stream_call_depth == 0 \ ? _emalloc((size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_RELAY_CC) \ : _emalloc((size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC) ) #define erealloc_rel_orig(ptr, size) \ ( __php_stream_call_depth == 0 \ ? _erealloc((ptr), (size), 0 ZEND_FILE_LINE_CC ZEND_FILE_LINE_RELAY_CC) \ : _erealloc((ptr), (size), 0 ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC) ) #define pemalloc_rel_orig(size, persistent) ((persistent) ? malloc((size)) : emalloc_rel_orig((size))) #define perealloc_rel_orig(ptr, size, persistent) ((persistent) ? realloc((ptr), (size)) : erealloc_rel_orig((ptr), (size))) #else # define pemalloc_rel_orig(size, persistent) pemalloc((size), (persistent)) # define perealloc_rel_orig(ptr, size, persistent) perealloc((ptr), (size), (persistent)) # define emalloc_rel_orig(size) emalloc((size)) #endif #define STREAM_DEBUG 0 #define STREAM_WRAPPER_PLAIN_FILES ((php_stream_wrapper*)-1) #ifndef MAP_FAILED #define MAP_FAILED ((void *) -1) #endif #define CHUNK_SIZE 8192 #ifdef PHP_WIN32 # ifdef EWOULDBLOCK # undef EWOULDBLOCK # endif # define EWOULDBLOCK WSAEWOULDBLOCK #endif #ifndef S_ISREG #define S_ISREG(mode) (((mode)&S_IFMT) == S_IFREG) #endif /* This functions transforms the first char to 'w' if it's not 'r', 'a' or 'w' * and strips any subsequent chars except '+' and 'b'. * Use this to sanitize stream->mode if you call e.g. fdopen, fopencookie or * any other function that expects standard modes and you allow non-standard * ones. result should be a char[5]. */ void php_stream_mode_sanitize_fdopen_fopencookie(php_stream *stream, char *result); void php_stream_tidy_wrapper_error_log(php_stream_wrapper *wrapper TSRMLS_DC); void php_stream_display_wrapper_errors(php_stream_wrapper *wrapper, const char *path, const char *caption TSRMLS_DC); 07070100180df7000081a40000000000000000000000014dc0f41300000ded000000b600010002ffffffffffffffff0000003a00000000root/usr/local/include/php/main/streams/php_stream_mmap.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Wez Furlong | +----------------------------------------------------------------------+ */ /* $Id: php_stream_mmap.h 306939 2011-01-01 02:19:59Z felipe $ */ /* Memory Mapping interface for streams. * The intention is to provide a uniform interface over the most common * operations that are used within PHP itself, rather than a complete * API for all memory mapping needs. * * ATM, we support only mmap(), but win32 memory mapping support will * follow soon. * */ typedef enum { /* Does the stream support mmap ? */ PHP_STREAM_MMAP_SUPPORTED, /* Request a range and offset to be mapped; * while mapped, you MUST NOT use any read/write functions * on the stream (win9x compatibility) */ PHP_STREAM_MMAP_MAP_RANGE, /* Unmap the last range that was mapped for the stream */ PHP_STREAM_MMAP_UNMAP } php_stream_mmap_operation_t; typedef enum { PHP_STREAM_MAP_MODE_READONLY, PHP_STREAM_MAP_MODE_READWRITE, PHP_STREAM_MAP_MODE_SHARED_READONLY, PHP_STREAM_MAP_MODE_SHARED_READWRITE } php_stream_mmap_access_t; typedef struct { /* requested offset and length. * If length is 0, the whole file is mapped */ size_t offset; size_t length; php_stream_mmap_access_t mode; /* returned mapped address */ char *mapped; } php_stream_mmap_range; #define PHP_STREAM_MMAP_ALL 0 #define php_stream_mmap_supported(stream) (_php_stream_set_option((stream), PHP_STREAM_OPTION_MMAP_API, PHP_STREAM_MMAP_SUPPORTED, NULL TSRMLS_CC) == 0 ? 1 : 0) /* Returns 1 if the stream in its current state can be memory mapped, * 0 otherwise */ #define php_stream_mmap_possible(stream) (!php_stream_is_filtered((stream)) && php_stream_mmap_supported((stream))) BEGIN_EXTERN_C() PHPAPI char *_php_stream_mmap_range(php_stream *stream, size_t offset, size_t length, php_stream_mmap_operation_t mode, size_t *mapped_len TSRMLS_DC); #define php_stream_mmap_range(stream, offset, length, mode, mapped_len) _php_stream_mmap_range((stream), (offset), (length), (mode), (mapped_len) TSRMLS_CC) /* un-maps the last mapped range */ PHPAPI int _php_stream_mmap_unmap(php_stream *stream TSRMLS_DC); #define php_stream_mmap_unmap(stream) _php_stream_mmap_unmap((stream) TSRMLS_CC) PHPAPI int _php_stream_mmap_unmap_ex(php_stream *stream, off_t readden TSRMLS_DC); #define php_stream_mmap_unmap_ex(stream, readden) _php_stream_mmap_unmap_ex((stream), (readden) TSRMLS_CC) END_EXTERN_C() /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: noet sw=4 ts=4 fdm=marker * vim<600: noet sw=4 ts=4 */ 07070100180dfa000081a40000000000000000000000014dc0f41300001a77000000b600010002ffffffffffffffff0000003f00000000root/usr/local/include/php/main/streams/php_stream_transport.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Wez Furlong | +----------------------------------------------------------------------+ */ /* $Id: php_stream_transport.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifdef PHP_WIN32 #include "config.w32.h" #include #endif #if HAVE_SYS_SOCKET_H # include #endif typedef php_stream *(php_stream_transport_factory_func)(const char *proto, long protolen, char *resourcename, long resourcenamelen, const char *persistent_id, int options, int flags, struct timeval *timeout, php_stream_context *context STREAMS_DC TSRMLS_DC); typedef php_stream_transport_factory_func *php_stream_transport_factory; BEGIN_EXTERN_C() PHPAPI int php_stream_xport_register(char *protocol, php_stream_transport_factory factory TSRMLS_DC); PHPAPI int php_stream_xport_unregister(char *protocol TSRMLS_DC); #define STREAM_XPORT_CLIENT 0 #define STREAM_XPORT_SERVER 1 #define STREAM_XPORT_CONNECT 2 #define STREAM_XPORT_BIND 4 #define STREAM_XPORT_LISTEN 8 #define STREAM_XPORT_CONNECT_ASYNC 16 /* Open a client or server socket connection */ PHPAPI php_stream *_php_stream_xport_create(const char *name, long namelen, int options, int flags, const char *persistent_id, struct timeval *timeout, php_stream_context *context, char **error_string, int *error_code STREAMS_DC TSRMLS_DC); #define php_stream_xport_create(name, namelen, options, flags, persistent_id, timeout, context, estr, ecode) \ _php_stream_xport_create(name, namelen, options, flags, persistent_id, timeout, context, estr, ecode STREAMS_CC TSRMLS_CC) /* Bind the stream to a local address */ PHPAPI int php_stream_xport_bind(php_stream *stream, const char *name, long namelen, char **error_text TSRMLS_DC); /* Connect to a remote address */ PHPAPI int php_stream_xport_connect(php_stream *stream, const char *name, long namelen, int asynchronous, struct timeval *timeout, char **error_text, int *error_code TSRMLS_DC); /* Prepare to listen */ PHPAPI int php_stream_xport_listen(php_stream *stream, int backlog, char **error_text TSRMLS_DC); /* Get the next client and their address as a string, or the underlying address * structure. You must efree either of these if you request them */ PHPAPI int php_stream_xport_accept(php_stream *stream, php_stream **client, char **textaddr, int *textaddrlen, void **addr, socklen_t *addrlen, struct timeval *timeout, char **error_text TSRMLS_DC); /* Get the name of either the socket or it's peer */ PHPAPI int php_stream_xport_get_name(php_stream *stream, int want_peer, char **textaddr, int *textaddrlen, void **addr, socklen_t *addrlen TSRMLS_DC); enum php_stream_xport_send_recv_flags { STREAM_OOB = 1, STREAM_PEEK = 2 }; /* Similar to recv() system call; read data from the stream, optionally * peeking, optionally retrieving OOB data */ PHPAPI int php_stream_xport_recvfrom(php_stream *stream, char *buf, size_t buflen, long flags, void **addr, socklen_t *addrlen, char **textaddr, int *textaddrlen TSRMLS_DC); /* Similar to send() system call; send data to the stream, optionally * sending it as OOB data */ PHPAPI int php_stream_xport_sendto(php_stream *stream, const char *buf, size_t buflen, long flags, void *addr, socklen_t addrlen TSRMLS_DC); typedef enum { STREAM_SHUT_RD, STREAM_SHUT_WR, STREAM_SHUT_RDWR } stream_shutdown_t; /* Similar to shutdown() system call; shut down part of a full-duplex * connection */ PHPAPI int php_stream_xport_shutdown(php_stream *stream, stream_shutdown_t how TSRMLS_DC); END_EXTERN_C() /* Structure definition for the set_option interface that the above functions wrap */ typedef struct _php_stream_xport_param { enum { STREAM_XPORT_OP_BIND, STREAM_XPORT_OP_CONNECT, STREAM_XPORT_OP_LISTEN, STREAM_XPORT_OP_ACCEPT, STREAM_XPORT_OP_CONNECT_ASYNC, STREAM_XPORT_OP_GET_NAME, STREAM_XPORT_OP_GET_PEER_NAME, STREAM_XPORT_OP_RECV, STREAM_XPORT_OP_SEND, STREAM_XPORT_OP_SHUTDOWN } op; unsigned int want_addr:1; unsigned int want_textaddr:1; unsigned int want_errortext:1; unsigned int how:2; struct { char *name; long namelen; int backlog; struct timeval *timeout; struct sockaddr *addr; socklen_t addrlen; char *buf; size_t buflen; long flags; } inputs; struct { php_stream *client; int returncode; struct sockaddr *addr; socklen_t addrlen; char *textaddr; long textaddrlen; char *error_text; int error_code; } outputs; } php_stream_xport_param; /* These functions provide crypto support on the underlying transport */ typedef enum { STREAM_CRYPTO_METHOD_SSLv2_CLIENT, STREAM_CRYPTO_METHOD_SSLv3_CLIENT, STREAM_CRYPTO_METHOD_SSLv23_CLIENT, STREAM_CRYPTO_METHOD_TLS_CLIENT, STREAM_CRYPTO_METHOD_SSLv2_SERVER, STREAM_CRYPTO_METHOD_SSLv3_SERVER, STREAM_CRYPTO_METHOD_SSLv23_SERVER, STREAM_CRYPTO_METHOD_TLS_SERVER } php_stream_xport_crypt_method_t; BEGIN_EXTERN_C() PHPAPI int php_stream_xport_crypto_setup(php_stream *stream, php_stream_xport_crypt_method_t crypto_method, php_stream *session_stream TSRMLS_DC); PHPAPI int php_stream_xport_crypto_enable(php_stream *stream, int activate TSRMLS_DC); END_EXTERN_C() typedef struct _php_stream_xport_crypto_param { enum { STREAM_XPORT_CRYPTO_OP_SETUP, STREAM_XPORT_CRYPTO_OP_ENABLE } op; struct { int activate; php_stream_xport_crypt_method_t method; php_stream *session; } inputs; struct { int returncode; } outputs; } php_stream_xport_crypto_param; BEGIN_EXTERN_C() PHPAPI HashTable *php_stream_xport_get_hash(void); PHPAPI php_stream_transport_factory_func php_stream_generic_socket_factory; END_EXTERN_C() /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: noet sw=4 ts=4 fdm=marker * vim<600: noet sw=4 ts=4 */ 07070100180df5000081a40000000000000000000000014dc0f41300001c69000000b600010002ffffffffffffffff0000004000000000root/usr/local/include/php/main/streams/php_stream_filter_api.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Wez Furlong | | With suggestions from: | | Moriyoshi Koizumi | | Sara Golemon | +----------------------------------------------------------------------+ */ /* $Id: php_stream_filter_api.h 306939 2011-01-01 02:19:59Z felipe $ */ /* The filter API works on the principle of "Bucket-Brigades". This is * partially inspired by the Apache 2 method of doing things, although * it is intentially a light-weight implementation. * * Each stream can have a chain of filters for reading and another for writing. * * When data is written to the stream, is is placed into a bucket and placed at * the start of the input brigade. * * The first filter in the chain is invoked on the brigade and (depending on * it's return value), the next filter is invoked and so on. * */ #define PHP_STREAM_FILTER_READ 0x0001 #define PHP_STREAM_FILTER_WRITE 0x0002 #define PHP_STREAM_FILTER_ALL (PHP_STREAM_FILTER_READ | PHP_STREAM_FILTER_WRITE) typedef struct _php_stream_bucket php_stream_bucket; typedef struct _php_stream_bucket_brigade php_stream_bucket_brigade; struct _php_stream_bucket { php_stream_bucket *next, *prev; php_stream_bucket_brigade *brigade; char *buf; size_t buflen; /* if non-zero, buf should be pefreed when the bucket is destroyed */ int own_buf; int is_persistent; /* destroy this struct when refcount falls to zero */ int refcount; }; struct _php_stream_bucket_brigade { php_stream_bucket *head, *tail; }; typedef enum { PSFS_ERR_FATAL, /* error in data stream */ PSFS_FEED_ME, /* filter needs more data; stop processing chain until more is available */ PSFS_PASS_ON /* filter generated output buckets; pass them on to next in chain */ } php_stream_filter_status_t; /* Buckets API. */ BEGIN_EXTERN_C() PHPAPI php_stream_bucket *php_stream_bucket_new(php_stream *stream, char *buf, size_t buflen, int own_buf, int buf_persistent TSRMLS_DC); PHPAPI int php_stream_bucket_split(php_stream_bucket *in, php_stream_bucket **left, php_stream_bucket **right, size_t length TSRMLS_DC); PHPAPI void php_stream_bucket_delref(php_stream_bucket *bucket TSRMLS_DC); #define php_stream_bucket_addref(bucket) (bucket)->refcount++ PHPAPI void php_stream_bucket_prepend(php_stream_bucket_brigade *brigade, php_stream_bucket *bucket TSRMLS_DC); PHPAPI void php_stream_bucket_append(php_stream_bucket_brigade *brigade, php_stream_bucket *bucket TSRMLS_DC); PHPAPI void php_stream_bucket_unlink(php_stream_bucket *bucket TSRMLS_DC); PHPAPI php_stream_bucket *php_stream_bucket_make_writeable(php_stream_bucket *bucket TSRMLS_DC); END_EXTERN_C() #define PSFS_FLAG_NORMAL 0 /* regular read/write */ #define PSFS_FLAG_FLUSH_INC 1 /* an incremental flush */ #define PSFS_FLAG_FLUSH_CLOSE 2 /* final flush prior to closing */ typedef struct _php_stream_filter_ops { php_stream_filter_status_t (*filter)( php_stream *stream, php_stream_filter *thisfilter, php_stream_bucket_brigade *buckets_in, php_stream_bucket_brigade *buckets_out, size_t *bytes_consumed, int flags TSRMLS_DC); void (*dtor)(php_stream_filter *thisfilter TSRMLS_DC); const char *label; } php_stream_filter_ops; typedef struct _php_stream_filter_chain { php_stream_filter *head, *tail; /* Owning stream */ php_stream *stream; } php_stream_filter_chain; struct _php_stream_filter { php_stream_filter_ops *fops; void *abstract; /* for use by filter implementation */ php_stream_filter *next; php_stream_filter *prev; int is_persistent; /* link into stream and chain */ php_stream_filter_chain *chain; /* buffered buckets */ php_stream_bucket_brigade buffer; /* filters are auto_registered when they're applied */ int rsrc_id; }; /* stack filter onto a stream */ BEGIN_EXTERN_C() PHPAPI void _php_stream_filter_prepend(php_stream_filter_chain *chain, php_stream_filter *filter TSRMLS_DC); PHPAPI int php_stream_filter_prepend_ex(php_stream_filter_chain *chain, php_stream_filter *filter TSRMLS_DC); PHPAPI void _php_stream_filter_append(php_stream_filter_chain *chain, php_stream_filter *filter TSRMLS_DC); PHPAPI int php_stream_filter_append_ex(php_stream_filter_chain *chain, php_stream_filter *filter TSRMLS_DC); PHPAPI int _php_stream_filter_flush(php_stream_filter *filter, int finish TSRMLS_DC); PHPAPI php_stream_filter *php_stream_filter_remove(php_stream_filter *filter, int call_dtor TSRMLS_DC); PHPAPI void php_stream_filter_free(php_stream_filter *filter TSRMLS_DC); PHPAPI php_stream_filter *_php_stream_filter_alloc(php_stream_filter_ops *fops, void *abstract, int persistent STREAMS_DC TSRMLS_DC); END_EXTERN_C() #define php_stream_filter_alloc(fops, thisptr, persistent) _php_stream_filter_alloc((fops), (thisptr), (persistent) STREAMS_CC TSRMLS_CC) #define php_stream_filter_alloc_rel(fops, thisptr, persistent) _php_stream_filter_alloc((fops), (thisptr), (persistent) STREAMS_REL_CC TSRMLS_CC) #define php_stream_filter_prepend(chain, filter) _php_stream_filter_prepend((chain), (filter) TSRMLS_CC) #define php_stream_filter_append(chain, filter) _php_stream_filter_append((chain), (filter) TSRMLS_CC) #define php_stream_filter_flush(filter, finish) _php_stream_filter_flush((filter), (finish) TSRMLS_CC) #define php_stream_is_filtered(stream) ((stream)->readfilters.head || (stream)->writefilters.head) typedef struct _php_stream_filter_factory { php_stream_filter *(*create_filter)(const char *filtername, zval *filterparams, int persistent TSRMLS_DC); } php_stream_filter_factory; BEGIN_EXTERN_C() PHPAPI int php_stream_filter_register_factory(const char *filterpattern, php_stream_filter_factory *factory TSRMLS_DC); PHPAPI int php_stream_filter_unregister_factory(const char *filterpattern TSRMLS_DC); PHPAPI int php_stream_filter_register_factory_volatile(const char *filterpattern, php_stream_filter_factory *factory TSRMLS_DC); PHPAPI php_stream_filter *php_stream_filter_create(const char *filtername, zval *filterparams, int persistent TSRMLS_DC); END_EXTERN_C() /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: sw=4 ts=4 fdm=marker * vim<600: sw=4 ts=4 */ 07070100180df4000081a40000000000000000000000014dc0f413000018fb000000b600010002ffffffffffffffff0000003d00000000root/usr/local/include/php/main/streams/php_stream_context.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Wez Furlong | +----------------------------------------------------------------------+ */ /* $Id: php_stream_context.h 306939 2011-01-01 02:19:59Z felipe $ */ /* Stream context and status notification related definitions */ /* callback for status notifications */ typedef void (*php_stream_notification_func)(php_stream_context *context, int notifycode, int severity, char *xmsg, int xcode, size_t bytes_sofar, size_t bytes_max, void * ptr TSRMLS_DC); #define PHP_STREAM_NOTIFIER_PROGRESS 1 /* Attempt to fetch context from the zval passed, If no context was passed, use the default context The the default context has not yet been created, do it now. */ #define php_stream_context_from_zval(zcontext, nocontext) ( \ (zcontext) ? zend_fetch_resource(&(zcontext) TSRMLS_CC, -1, "Stream-Context", NULL, 1, php_le_stream_context()) : \ (nocontext) ? NULL : \ FG(default_context) ? FG(default_context) : \ (FG(default_context) = php_stream_context_alloc()) ) #define php_stream_context_to_zval(context, zval) { ZVAL_RESOURCE(zval, (context)->rsrc_id); zend_list_addref((context)->rsrc_id); } typedef struct _php_stream_notifier php_stream_notifier; struct _php_stream_notifier { php_stream_notification_func func; void (*dtor)(php_stream_notifier *notifier); void *ptr; int mask; size_t progress, progress_max; /* position for progress notification */ }; struct _php_stream_context { php_stream_notifier *notifier; zval *options; /* hash keyed by wrapper family or specific wrapper */ zval *links; /* hash keyed by hostent for connection pooling */ int rsrc_id; /* used for auto-cleanup */ }; BEGIN_EXTERN_C() PHPAPI void php_stream_context_free(php_stream_context *context); PHPAPI php_stream_context *php_stream_context_alloc(void); PHPAPI int php_stream_context_get_option(php_stream_context *context, const char *wrappername, const char *optionname, zval ***optionvalue); PHPAPI int php_stream_context_set_option(php_stream_context *context, const char *wrappername, const char *optionname, zval *optionvalue); PHPAPI int php_stream_context_get_link(php_stream_context *context, const char *hostent, php_stream **stream); PHPAPI int php_stream_context_set_link(php_stream_context *context, const char *hostent, php_stream *stream); PHPAPI int php_stream_context_del_link(php_stream_context *context, php_stream *stream); PHPAPI php_stream_notifier *php_stream_notification_alloc(void); PHPAPI void php_stream_notification_free(php_stream_notifier *notifier); END_EXTERN_C() /* not all notification codes are implemented */ #define PHP_STREAM_NOTIFY_RESOLVE 1 #define PHP_STREAM_NOTIFY_CONNECT 2 #define PHP_STREAM_NOTIFY_AUTH_REQUIRED 3 #define PHP_STREAM_NOTIFY_MIME_TYPE_IS 4 #define PHP_STREAM_NOTIFY_FILE_SIZE_IS 5 #define PHP_STREAM_NOTIFY_REDIRECTED 6 #define PHP_STREAM_NOTIFY_PROGRESS 7 #define PHP_STREAM_NOTIFY_COMPLETED 8 #define PHP_STREAM_NOTIFY_FAILURE 9 #define PHP_STREAM_NOTIFY_AUTH_RESULT 10 #define PHP_STREAM_NOTIFY_SEVERITY_INFO 0 #define PHP_STREAM_NOTIFY_SEVERITY_WARN 1 #define PHP_STREAM_NOTIFY_SEVERITY_ERR 2 BEGIN_EXTERN_C() PHPAPI void php_stream_notification_notify(php_stream_context *context, int notifycode, int severity, char *xmsg, int xcode, size_t bytes_sofar, size_t bytes_max, void * ptr TSRMLS_DC); PHPAPI php_stream_context *php_stream_context_set(php_stream *stream, php_stream_context *context); END_EXTERN_C() #define php_stream_notify_info(context, code, xmsg, xcode) do { if ((context) && (context)->notifier) { \ php_stream_notification_notify((context), (code), PHP_STREAM_NOTIFY_SEVERITY_INFO, \ (xmsg), (xcode), 0, 0, NULL TSRMLS_CC); } } while (0) #define php_stream_notify_progress(context, bsofar, bmax) do { if ((context) && (context)->notifier) { \ php_stream_notification_notify((context), PHP_STREAM_NOTIFY_PROGRESS, PHP_STREAM_NOTIFY_SEVERITY_INFO, \ NULL, 0, (bsofar), (bmax), NULL TSRMLS_CC); } } while(0) #define php_stream_notify_progress_init(context, sofar, bmax) do { if ((context) && (context)->notifier) { \ (context)->notifier->progress = (sofar); \ (context)->notifier->progress_max = (bmax); \ (context)->notifier->mask |= PHP_STREAM_NOTIFIER_PROGRESS; \ php_stream_notify_progress((context), (sofar), (bmax)); } } while (0) #define php_stream_notify_progress_increment(context, dsofar, dmax) do { if ((context) && (context)->notifier && (context)->notifier->mask & PHP_STREAM_NOTIFIER_PROGRESS) { \ (context)->notifier->progress += (dsofar); \ (context)->notifier->progress_max += (dmax); \ php_stream_notify_progress((context), (context)->notifier->progress, (context)->notifier->progress_max); } } while (0) #define php_stream_notify_file_size(context, file_size, xmsg, xcode) do { if ((context) && (context)->notifier) { \ php_stream_notification_notify((context), PHP_STREAM_NOTIFY_FILE_SIZE_IS, PHP_STREAM_NOTIFY_SEVERITY_INFO, \ (xmsg), (xcode), 0, (file_size), NULL TSRMLS_CC); } } while(0) #define php_stream_notify_error(context, code, xmsg, xcode) do { if ((context) && (context)->notifier) {\ php_stream_notification_notify((context), (code), PHP_STREAM_NOTIFY_SEVERITY_ERR, \ (xmsg), (xcode), 0, 0, NULL TSRMLS_CC); } } while(0) /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: sw=4 ts=4 fdm=marker * vim<600: sw=4 ts=4 */ 07070100180dfb000081a40000000000000000000000014dc0f4130000064f000000b600010002ffffffffffffffff0000003f00000000root/usr/local/include/php/main/streams/php_stream_userspace.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Wez Furlong | +----------------------------------------------------------------------+ */ /* $Id: php_stream_userspace.h 306939 2011-01-01 02:19:59Z felipe $ */ /* for user-space streams */ PHPAPI extern php_stream_ops php_stream_userspace_ops; PHPAPI extern php_stream_ops php_stream_userspace_dir_ops; #define PHP_STREAM_IS_USERSPACE &php_stream_userspace_ops #define PHP_STREAM_IS_USERSPACE_DIR &php_stream_userspace_dir_ops /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: sw=4 ts=4 fdm=marker * vim<600: sw=4 ts=4 */ 07070100180df6000081a40000000000000000000000014dc0f41300000883000000b600010002ffffffffffffffff0000004200000000root/usr/local/include/php/main/streams/php_stream_glob_wrapper.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Marcus Boerger | +----------------------------------------------------------------------+ */ /* $Id: php_stream_glob_wrapper.h 306939 2011-01-01 02:19:59Z felipe $ */ PHPAPI extern php_stream_wrapper php_glob_stream_wrapper; PHPAPI extern php_stream_ops php_glob_stream_ops; BEGIN_EXTERN_C() PHPAPI char* _php_glob_stream_get_path(php_stream *stream, int copy, int *plen STREAMS_DC TSRMLS_DC); #define php_glob_stream_get_path(stream, copy, plen) _php_glob_stream_get_path((stream), (copy), (plen) STREAMS_CC TSRMLS_CC) PHPAPI char* _php_glob_stream_get_pattern(php_stream *stream, int copy, int *plen STREAMS_DC TSRMLS_DC); #define php_glob_stream_get_pattern(stream, copy, plen) _php_glob_stream_get_pattern((stream), (copy), (plen) STREAMS_CC TSRMLS_CC) PHPAPI int _php_glob_stream_get_count(php_stream *stream, int *pflags STREAMS_DC TSRMLS_DC); #define php_glob_stream_get_count(stream, pflags) _php_glob_stream_get_count((stream), (pflags) STREAMS_CC TSRMLS_CC) END_EXTERN_C() /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: sw=4 ts=4 fdm=marker * vim<600: sw=4 ts=4 */ 07070100180def000081a40000000000000000000000014dc0f41300000a16000000b600010002ffffffffffffffff0000002a00000000root/usr/local/include/php/main/rfc1867.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: | +----------------------------------------------------------------------+ */ /* $Id: rfc1867.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef RFC1867_H #define RFC1867_H #include "SAPI.h" #define MULTIPART_CONTENT_TYPE "multipart/form-data" #define MULTIPART_EVENT_START 0 #define MULTIPART_EVENT_FORMDATA 1 #define MULTIPART_EVENT_FILE_START 2 #define MULTIPART_EVENT_FILE_DATA 3 #define MULTIPART_EVENT_FILE_END 4 #define MULTIPART_EVENT_END 5 typedef struct _multipart_event_start { size_t content_length; } multipart_event_start; typedef struct _multipart_event_formdata { size_t post_bytes_processed; char *name; char **value; size_t length; size_t *newlength; } multipart_event_formdata; typedef struct _multipart_event_file_start { size_t post_bytes_processed; char *name; char **filename; } multipart_event_file_start; typedef struct _multipart_event_file_data { size_t post_bytes_processed; off_t offset; char *data; size_t length; size_t *newlength; } multipart_event_file_data; typedef struct _multipart_event_file_end { size_t post_bytes_processed; char *temp_filename; int cancel_upload; } multipart_event_file_end; typedef struct _multipart_event_end { size_t post_bytes_processed; } multipart_event_end; SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler); void destroy_uploaded_files_hash(TSRMLS_D); void php_rfc1867_register_constants(TSRMLS_D); extern PHPAPI int (*php_rfc1867_callback)(unsigned int event, void *event_data, void **extra TSRMLS_DC); #endif /* RFC1867_H */ 07070100180de9000081a40000000000000000000000014dc0f413000007be000000b600010002ffffffffffffffff0000002e00000000root/usr/local/include/php/main/php_scandir.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Shane Caraveo | | Ilia Alshanetsky | +----------------------------------------------------------------------+ */ /* $Id: php_scandir.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef PHP_SCANDIR_H #define PHP_SCANDIR_H #include #ifdef HAVE_SYS_DIR_H #include #endif #ifdef PHP_WIN32 #include "config.w32.h" #include "win32/readdir.h" #else #include #endif #ifdef HAVE_DIRENT_H #include #endif #ifdef HAVE_SCANDIR #define php_scandir scandir #else PHPAPI int php_scandir(const char *dirname, struct dirent **namelist[], int (*selector) (const struct dirent *entry), int (*compare) (const struct dirent **a, const struct dirent **b)); #endif #ifdef HAVE_ALPHASORT #define php_alphasort alphasort #else PHPAPI int php_alphasort(const struct dirent **a, const struct dirent **b); #endif #endif /* PHP_SCANDIR_H */ 07070100180dde000081a40000000000000000000000014dc0f4130000061d000000b600010002ffffffffffffffff0000003400000000root/usr/local/include/php/main/php_content_types.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: | +----------------------------------------------------------------------+ */ /* $Id: php_content_types.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef PHP_CONTENT_TYPES_H #define PHP_CONTENT_TYPES_H #define DEFAULT_POST_CONTENT_TYPE "application/x-www-form-urlencoded" SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader); SAPI_API SAPI_POST_HANDLER_FUNC(php_std_post_handler); int php_startup_sapi_content_types(TSRMLS_D); int php_setup_sapi_content_types(TSRMLS_D); #endif /* PHP_CONTENT_TYPES_H */ 07070100180dee000081a40000000000000000000000014dc0f41300000108000000b600010002ffffffffffffffff0000002e00000000root/usr/local/include/php/main/php_version.h/* automatically generated by configure */ /* edit configure.in to change version number */ #define PHP_MAJOR_VERSION 5 #define PHP_MINOR_VERSION 3 #define PHP_RELEASE_VERSION 6 #define PHP_EXTRA_VERSION "" #define PHP_VERSION "5.3.6" #define PHP_VERSION_ID 50306 07070100180df2000081a40000000000000000000000014dc0f41300000847000000b600010002ffffffffffffffff0000002b00000000root/usr/local/include/php/main/spprintf.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Marcus Boerger | +----------------------------------------------------------------------+ */ /* $Id: spprintf.h 306939 2011-01-01 02:19:59Z felipe $ */ /* The pbuf parameter of all spprintf version receives a pointer to the allocated buffer. This buffer must be freed manually after usage using efree() function. The buffer will allways be terminated by a zero character. When pbuf is NULL the function can be used to calculate the required size of the buffer but for that purpose snprintf is faster. When both pbuf and the return value are 0 than you are out of memory. There is also snprintf: See difference explained in snprintf.h */ #ifndef SPPRINTF_H #define SPPRINTF_H #include "snprintf.h" BEGIN_EXTERN_C() PHPAPI int spprintf( char **pbuf, size_t max_len, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4); PHPAPI int vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap) PHP_ATTRIBUTE_FORMAT(printf, 3, 0); END_EXTERN_C() #endif /* SNPRINTF_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: */ 07070100180ddf000081a40000000000000000000000014dc0f41300000849000000b600010002ffffffffffffffff0000002d00000000root/usr/local/include/php/main/php_getopt.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Marcus Boerger | +----------------------------------------------------------------------+ */ /* $Id: php_getopt.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef PHP_GETOPT_H #define PHP_GETOPT_H #include "php.h" #ifdef NETWARE /* As NetWare LibC has optind and optarg macros defined in unistd.h our local variables were getting mistakenly preprocessed so undeffing optind and optarg */ #undef optarg #undef optind #endif /* Define structure for one recognized option (both single char and long name). * If short_open is '-' this is the last option. */ typedef struct _opt_struct { char opt_char; int need_param; char * opt_name; } opt_struct; BEGIN_EXTERN_C() /* holds the index of the latest fetched element from the opts array */ extern PHPAPI int php_optidx; PHPAPI int php_getopt(int argc, char* const *argv, const opt_struct opts[], char **optarg, int *optind, int show_err, int arg_start); END_EXTERN_C() #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: noet sw=4 ts=4 fdm=marker * vim<600: noet sw=4 ts=4 */ 07070100180ddd000081a40000000000000000000000014dc0f4130000ec28000000b600010002ffffffffffffffff0000002d00000000root/usr/local/include/php/main/php_config.h/* main/php_config.h. Generated automatically by configure. */ /* main/php_config.h.in. Generated automatically from configure.in by autoheader. */ /* Leave this file alone */ /* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: acconfig.h 306939 2011-01-01 02:19:59Z felipe $ */ #if defined(__GNUC__) && __GNUC__ >= 4 # define ZEND_API __attribute__ ((visibility("default"))) # define ZEND_DLEXPORT __attribute__ ((visibility("default"))) #else # define ZEND_API # define ZEND_DLEXPORT #endif #define ZEND_DLIMPORT /* Define if on AIX 3. System headers sometimes define this. We just want to avoid a redefinition error message. */ #ifndef _ALL_SOURCE /* #undef _ALL_SOURCE */ #endif /* Define if using alloca.c. */ /* #undef C_ALLOCA */ /* Define to empty if the keyword does not work. */ /* #undef const */ /* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. This function is required for alloca.c support on those systems. */ /* #undef CRAY_STACKSEG_END */ /* Define to `int' if doesn't define. */ /* #undef gid_t */ /* Define if you have alloca, as a function or macro. */ #define HAVE_ALLOCA 1 /* Define if you have and it should be used (not on Ultrix). */ #define HAVE_ALLOCA_H 1 /* Define if you don't have vprintf but do have _doprnt. */ /* #undef HAVE_DOPRNT */ /* Define if your system has a working fnmatch function. */ #define HAVE_FNMATCH 1 /* Define if your struct stat has st_blksize. */ #define HAVE_ST_BLKSIZE 1 /* Define if your struct stat has st_blocks. */ #define HAVE_ST_BLOCKS 1 /* Define if your struct stat has st_rdev. */ #define HAVE_ST_RDEV 1 /* Define if your struct tm has tm_zone. */ /* #undef HAVE_TM_ZONE */ /* Define if you don't have tm_zone but do have the external array tzname. */ #define HAVE_TZNAME 1 /* Define if utime(file, NULL) sets file's timestamp to the present. */ #define HAVE_UTIME_NULL 1 /* Define if you have the vprintf function. */ #define HAVE_VPRINTF 1 /* Define as __inline if that's what the C compiler calls it. */ /* #undef inline */ /* Define if your C compiler doesn't accept -c and -o together. */ /* #undef NO_MINUS_C_MINUS_O */ /* Define as the return type of signal handlers (int or void). */ #define RETSIGTYPE void /* Define to `unsigned' if doesn't define. */ /* #undef size_t */ /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ /* #undef STACK_DIRECTION */ /* Define if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define if you can safely include both and . */ /* #undef TIME_WITH_SYS_TIME */ /* Define if your declares struct tm. */ /* #undef TM_IN_SYS_TIME */ /* Define to `int' if doesn't define. */ /* #undef uid_t */ /* #undef uint */ /* #undef ulong */ /* The number of bytes in a char. */ /* #undef SIZEOF_CHAR */ /* The number of bytes in a char *. */ #define SIZEOF_CHAR_P 4 /* The number of bytes in a int. */ #define SIZEOF_INT 4 /* The number of bytes in a long. */ #define SIZEOF_LONG 4 /* The number of bytes in a long int. */ /* #undef SIZEOF_LONG_INT */ /* The number of bytes in a long long. */ #define SIZEOF_LONG_LONG 8 /* The number of bytes in a long long int. */ #define SIZEOF_LONG_LONG_INT 8 /* The number of bytes in a short. */ #define SIZEOF_SHORT 2 /* The number of bytes in a size_t. */ #define SIZEOF_SIZE_T 4 /* Define if you have the CreateProcess function. */ /* #undef HAVE_CREATEPROCESS */ /* Define if you have the acosh function. */ #define HAVE_ACOSH 1 /* Define if you have the alphasort function. */ #define HAVE_ALPHASORT 1 /* Define if you have the asctime_r function. */ #define HAVE_ASCTIME_R 1 /* Define if you have the asinh function. */ #define HAVE_ASINH 1 /* Define if you have the asprintf function. */ #define HAVE_ASPRINTF 1 /* Define if you have the atanh function. */ #define HAVE_ATANH 1 /* Define if you have the atoll function. */ #define HAVE_ATOLL 1 /* Define if you have the chroot function. */ #define HAVE_CHROOT 1 /* Define if you have the clearenv function. */ /* #undef HAVE_CLEARENV */ /* Define if you have the crypt function. */ #define HAVE_CRYPT 1 /* Define if you have the crypt_r function. */ /* #undef HAVE_CRYPT_R */ /* Define if you have the ctermid function. */ #define HAVE_CTERMID 1 /* Define if you have the ctime_r function. */ #define HAVE_CTIME_R 1 /* Define if you have the cuserid function. */ #define HAVE_CUSERID 1 /* Define if you have the fabsf function. */ #define HAVE_FABSF 1 /* Define if you have the finite function. */ #define HAVE_FINITE 1 /* Define if you have the flock function. */ /* #undef HAVE_FLOCK */ /* Define if you have the floorf function. */ #define HAVE_FLOORF 1 /* Define if you have the fork function. */ #define HAVE_FORK 1 /* Define if you have the fpclass function. */ #define HAVE_FPCLASS 1 /* Define if you have the ftok function. */ #define HAVE_FTOK 1 /* Define if you have the funopen function. */ /* #undef HAVE_FUNOPEN */ /* Define if you have the gai_strerror function. */ #define HAVE_GAI_STRERROR 1 /* Define if you have the gcvt function. */ #define HAVE_GCVT 1 /* Define if you have the getcwd function. */ #define HAVE_GETCWD 1 /* Define if you have the getgrgid_r function. */ #define HAVE_GETGRGID_R 1 /* Define if you have the getgrnam_r function. */ #define HAVE_GETGRNAM_R 1 /* Define if you have the getgroups function. */ #define HAVE_GETGROUPS 1 /* Define if you have the gethostname function. */ #define HAVE_GETHOSTNAME 1 /* Define if you have the getloadavg function. */ #define HAVE_GETLOADAVG 1 /* Define if you have the getlogin function. */ #define HAVE_GETLOGIN 1 /* Define if you have the getopt function. */ #define HAVE_GETOPT 1 /* Define if you have the getpgid function. */ #define HAVE_GETPGID 1 /* Define if you have the getpid function. */ #define HAVE_GETPID 1 /* Define if you have the getpriority function. */ /* #undef HAVE_GETPRIORITY */ /* Define if you have the getprotobyname function. */ #define HAVE_GETPROTOBYNAME 1 /* Define if you have the getprotobynumber function. */ #define HAVE_GETPROTOBYNUMBER 1 /* Define if you have the getpwnam_r function. */ #define HAVE_GETPWNAM_R 1 /* Define if you have the getpwuid_r function. */ #define HAVE_GETPWUID_R 1 /* Define if you have the getrlimit function. */ #define HAVE_GETRLIMIT 1 /* Define if you have the getrusage function. */ #define HAVE_GETRUSAGE 1 /* Define if you have the getservbyname function. */ #define HAVE_GETSERVBYNAME 1 /* Define if you have the getservbyport function. */ #define HAVE_GETSERVBYPORT 1 /* Define if you have the getsid function. */ #define HAVE_GETSID 1 /* Define if you have the gettimeofday function. */ #define HAVE_GETTIMEOFDAY 1 /* Define if you have the getwd function. */ #define HAVE_GETWD 1 /* Define if you have the glob function. */ #define HAVE_GLOB 1 /* Define if you have the gmtime_r function. */ #define HAVE_GMTIME_R 1 /* Define if you have the grantpt function. */ #define HAVE_GRANTPT 1 /* Define if you have the hstrerror function. */ /* #undef HAVE_HSTRERROR */ /* Define if you have the hypot function. */ #define HAVE_HYPOT 1 /* Define if you have the inet_ntoa function. */ #define HAVE_INET_NTOA 1 /* Define if you have the inet_ntop function. */ #define HAVE_INET_NTOP 1 /* Define if you have the inet_pton function. */ #define HAVE_INET_PTON 1 /* Define if you have the initgroups function. */ #define HAVE_INITGROUPS 1 /* Define if you have the isascii function. */ #define HAVE_ISASCII 1 /* Define if you have the isfinite function. */ /* #undef HAVE_ISFINITE */ /* Define if you have the isinf function. */ /* #undef HAVE_ISINF */ /* Define if you have the isnan function. */ #define HAVE_ISNAN 1 /* Define if you have the kill function. */ #define HAVE_KILL 1 /* Define if you have the lchown function. */ #define HAVE_LCHOWN 1 /* Define if you have the ldap_parse_reference function. */ #define HAVE_LDAP_PARSE_REFERENCE 1 /* Define if you have the ldap_parse_result function. */ #define HAVE_LDAP_PARSE_RESULT 1 /* Define if you have the ldap_start_tls_s function. */ #define HAVE_LDAP_START_TLS_S 1 /* Define if you have the link function. */ #define HAVE_LINK 1 /* Define if you have the localeconv function. */ #define HAVE_LOCALECONV 1 /* Define if you have the localtime_r function. */ #define HAVE_LOCALTIME_R 1 /* Define if you have the lockf function. */ #define HAVE_LOCKF 1 /* Define if you have the log1p function. */ #define HAVE_LOG1P 1 /* Define if you have the lrand48 function. */ #define HAVE_LRAND48 1 /* Define if you have the makedev function. */ /* #undef HAVE_MAKEDEV */ /* Define if you have the mblen function. */ #define HAVE_MBLEN 1 /* Define if you have the mbrlen function. */ #define HAVE_MBRLEN 1 /* Define if you have the mbsinit function. */ #define HAVE_MBSINIT 1 /* Define if you have the memcpy function. */ #define HAVE_MEMCPY 1 /* Define if you have the memmove function. */ #define HAVE_MEMMOVE 1 /* Define if you have the mempcpy function. */ /* #undef HAVE_MEMPCPY */ /* Define if you have the mkfifo function. */ #define HAVE_MKFIFO 1 /* Define if you have the mknod function. */ #define HAVE_MKNOD 1 /* Define if you have the mkstemp function. */ #define HAVE_MKSTEMP 1 /* Define if you have the mmap function. */ #define HAVE_MMAP 1 /* Define if you have the mremap function. */ /* #undef HAVE_MREMAP */ /* Define if you have the mysql_commit function. */ /* #undef HAVE_MYSQL_COMMIT */ /* Define if you have the mysql_next_result function. */ /* #undef HAVE_MYSQL_NEXT_RESULT */ /* Define if you have the mysql_sqlstate function. */ /* #undef HAVE_MYSQL_SQLSTATE */ /* Define if you have the mysql_stmt_prepare function. */ /* #undef HAVE_MYSQL_STMT_PREPARE */ /* Define if you have the nanosleep function. */ #define HAVE_NANOSLEEP 1 /* Define if you have the nice function. */ #define HAVE_NICE 1 /* Define if you have the nl_langinfo function. */ #define HAVE_NL_LANGINFO 1 /* Define if you have the perror function. */ #define HAVE_PERROR 1 /* Define if you have the poll function. */ #define HAVE_POLL 1 /* Define if you have the ptsname function. */ #define HAVE_PTSNAME 1 /* Define if you have the putenv function. */ #define HAVE_PUTENV 1 /* Define if you have the rand_r function. */ #define HAVE_RAND_R 1 /* Define if you have the random function. */ #define HAVE_RANDOM 1 /* Define if you have the realpath function. */ #define HAVE_REALPATH 1 /* Define if you have the rl_completion_matches function. */ #define HAVE_RL_COMPLETION_MATCHES 1 /* Define if you have the scandir function. */ #define HAVE_SCANDIR 1 /* Define if you have the setegid function. */ #define HAVE_SETEGID 1 /* Define if you have the setenv function. */ #define HAVE_SETENV 1 /* Define if you have the seteuid function. */ #define HAVE_SETEUID 1 /* Define if you have the setitimer function. */ #define HAVE_SETITIMER 1 /* Define if you have the setlocale function. */ #define HAVE_SETLOCALE 1 /* Define if you have the setpgid function. */ #define HAVE_SETPGID 1 /* Define if you have the setpriority function. */ /* #undef HAVE_SETPRIORITY */ /* Define if you have the setproctitle function. */ /* #undef HAVE_SETPROCTITLE */ /* Define if you have the setsid function. */ #define HAVE_SETSID 1 /* Define if you have the setsockopt function. */ #define HAVE_SETSOCKOPT 1 /* Define if you have the setvbuf function. */ #define HAVE_SETVBUF 1 /* Define if you have the shutdown function. */ #define HAVE_SHUTDOWN 1 /* Define if you have the sigaction function. */ /* #undef HAVE_SIGACTION */ /* Define if you have the sigprocmask function. */ /* #undef HAVE_SIGPROCMASK */ /* Define if you have the sigsetjmp function. */ #define HAVE_SIGSETJMP 1 /* Define if you have the sigtimedwait function. */ /* #undef HAVE_SIGTIMEDWAIT */ /* Define if you have the sigwaitinfo function. */ /* #undef HAVE_SIGWAITINFO */ /* Define if you have the sin function. */ #define HAVE_SIN 1 /* Define if you have the snprintf function. */ #define HAVE_SNPRINTF 1 /* Define if you have the socketpair function. */ #define HAVE_SOCKETPAIR 1 /* Define if you have the srand48 function. */ #define HAVE_SRAND48 1 /* Define if you have the srandom function. */ #define HAVE_SRANDOM 1 /* Define if you have the statfs function. */ #define HAVE_STATFS 1 /* Define if you have the statvfs function. */ #define HAVE_STATVFS 1 /* Define if you have the std_syslog function. */ /* #undef HAVE_STD_SYSLOG */ /* Define if you have the strcasecmp function. */ #define HAVE_STRCASECMP 1 /* Define if you have the strcoll function. */ #define HAVE_STRCOLL 1 /* Define if you have the strdup function. */ #define HAVE_STRDUP 1 /* Define if you have the strerror function. */ #define HAVE_STRERROR 1 /* Define if you have the strfmon function. */ #define HAVE_STRFMON 1 /* Define if you have the strftime function. */ #define HAVE_STRFTIME 1 /* Define if you have the strlcat function. */ #define HAVE_STRLCAT 1 /* Define if you have the strlcpy function. */ #define HAVE_STRLCPY 1 /* Define if you have the strndup function. */ /* #undef HAVE_STRNDUP */ /* Define if you have the strnlen function. */ #define HAVE_STRNLEN 1 /* Define if you have the strpbrk function. */ /* #undef HAVE_STRPBRK */ /* Define if you have the strpncpy function. */ /* #undef HAVE_STRPNCPY */ /* Define if you have the strptime function. */ #define HAVE_STRPTIME 1 /* Define if you have the strstr function. */ #define HAVE_STRSTR 1 /* Define if you have the strtod function. */ #define HAVE_STRTOD 1 /* Define if you have the strtok_r function. */ #define HAVE_STRTOK_R 1 /* Define if you have the strtol function. */ #define HAVE_STRTOL 1 /* Define if you have the strtoll function. */ #define HAVE_STRTOLL 1 /* Define if you have the strtoul function. */ /* #undef HAVE_STRTOUL */ /* Define if you have the strtoull function. */ /* #undef HAVE_STRTOULL */ /* Define if you have the symlink function. */ #define HAVE_SYMLINK 1 /* Define if you have the tempnam function. */ #define HAVE_TEMPNAM 1 /* Define if you have the tzset function. */ #define HAVE_TZSET 1 /* Define if you have the unlockpt function. */ #define HAVE_UNLOCKPT 1 /* Define if you have the unsetenv function. */ #define HAVE_UNSETENV 1 /* Define if you have the usleep function. */ #define HAVE_USLEEP 1 /* Define if you have the utime function. */ #define HAVE_UTIME 1 /* Define if you have the utimes function. */ #define HAVE_UTIMES 1 /* Define if you have the vasprintf function. */ #define HAVE_VASPRINTF 1 /* Define if you have the vsnprintf function. */ #define HAVE_VSNPRINTF 1 /* Define if you have the wait3 function. */ /* #undef HAVE_WAIT3 */ /* Define if you have the waitpid function. */ /* #undef HAVE_WAITPID */ /* Define if you have the header file. */ /* #undef HAVE__NSAPI_H */ /* Define if you have the header file. */ /* #undef HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H */ /* Define if you have the header file. */ #define HAVE_ALLOCA_H 1 /* Define if you have the header file. */ #define HAVE_ARPA_INET_H 1 /* Define if you have the header file. */ #define HAVE_ARPA_NAMESER_H 1 /* Define if you have the header file. */ #define HAVE_ASSERT_H 1 /* Define if you have the header file. */ #define HAVE_ATOMIC_H 1 /* Define if you have the header file. */ #define HAVE_CRYPT_H 1 /* Define if you have the header file. */ /* #undef HAVE_DEFAULT_STORE_H */ /* Define if you have the header file. */ #define HAVE_DIRENT_H 1 /* Define if you have the header file. */ #define HAVE_DLFCN_H 1 /* Define if you have the header file. */ /* #undef HAVE_DNS_H */ /* Define if you have the header file. */ #define HAVE_ERRNO_H 1 /* Define if you have the header file. */ #define HAVE_FCNTL_H 1 /* Define if you have the header file. */ #define HAVE_GRP_H 1 /* Define if you have the header file. */ #define HAVE_IEEEFP_H 1 /* Define if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define if you have the header file. */ #define HAVE_LANGINFO_H 1 /* Define if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define if you have the header file. */ #define HAVE_LOCALE_H 1 /* Define if you have the header file. */ #define HAVE_MALLOC_H 1 /* Define if you have the header file. */ #define HAVE_MONETARY_H 1 /* Define if you have the header file. */ /* #undef HAVE_NDIR_H */ /* Define if you have the header file. */ #define HAVE_NETDB_H 1 /* Define if you have the header file. */ #define HAVE_NETINET_IN_H 1 /* Define if you have the header file. */ #define HAVE_NETINET_TCP_H 1 /* Define if you have the header file. */ #define HAVE_OPENSSL_CRYPTO_H 1 /* Define if you have the header file. */ #define HAVE_PWD_H 1 /* Define if you have the header file. */ #define HAVE_RESOLV_H 1 /* Define if you have the header file. */ #define HAVE_SIGNAL_H 1 /* Define if you have the header file. */ /* #undef HAVE_ST_H */ /* Define if you have the header file. */ #define HAVE_STDARG_H 1 /* Define if you have the header file. */ /* #undef HAVE_STDBOOL_H */ /* Define if you have the header file. */ #define HAVE_STDINT_H 1 /* Define if you have the header file. */ /* #undef HAVE_STDIO_H */ /* Define if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define if you have the header file. */ #define HAVE_STRING_H 1 /* Define if you have the header file. */ /* #undef HAVE_STRINGS_H */ /* Define if you have the header file. */ /* #undef HAVE_SYS_DIR_H */ /* Define if you have the header file. */ #define HAVE_SYS_FILE_H 1 /* Define if you have the header file. */ #define HAVE_SYS_IOCTL_H 1 /* Define if you have the header file. */ #define HAVE_SYS_IPC_H 1 /* Define if you have the header file. */ #define HAVE_SYS_LOADAVG_H 1 /* Define if you have the header file. */ #define HAVE_SYS_MKDEV_H 1 /* Define if you have the header file. */ #define HAVE_SYS_MMAN_H 1 /* Define if you have the header file. */ #define HAVE_SYS_MOUNT_H 1 /* Define if you have the header file. */ /* #undef HAVE_SYS_NDIR_H */ /* Define if you have the header file. */ #define HAVE_SYS_PARAM_H 1 /* Define if you have the header file. */ #define HAVE_SYS_POLL_H 1 /* Define if you have the header file. */ #define HAVE_SYS_RESOURCE_H 1 /* Define if you have the header file. */ #define HAVE_SYS_SELECT_H 1 /* Define if you have the header file. */ #define HAVE_SYS_SOCKET_H 1 /* Define if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define if you have the header file. */ #define HAVE_SYS_STATFS_H 1 /* Define if you have the header file. */ #define HAVE_SYS_STATVFS_H 1 /* Define if you have the header file. */ /* #undef HAVE_SYS_SYSEXITS_H */ /* Define if you have the header file. */ #define HAVE_SYS_TIME_H 1 /* Define if you have the header file. */ /* #undef HAVE_SYS_TIMES_H */ /* Define if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define if you have the header file. */ /* #undef HAVE_SYS_UIO_H */ /* Define if you have the header file. */ #define HAVE_SYS_UN_H 1 /* Define if you have the header file. */ #define HAVE_SYS_UTSNAME_H 1 /* Define if you have the header file. */ #define HAVE_SYS_VARARGS_H 1 /* Define if you have the header file. */ #define HAVE_SYS_VFS_H 1 /* Define if you have the header file. */ #define HAVE_SYS_WAIT_H 1 /* Define if you have the header file. */ #define HAVE_SYSEXITS_H 1 /* Define if you have the header file. */ #define HAVE_SYSLOG_H 1 /* Define if you have the header file. */ #define HAVE_TERMIOS_H 1 /* Define if you have the header file. */ #define HAVE_TIME_H 1 /* Define if you have the header file. */ /* #undef HAVE_TUXMODULE_H */ /* Define if you have the header file. */ #define HAVE_UNISTD_H 1 /* Define if you have the header file. */ /* #undef HAVE_UNIX_H */ /* Define if you have the header file. */ #define HAVE_UTIME_H 1 /* Define if you have the header file. */ #define HAVE_WCHAR_H 1 /* Define if you have the header file. */ /* #undef HAVE_XMLPARSE_H */ /* Define if you have the header file. */ /* #undef HAVE_XMLTOK_H */ /* Define if you have the m library (-lm). */ #define HAVE_LIBM 1 /* Define if the target system has /dev/urandom device */ #define HAVE_DEV_URANDOM 1 /* Whether you have AOLserver */ /* #undef HAVE_AOLSERVER */ /* */ /* #undef HAVE_AP_CONFIG_H */ /* */ /* #undef HAVE_AP_COMPAT_H */ /* */ /* #undef HAVE_APACHE */ /* */ /* #undef HAVE_APACHE */ /* */ /* #undef HAVE_AP_CONFIG_H */ /* */ /* #undef HAVE_AP_CONFIG_H */ /* */ /* #undef HAVE_AP_COMPAT_H */ /* */ /* #undef HAVE_OLD_COMPAT_H */ /* */ /* #undef HAVE_AP_CONFIG_H */ /* */ /* #undef HAVE_AP_COMPAT_H */ /* */ /* #undef HAVE_OLD_COMPAT_H */ /* */ /* #undef HAVE_AP_CONFIG_H */ /* */ /* #undef HAVE_AP_COMPAT_H */ /* */ /* #undef HAVE_OLD_COMPAT_H */ /* */ /* #undef USE_TRANSFER_TABLES */ /* */ /* #undef PHP_APACHE_HAVE_CLIENT_FD */ /* */ /* #undef HAVE_AP_CONFIG_H */ /* */ /* #undef HAVE_AP_COMPAT_H */ /* */ /* #undef HAVE_APACHE_HOOKS */ /* */ /* #undef HAVE_APACHE */ /* */ /* #undef HAVE_AP_CONFIG_H */ /* */ /* #undef HAVE_AP_CONFIG_H */ /* */ /* #undef HAVE_AP_COMPAT_H */ /* */ /* #undef HAVE_OLD_COMPAT_H */ /* */ /* #undef HAVE_AP_CONFIG_H */ /* */ /* #undef HAVE_AP_COMPAT_H */ /* */ /* #undef HAVE_OLD_COMPAT_H */ /* */ /* #undef HAVE_AP_CONFIG_H */ /* */ /* #undef HAVE_AP_COMPAT_H */ /* */ /* #undef HAVE_OLD_COMPAT_H */ /* */ /* #undef USE_TRANSFER_TABLES */ /* */ /* #undef PHP_APACHE_HAVE_CLIENT_FD */ /* Whether to compile with Caudium support */ /* #undef HAVE_CAUDIUM */ /* Whether you have a Continuity Server */ /* #undef HAVE_CONTINUITY */ /* do we have prctl? */ /* #undef HAVE_PRCTL */ /* do we have clock_gettime? */ /* #undef HAVE_CLOCK_GETTIME */ /* do we have clock_get_time? */ /* #undef HAVE_CLOCK_GET_TIME */ /* do we have ptrace? */ /* #undef HAVE_PTRACE */ /* do we have mach_vm_read? */ /* #undef HAVE_MACH_VM_READ */ /* /proc/pid/mem interface */ /* #undef PROC_MEM_FILE */ /* Define to 1 if gcc supports __sync_bool_compare_and_swap() a.o. */ /* #undef HAVE_BUILTIN_ATOMIC */ /* do we have TCP_INFO? */ /* #undef HAVE_LQ_TCP_INFO */ /* do we have SO_LISTENQxxx? */ /* #undef HAVE_LQ_SO_LISTENQ */ /* fpm user name */ /* #undef PHP_FPM_USER */ /* fpm group name */ /* #undef PHP_FPM_GROUP */ /* */ /* #undef WITH_ZEUS */ /* Whether you have a Netscape/iPlanet/Sun Webserver */ /* #undef HAVE_NSAPI */ /* Whether you have phttpd */ /* #undef HAVE_PHTTPD */ /* whether you want Pi3Web support */ /* #undef WITH_PI3WEB */ /* Whether you use Roxen */ /* #undef HAVE_ROXEN */ /* Whether to use Roxen in ZTS mode */ /* #undef ROXEN_USE_ZTS */ /* Define if the socklen_t typedef is in sys/socket.h */ #define HAVE_SOCKLEN_T 1 /* Define if sockaddr_un in sys/un.h contains a sun_len component */ /* #undef HAVE_SOCKADDR_UN_SUN_LEN */ /* Define if cross-process locking is required by accept() */ /* #undef USE_LOCKING */ /* Define if system uses EBCDIC */ /* #undef CHARSET_EBCDIC */ /* Define if processor uses big-endian word */ /* #undef WORDS_BIGENDIAN */ /* whether write(2) works */ #define PHP_WRITE_STDOUT 1 /* */ #define HAVE_SOCKET 1 /* */ #define HAVE_SOCKET 1 /* */ #define HAVE_LIBSOCKET 1 /* */ #define HAVE_SOCKETPAIR 1 /* */ #define HAVE_SOCKETPAIR 1 /* */ #define HAVE_LIBSOCKET 1 /* */ #define HAVE_HTONL 1 /* */ #define HAVE_HTONL 1 /* */ #define HAVE_LIBSOCKET 1 /* */ #define HAVE_GETHOSTNAME 1 /* */ #define HAVE_GETHOSTNAME 1 /* */ #define HAVE_LIBNSL 1 /* */ #define HAVE_GETHOSTBYADDR 1 /* */ #define HAVE_GETHOSTBYADDR 1 /* */ #define HAVE_LIBNSL 1 /* */ #define HAVE_YP_GET_DEFAULT_DOMAIN 1 /* */ #define HAVE_YP_GET_DEFAULT_DOMAIN 1 /* */ #define HAVE_LIBNSL 1 /* */ #define HAVE_DLOPEN 1 /* */ #define HAVE_DLOPEN 1 /* */ #define HAVE_LIBDL 1 /* */ #define HAVE_LIBDL 1 /* */ #define HAVE_INET_ATON 1 /* */ #define HAVE_INET_ATON 1 /* */ #define HAVE_LIBRESOLV 1 /* */ #define HAVE_INET_ATON 1 /* */ /* #undef HAVE_LIBBIND */ /* */ /* #undef HAVE_FOPENCOOKIE */ /* */ /* #undef COOKIE_IO_FUNCTIONS_T */ /* */ /* #undef COOKIE_SEEKER_USES_OFF64_T */ /* Define if system has broken getcwd */ #define HAVE_BROKEN_GETCWD 1 /* Define if your glibc borks on fopen with mode a+ */ #define HAVE_BROKEN_GLIBC_FOPEN_APPEND 1 /* Whether localtime_r is declared */ /* #undef MISSING_LOCALTIME_R_DECL */ /* Whether gmtime_r is declared */ /* #undef MISSING_GMTIME_R_DECL */ /* Whether asctime_r is declared */ /* #undef MISSING_ASCTIME_R_DECL */ /* Whether ctime_r is declared */ /* #undef MISSING_CTIME_R_DECL */ /* Whether strtok_r is declared */ /* #undef MISSING_STRTOK_R_DECL */ /* */ #define MISSING_FCLOSE_DECL 0 /* */ #define MISSING_FCLOSE_DECL 0 /* whether you have tm_gmtoff in struct tm */ /* #undef HAVE_TM_GMTOFF */ /* whether you have struct flock */ #define HAVE_STRUCT_FLOCK 1 /* Whether you have socklen_t */ #define HAVE_SOCKLEN_T 1 /* Size of intmax_t */ #define SIZEOF_INTMAX_T 8 /* Whether intmax_t is available */ #define HAVE_INTMAX_T 1 /* Size of ssize_t */ #define SIZEOF_SSIZE_T 4 /* Whether ssize_t is available */ #define HAVE_SSIZE_T 1 /* Size of ptrdiff_t */ #define SIZEOF_PTRDIFF_T 4 /* Whether ptrdiff_t is available */ #define HAVE_PTRDIFF_T 1 /* Whether you have struct sockaddr_storage */ #define HAVE_SOCKADDR_STORAGE 1 /* Whether struct sockaddr has field sa_len */ /* #undef HAVE_SOCKADDR_SA_LEN */ /* */ #define HAVE_NANOSLEEP 1 /* */ #define HAVE_LIBRT 1 /* Define if you have the getaddrinfo function */ #define HAVE_GETADDRINFO 1 /* Whether system headers declare timezone */ #define HAVE_DECLARED_TIMEZONE 1 /* Whether you have HP-UX 10.x */ /* #undef PHP_HPUX_TIME_R */ /* Whether you have IRIX-style functions */ /* #undef PHP_IRIX_TIME_R */ /* whether you have POSIX readdir_r */ #define HAVE_POSIX_READDIR_R 1 /* whether you have old-style readdir_r */ /* #undef HAVE_OLD_READDIR_R */ /* */ /* #undef in_addr_t */ /* Define if crypt_r has uses CRYPTD */ /* #undef CRYPT_R_CRYPTD */ /* Define if crypt_r uses struct crypt_data */ /* #undef CRYPT_R_STRUCT_CRYPT_DATA */ /* Define if struct crypt_data requires _GNU_SOURCE */ /* #undef CRYPT_R_GNU_SOURCE */ /* Whether you have gcov */ /* #undef HAVE_GCOV */ /* */ #define PHP_SAFE_MODE 0 /* */ #define PHP_SAFE_MODE 0 /* */ #define PHP_SAFE_MODE_EXEC_DIR "/usr/local/php/bin" /* */ #define PHP_SAFE_MODE_EXEC_DIR "/usr/local/php/bin" /* */ #define PHP_SIGCHILD 0 /* */ #define PHP_SIGCHILD 0 /* */ #define MAGIC_QUOTES 0 /* */ #define MAGIC_QUOTES 0 /* */ #define DEFAULT_SHORT_OPEN_TAG "1" /* */ #define DEFAULT_SHORT_OPEN_TAG "1" /* Whether you have dmalloc */ /* #undef HAVE_DMALLOC */ /* Whether to enable IPv6 support */ #define HAVE_IPV6 1 /* Define if int32_t type is present. */ #define HAVE_INT32_T 1 /* Define if uint32_t type is present. */ #define HAVE_UINT32_T 1 /* Whether to build date as dynamic module */ /* #undef COMPILE_DL_DATE */ /* Whether to build ereg as dynamic module */ /* #undef COMPILE_DL_EREG */ /* */ #define HAVE_REGEX_T_RE_MAGIC 1 /* */ #define HSREGEX 1 /* */ #define REGEX 1 /* */ #define REGEX 1 /* 1 */ #define HAVE_REGEX_T_RE_MAGIC 1 /* */ #define HAVE_LIBXML 1 /* */ #define HAVE_LIBXML 1 /* Whether to build libxml as dynamic module */ /* #undef COMPILE_DL_LIBXML */ /* Whether to build openssl as dynamic module */ /* #undef COMPILE_DL_OPENSSL */ /* OpenSSL 0.9.7 or later */ /* #undef HAVE_DSA_DEFAULT_METHOD */ /* */ #define HAVE_OPENSSL_EXT 1 /* */ #define HAVE_PCRE 1 /* Whether to build pcre as dynamic module */ /* #undef COMPILE_DL_PCRE */ /* Whether to build pcre as dynamic module */ /* #undef COMPILE_DL_PCRE */ /* */ /* #undef HAVE_BUNDLED_PCRE */ /* have commercial sqlite3 with crypto support */ /* #undef HAVE_SQLITE3_KEY */ /* have sqlite3 with extension support */ /* #undef SQLITE_OMIT_LOAD_EXTENSION */ /* */ #define HAVE_SQLITE3 1 /* Whether to build sqlite3 as dynamic module */ /* #undef COMPILE_DL_SQLITE3 */ /* Whether to build zlib as dynamic module */ /* #undef COMPILE_DL_ZLIB */ /* */ #define HAVE_ZLIB 1 /* Whether to build bcmath as dynamic module */ /* #undef COMPILE_DL_BCMATH */ /* Whether you have bcmath */ /* #undef HAVE_BCMATH */ /* */ #define HAVE_BZ2 1 /* Whether to build bz2 as dynamic module */ /* #undef COMPILE_DL_BZ2 */ /* */ /* #undef HAVE_CALENDAR */ /* Whether to build calendar as dynamic module */ /* #undef COMPILE_DL_CALENDAR */ /* */ #define HAVE_CTYPE 1 /* Whether to build ctype as dynamic module */ /* #undef COMPILE_DL_CTYPE */ /* Have cURL with SSL support */ #define HAVE_CURL_SSL 1 /* Have cURL with OpenSSL support */ #define HAVE_CURL_OPENSSL 1 /* Have cURL with GnuTLS support */ /* #undef HAVE_CURL_GNUTLS */ /* */ #define HAVE_CURL 1 /* */ #define HAVE_CURL_VERSION_INFO 1 /* */ #define HAVE_CURL_EASY_STRERROR 1 /* */ #define HAVE_CURL_MULTI_STRERROR 1 /* */ #define PHP_CURL_URL_WRAPPERS 1 /* Whether to build curl as dynamic module */ /* #undef COMPILE_DL_CURL */ /* */ /* #undef QDBM_INCLUDE_FILE */ /* */ /* #undef DBA_QDBM */ /* */ #define GDBM_INCLUDE_FILE "/usr/local/include/gdbm.h" /* */ #define DBA_GDBM 1 /* */ /* #undef NDBM_INCLUDE_FILE */ /* */ /* #undef DBA_NDBM */ /* */ #define DBA_DB4 1 /* */ #define DB4_INCLUDE_FILE "/usr/local/include/db.h" /* */ /* #undef DBA_DB3 */ /* */ /* #undef DB3_INCLUDE_FILE */ /* */ /* #undef DBA_DB2 */ /* */ /* #undef DB2_INCLUDE_FILE */ /* */ /* #undef DB1_VERSION */ /* */ /* #undef DB1_VERSION */ /* */ /* #undef DB1_INCLUDE_FILE */ /* */ /* #undef DBA_DB1 */ /* */ /* #undef DBM_INCLUDE_FILE */ /* */ /* #undef DBM_VERSION */ /* */ /* #undef DBM_VERSION */ /* */ /* #undef DBA_DBM */ /* */ #define DBA_CDB_BUILTIN 1 /* */ #define DBA_CDB_MAKE 1 /* */ #define DBA_CDB 1 /* */ /* #undef CDB_INCLUDE_FILE */ /* */ #define DBA_CDB 1 /* */ #define DBA_INIFILE 1 /* */ #define DBA_FLATFILE 1 /* */ #define HAVE_DBA 1 /* Whether to build dba as dynamic module */ /* #undef COMPILE_DL_DBA */ /* */ #define HAVE_LIBXML 1 /* */ #define HAVE_DOM 1 /* Whether to build dom as dynamic module */ /* #undef COMPILE_DL_DOM */ /* Whether to build enchant as dynamic module */ /* #undef COMPILE_DL_ENCHANT */ /* */ /* #undef HAVE_ENCHANT */ /* */ /* #undef HAVE_ENCHANT_BROKER_SET_PARAM */ /* */ /* #undef ENCHANT_VERSION_STRING */ /* Whether you want EXIF (metadata from images) support */ /* #undef HAVE_EXIF */ /* Whether to build exif as dynamic module */ /* #undef COMPILE_DL_EXIF */ /* Whether to build fileinfo as dynamic module */ /* #undef COMPILE_DL_FILEINFO */ /* Whether to build filter as dynamic module */ /* #undef COMPILE_DL_FILTER */ /* Whether you want FTP support */ /* #undef HAVE_FTP */ /* Whether to build ftp as dynamic module */ /* #undef COMPILE_DL_FTP */ /* */ #define USE_GD_IMGSTRTTF 1 /* */ #define USE_GD_IMGSTRTTF 1 /* */ #define HAVE_LIBFREETYPE 1 /* */ #define ENABLE_GD_TTF 1 /* */ /* #undef HAVE_LIBT1 */ /* */ #define HAVE_LIBGD 1 /* */ #define HAVE_LIBGD13 1 /* */ #define HAVE_LIBGD15 1 /* */ #define HAVE_LIBGD20 1 /* */ #define HAVE_LIBGD204 1 /* */ #define HAVE_GD_IMAGESETTILE 1 /* */ #define HAVE_GD_IMAGESETBRUSH 1 /* */ #define HAVE_GDIMAGECOLORRESOLVE 1 /* */ #define HAVE_COLORCLOSESTHWB 1 /* */ #define HAVE_GD_WBMP 1 /* */ #define HAVE_GD_GD2 1 /* */ #define HAVE_GD_PNG 1 /* */ #define HAVE_GD_XBM 1 /* */ #define HAVE_GD_BUNDLED 1 /* */ #define HAVE_GD_GIF_READ 1 /* */ #define HAVE_GD_GIF_CREATE 1 /* */ #define HAVE_GD_IMAGEELLIPSE 1 /* */ #define HAVE_GD_FONTCACHESHUTDOWN 1 /* */ #define HAVE_GD_FONTMUTEX 1 /* */ #define HAVE_GD_DYNAMIC_CTX_EX 1 /* */ #define HAVE_GD_GIF_CTX 1 /* */ #define HAVE_GD_JPG 1 /* */ #define HAVE_GD_XPM 1 /* */ #define HAVE_GD_STRINGFT 1 /* */ #define HAVE_GD_STRINGFTEX 1 /* */ #define ENABLE_GD_TTF 1 /* */ /* #undef USE_GD_JISX0208 */ /* */ #define USE_GD_IMGSTRTTF 1 /* */ #define USE_GD_IMGSTRTTF 1 /* */ #define HAVE_LIBFREETYPE 1 /* */ #define ENABLE_GD_TTF 1 /* */ /* #undef HAVE_LIBT1 */ /* */ #define HAVE_LIBGD 1 /* */ #define HAVE_LIBGD13 1 /* */ #define HAVE_LIBGD15 1 /* */ #define HAVE_GD_PNG 1 /* */ #define HAVE_GD_GIF_READ 1 /* */ #define HAVE_GD_GIF_CREATE 1 /* */ #define HAVE_GD_WBMP 1 /* */ #define HAVE_GD_JPG 1 /* */ #define HAVE_GD_XPM 1 /* */ #define HAVE_GD_GD2 1 /* */ #define HAVE_LIBGD20 1 /* */ #define HAVE_GD_IMAGESETTILE 1 /* */ #define HAVE_GD_IMAGEELLIPSE 1 /* */ #define HAVE_GD_IMAGESETBRUSH 1 /* */ /* #undef HAVE_GD_STRINGTTF */ /* */ #define HAVE_GD_STRINGFT 1 /* */ #define HAVE_GD_STRINGFTEX 1 /* */ #define HAVE_COLORCLOSESTHWB 1 /* */ #define HAVE_GDIMAGECOLORRESOLVE 1 /* */ #define HAVE_GD_GIF_CTX 1 /* */ /* #undef HAVE_GD_CACHE_CREATE */ /* */ #define HAVE_GD_FONTCACHESHUTDOWN 1 /* */ /* #undef HAVE_GD_FREEFONTCACHE */ /* */ #define HAVE_GD_FONTMUTEX 1 /* */ #define HAVE_GD_DYNAMIC_CTX_EX 1 /* */ #define HAVE_LIBGD204 1 /* Whether to build gd as dynamic module */ /* #undef COMPILE_DL_GD */ /* */ #define HAVE_LIBINTL 1 /* Whether to build gettext as dynamic module */ /* #undef COMPILE_DL_GETTEXT */ /* */ #define HAVE_NGETTEXT 1 /* */ #define HAVE_DNGETTEXT 1 /* */ #define HAVE_DCNGETTEXT 1 /* */ #define HAVE_BIND_TEXTDOMAIN_CODESET 1 /* Whether to build gmp as dynamic module */ /* #undef COMPILE_DL_GMP */ /* */ /* #undef HAVE_GMP */ /* */ /* #undef PHP_MHASH_BC */ /* Have HASH Extension */ #define HAVE_HASH_EXT 1 /* Define if processor uses big-endian word */ /* #undef WORDS_BIGENDIAN */ /* Whether to build hash as dynamic module */ /* #undef COMPILE_DL_HASH */ /* */ /* #undef HAVE_LIBICONV */ /* */ /* #undef HAVE_GICONV_H */ /* */ /* #undef HAVE_LIBICONV */ /* iconv() is aliased to libiconv() in -liconv */ /* #undef ICONV_ALIASED_LIBICONV */ /* */ #define HAVE_ICONV 1 /* Which iconv implementation to use */ /* #undef PHP_ICONV_IMPL */ /* Konstantin Chuguev's iconv implementation */ /* #undef HAVE_BSD_ICONV */ /* Which iconv implementation to use */ /* #undef PHP_ICONV_IMPL */ /* glibc's iconv implementation */ /* #undef HAVE_GLIBC_ICONV */ /* Which iconv implementation to use */ /* #undef PHP_ICONV_IMPL */ /* IBM iconv implementation */ /* #undef HAVE_IBM_ICONV */ /* Which iconv implementation to use */ /* #undef PHP_ICONV_IMPL */ /* Whether iconv supports error no or not */ #define ICONV_SUPPORTS_ERRNO 1 /* Whether iconv supports error no or not */ #define ICONV_SUPPORTS_ERRNO 1 /* Whether iconv supports error no or not */ #define ICONV_SUPPORTS_ERRNO 1 /* Path to iconv.h */ #define PHP_ICONV_H_PATH /* Whether to build iconv as dynamic module */ /* #undef COMPILE_DL_ICONV */ /* Whether to build imap as dynamic module */ /* #undef COMPILE_DL_IMAP */ /* */ /* #undef HAVE_IMAP */ /* */ /* #undef HAVE_IMAP2000 */ /* */ /* #undef HAVE_IMAP2000 */ /* */ /* #undef HAVE_IMAP2000 */ /* */ /* #undef HAVE_IMAP2000 */ /* */ /* #undef HAVE_IMAP2000 */ /* */ /* #undef HAVE_IMAP2000 */ /* */ /* #undef HAVE_IMAP2004 */ /* Whether utf8_mime2text() has new signature */ /* #undef HAVE_NEW_MIME2TEXT */ /* */ /* #undef HAVE_IMAP2001 */ /* */ /* #undef HAVE_LIBPAM */ /* */ /* #undef HAVE_LIBCRYPT */ /* */ /* #undef HAVE_IMAP_KRB */ /* */ /* #undef HAVE_IMAP_SSL */ /* */ /* #undef HAVE_IMAP_AUTH_GSS */ /* */ /* #undef HAVE_IMAP_MUTF7 */ /* */ /* #undef HAVE_RFC822_OUTPUT_ADDRESS_LIST */ /* */ /* #undef HAVE_IBASE */ /* Whether to build interbase as dynamic module */ /* #undef COMPILE_DL_INTERBASE */ /* Whether to build intl as dynamic module */ /* #undef COMPILE_DL_INTL */ /* whether to enable JavaScript Object Serialization support */ #define HAVE_JSON 1 /* Whether to build json as dynamic module */ /* #undef COMPILE_DL_JSON */ /* Whether to build ldap as dynamic module */ /* #undef COMPILE_DL_LDAP */ /* */ /* #undef HAVE_NSLDAP */ /* */ /* #undef HAVE_NSLDAP */ /* */ /* #undef HAVE_NSLDAP */ /* */ /* #undef HAVE_NSLDAP */ /* */ /* #undef HAVE_ORALDAP */ /* */ /* #undef HAVE_ORALDAP_10 */ /* */ #define HAVE_LDAP 1 /* Whether 3 arg set_rebind_proc() */ #define HAVE_3ARG_SETREBINDPROC 1 /* */ /* #undef HAVE_LDAP_SASL_SASL_H */ /* */ /* #undef HAVE_LDAP_SASL_H */ /* LDAP SASL support */ /* #undef HAVE_LDAP_SASL */ /* whether to have multibyte string support */ /* #undef HAVE_MBSTRING */ /* whether to check multibyte regex backtrack */ /* #undef USE_COMBINATION_EXPLOSION_CHECK */ /* Define to 1 if you have the header file. */ /* #undef HAVE_STDARG_PROTOTYPES */ /* Define to 1 if the bundled oniguruma is used */ /* #undef PHP_ONIG_BUNDLED */ /* Define to 1 if the oniguruma library is available */ /* #undef HAVE_ONIG */ /* Define to 1 if the oniguruma library is available */ /* #undef HAVE_ONIG */ /* define to 1 if oniguruma has an invalid entry for KOI8 encoding */ /* #undef PHP_ONIG_BAD_KOI8_ENTRY */ /* whether to have multibyte regex support */ /* #undef HAVE_MBREGEX */ /* Whether to build mbstring as dynamic module */ /* #undef COMPILE_DL_MBSTRING */ /* */ #define HAVE_LIBMCRYPT 1 /* */ #define HAVE_LIBMCRYPT 1 /* Whether to build mcrypt as dynamic module */ /* #undef COMPILE_DL_MCRYPT */ /* Whether to build mssql as dynamic module */ /* #undef COMPILE_DL_MSSQL */ /* */ /* #undef HAVE_LIBDNET_STUB */ /* */ /* #undef HAVE_MSSQL */ /* */ /* #undef HAVE_FREETDS */ /* */ /* #undef PHP_MYSQL_UNIX_SOCK_ADDR */ /* */ /* #undef PHP_MYSQL_UNIX_SOCK_ADDR */ /* Whether you have MySQL */ #define HAVE_MYSQL 1 /* Whether to build mysql as dynamic module */ /* #undef COMPILE_DL_MYSQL */ /* Whether mysqlnd is enabled */ /* #undef MYSQL_USE_MYSQLND */ /* embedded MySQL support enabled */ /* #undef HAVE_EMBEDDED_MYSQLI */ /* */ /* #undef HAVE_MYSQLILIB */ /* */ /* #undef HAVE_STMT_NEXT_RESULT */ /* Whether to build mysqli as dynamic module */ /* #undef COMPILE_DL_MYSQLI */ /* Whether mysqlnd is enabled */ /* #undef MYSQLI_USE_MYSQLND */ /* */ /* #undef HAVE_OCI_LOB_READ2 */ /* Whether to build oci8 as dynamic module */ /* #undef COMPILE_DL_OCI8 */ /* */ /* #undef HAVE_OCI8 */ /* */ /* #undef PHP_OCI8_DEF_DIR */ /* */ /* #undef PHP_OCI8_DEF_SHARED_LIBADD */ /* */ /* #undef HAVE_OCI_INSTANT_CLIENT */ /* */ /* #undef HAVE_OCI_LOB_READ2 */ /* Whether to build oci8 as dynamic module */ /* #undef COMPILE_DL_OCI8 */ /* */ /* #undef HAVE_OCI8 */ /* */ /* #undef HAVE_ADABAS */ /* */ /* #undef HAVE_SAPDB */ /* */ /* #undef HAVE_SOLID_35 */ /* */ /* #undef HAVE_SOLID_30 */ /* */ /* #undef HAVE_SOLID */ /* Needed in sqlunix.h */ /* #undef SS_LINUX */ /* Needed in sqlunix.h */ /* #undef SS_LINUX */ /* Needed in sqlunix.h for wchar defs */ /* #undef SS_FBX */ /* Needed in sqlunix.h for wchar defs */ /* #undef SS_FBX */ /* */ /* #undef HAVE_IBMDB2 */ /* */ /* #undef HAVE_ODBC_ROUTER */ /* */ /* #undef HAVE_EMPRESS */ /* */ /* #undef HAVE_EMPRESS */ /* */ /* #undef AIX */ /* */ /* #undef HPUX */ /* */ /* #undef LINUX */ /* */ /* #undef NEUTRINO */ /* */ /* #undef ISOLARIS */ /* */ /* #undef SOLARIS */ /* */ /* #undef UNIXWARE */ /* */ /* #undef HAVE_BIRDSTEP */ /* */ /* #undef HAVE_CODBC */ /* */ /* #undef HAVE_IODBC */ /* */ /* #undef HAVE_ODBC2 */ /* */ /* #undef HAVE_ESOOB */ /* */ /* #undef HAVE_UNIXODBC */ /* Whether you want DBMaker */ /* #undef HAVE_DBMAKER */ /* */ /* #undef HAVE_SQLDATASOURCES */ /* */ /* #undef HAVE_UODBC */ /* Whether to build odbc as dynamic module */ /* #undef COMPILE_DL_ODBC */ /* */ #define HAVE_FORK 1 /* */ /* #undef HAVE_WAITPID */ /* */ /* #undef HAVE_SIGACTION */ /* Whether to build pcntl as dynamic module */ /* #undef COMPILE_DL_PCNTL */ /* Whether to build pdo as dynamic module */ /* #undef COMPILE_DL_PDO */ /* Whether to build pdo_dblib as dynamic module */ /* #undef COMPILE_DL_PDO_DBLIB */ /* */ /* #undef HAVE_LIBDNET_STUB */ /* */ /* #undef HAVE_PDO_DBLIB */ /* */ /* #undef HAVE_FREETDS */ /* */ /* #undef HAVE_PDO_FIREBIRD */ /* Whether to build pdo_firebird as dynamic module */ /* #undef COMPILE_DL_PDO_FIREBIRD */ /* Whether pdo_mysql uses mysqlnd */ /* #undef PDO_USE_MYSQLND */ /* Whether you have MySQL */ #define HAVE_MYSQL 1 /* */ /* #undef PDO_MYSQL_UNIX_ADDR */ /* Whether to build pdo_mysql as dynamic module */ /* #undef COMPILE_DL_PDO_MYSQL */ /* */ /* #undef HAVE_OCIENVCREATE */ /* */ /* #undef HAVE_OCIENVNLSCREATE */ /* */ /* #undef HAVE_OCILOBISTEMPORARY */ /* */ /* #undef HAVE_OCILOBISTEMPORARY */ /* */ /* #undef HAVE_OCICOLLASSIGN */ /* */ /* #undef HAVE_OCISTMTFETCH2 */ /* Whether to build pdo_oci as dynamic module */ /* #undef COMPILE_DL_PDO_OCI */ /* */ /* #undef PHP_PDO_OCI_CLIENT_VERSION */ /* */ /* #undef HAVE_ODBC_H */ /* */ /* #undef HAVE_ODBCSDK_H */ /* */ /* #undef HAVE_IODBC_H */ /* */ /* #undef HAVE_SQLUNIX_H */ /* */ /* #undef HAVE_SQLTYPES_H */ /* */ /* #undef HAVE_SQLUCODE_H */ /* */ /* #undef HAVE_SQL_H */ /* */ /* #undef HAVE_ISQL_H */ /* */ /* #undef HAVE_SQLEXT_H */ /* */ /* #undef HAVE_ISQLEXT_H */ /* */ /* #undef HAVE_UDBCEXT_H */ /* */ /* #undef HAVE_SQLCLI1_H */ /* */ /* #undef HAVE_LIBRARYMANAGER_H */ /* */ /* #undef HAVE_CLI0CORE_H */ /* */ /* #undef HAVE_CLI0EXT_H */ /* */ /* #undef HAVE_CLI0CLI_H */ /* */ /* #undef HAVE_CLI0DEFS_H */ /* */ /* #undef HAVE_CLI0ENV_H */ /* Whether to build pdo_odbc as dynamic module */ /* #undef COMPILE_DL_PDO_ODBC */ /* Whether to have pg_config.h */ /* #undef HAVE_PG_CONFIG_H */ /* Whether to have pg_config.h */ /* #undef HAVE_PG_CONFIG_H */ /* Whether to build PostgreSQL for PDO support or not */ /* #undef HAVE_PDO_PGSQL */ /* PostgreSQL 7.4 or later */ /* #undef HAVE_PQPARAMETERSTATUS */ /* PostgreSQL 8.0 or later */ /* #undef HAVE_PQPREPARE */ /* PostgreSQL 8.1.4 or later */ /* #undef HAVE_PQESCAPE_CONN */ /* PostgreSQL 8.1.4 or later */ /* #undef HAVE_PQESCAPE_BYTEA_CONN */ /* Whether libpq is compiled with --enable-multibyte */ /* #undef HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT */ /* Whether to build pdo_pgsql as dynamic module */ /* #undef COMPILE_DL_PDO_PGSQL */ /* */ /* #undef HAVE_PDO_SQLITELIB */ /* have commercial sqlite3 with crypto support */ /* #undef HAVE_SQLITE3_KEY */ /* Whether to build pdo_sqlite as dynamic module */ /* #undef COMPILE_DL_PDO_SQLITE */ /* Whether to build pdo_sqlite as dynamic module */ /* #undef COMPILE_DL_PDO_SQLITE */ /* Whether to have pg_config.h */ /* #undef HAVE_PG_CONFIG_H */ /* Whether to have pg_config.h */ /* #undef HAVE_PG_CONFIG_H */ /* Whether to build PostgreSQL support or not */ /* #undef HAVE_PGSQL */ /* PostgreSQL 7.2.0 or later */ /* #undef HAVE_PQESCAPE */ /* PostgreSQL 7.3.0 or later */ /* #undef HAVE_PQUNESCAPEBYTEA */ /* PostgreSQL 7.0.x or later */ /* #undef HAVE_PQSETNONBLOCKING */ /* Broken libpq under windows */ /* #undef HAVE_PQCMDTUPLES */ /* Older PostgreSQL */ /* #undef HAVE_PQOIDVALUE */ /* PostgreSQL 7.0.x or later */ /* #undef HAVE_PQCLIENTENCODING */ /* PostgreSQL 7.4 or later */ /* #undef HAVE_PQPARAMETERSTATUS */ /* PostgreSQL 7.4 or later */ /* #undef HAVE_PQPROTOCOLVERSION */ /* PostgreSQL 7.4 or later */ /* #undef HAVE_PGTRANSACTIONSTATUS */ /* PostgreSQL 7.4 or later */ /* #undef HAVE_PQEXECPARAMS */ /* PostgreSQL 7.4 or later */ /* #undef HAVE_PQPREPARE */ /* PostgreSQL 7.4 or later */ /* #undef HAVE_PQEXECPREPARED */ /* PostgreSQL 7.4 or later */ /* #undef HAVE_PQRESULTERRORFIELD */ /* PostgreSQL 7.4 or later */ /* #undef HAVE_PQSENDQUERYPARAMS */ /* PostgreSQL 7.4 or later */ /* #undef HAVE_PQSENDPREPARE */ /* PostgreSQL 7.4 or later */ /* #undef HAVE_PQSENDQUERYPREPARED */ /* PostgreSQL 7.4 or later */ /* #undef HAVE_PQPUTCOPYDATA */ /* PostgreSQL 7.4 or later */ /* #undef HAVE_PQPUTCOPYEND */ /* PostgreSQL 7.4 or later */ /* #undef HAVE_PQGETCOPYDATA */ /* PostgreSQL 7.4 or later */ /* #undef HAVE_PQFREEMEM */ /* PostgreSQL 7.4 or later */ /* #undef HAVE_PQSETERRORVERBOSITY */ /* PostgreSQL 7.4 or later */ /* #undef HAVE_PQFTABLE */ /* PostgreSQL 8.1.4 or later */ /* #undef HAVE_PQESCAPE_CONN */ /* PostgreSQL 8.1.4 or later */ /* #undef HAVE_PQESCAPE_BYTEA_CONN */ /* Whether libpq is compiled with --enable-multibyte */ /* #undef HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT */ /* PostgreSQL 8.1 or later */ /* #undef HAVE_PG_LO_CREATE */ /* PostgreSQL 8.4 or later */ /* #undef HAVE_PG_LO_IMPORT_WITH_OID */ /* Whether to build pgsql as dynamic module */ /* #undef COMPILE_DL_PGSQL */ /* Whether to build phar as dynamic module */ /* #undef COMPILE_DL_PHAR */ /* */ #define PHAR_HASH_OK 1 /* */ /* #undef PHAR_HAVE_OPENSSL */ /* whether to include POSIX-like functions */ #define HAVE_POSIX 1 /* Whether to build posix as dynamic module */ /* #undef COMPILE_DL_POSIX */ /* Whether you have a working ttyname_r */ /* #undef HAVE_TTYNAME_R */ /* Wether struct utsname has domainname */ /* #undef HAVE_UTSNAME_DOMAINNAME */ /* Whether to build pspell as dynamic module */ /* #undef COMPILE_DL_PSPELL */ /* */ /* #undef HAVE_PSPELL */ /* */ #define HAVE_RL_CALLBACK_READ_CHAR 1 /* */ #define HAVE_LIBREADLINE 1 /* */ /* #undef HAVE_LIBEDIT */ /* Whether to build readline as dynamic module */ /* #undef COMPILE_DL_READLINE */ /* Whether we have librecode 3.5 */ /* #undef HAVE_BROKEN_RECODE */ /* Whether we have librecode 3.5 or higher */ /* #undef HAVE_LIBRECODE */ /* Whether to build recode as dynamic module */ /* #undef COMPILE_DL_RECODE */ /* Whether Reflection is enabled */ #define HAVE_REFLECTION 1 /* Whether to build reflection as dynamic module */ /* #undef COMPILE_DL_REFLECTION */ /* */ #define HAVE_PWRITE 1 /* whether pwrite64 is default */ /* #undef PHP_PWRITE_64 */ /* */ #define HAVE_PREAD 1 /* whether pread64 is default */ /* #undef PHP_PREAD_64 */ /* Whether to build session as dynamic module */ /* #undef COMPILE_DL_SESSION */ /* */ #define HAVE_PHP_SESSION 1 /* Whether you have libmm */ /* #undef HAVE_LIBMM */ /* */ /* #undef HAVE_SHMOP */ /* Whether to build shmop as dynamic module */ /* #undef COMPILE_DL_SHMOP */ /* */ #define HAVE_LIBXML 1 /* */ #define HAVE_SIMPLEXML 1 /* Whether to build simplexml as dynamic module */ /* #undef COMPILE_DL_SIMPLEXML */ /* */ /* #undef HAVE_NET_SNMP */ /* */ /* #undef HAVE_SNMP_PARSE_OID */ /* */ /* #undef HAVE_SNMP */ /* */ /* #undef UCD_SNMP_HACK */ /* Whether to build snmp as dynamic module */ /* #undef COMPILE_DL_SNMP */ /* */ #define HAVE_LIBXML 1 /* */ #define HAVE_SOAP 1 /* Whether to build soap as dynamic module */ /* #undef COMPILE_DL_SOAP */ /* Whether you have struct cmsghdr */ #define HAVE_CMSGHDR 1 /* */ #define MISSING_MSGHDR_MSGFLAGS 1 /* */ #define HAVE_SOCKETS 1 /* Whether to build sockets as dynamic module */ /* #undef COMPILE_DL_SOCKETS */ /* Whether struct _zend_object_value is packed */ #define HAVE_PACKED_OBJECT_VALUE 1 /* Whether you want SPL (Standard PHP Library) support */ #define HAVE_SPL 1 /* Whether to build spl as dynamic module */ /* #undef COMPILE_DL_SPL */ /* Have PDO */ #define PHP_SQLITE2_HAVE_PDO 1 /* Whether to build sqlite as dynamic module */ /* #undef COMPILE_DL_SQLITE */ /* Size of a pointer */ #define SQLITE_PTR_SZ SIZEOF_CHAR_P /* */ /* #undef SQLITE_UTF8 */ /* Define if flush should be called explicitly after a buffered io. */ #define HAVE_FLUSHIO 1 /* */ #define HAVE_CRYPT 1 /* whether the compiler supports __alignof__ */ #define HAVE_ALIGNOF 1 /* whether the compiler supports __attribute__ ((__aligned__)) */ #define HAVE_ATTRIBUTE_ALIGNED 1 /* Whether PHP has to use its own crypt_r for blowfish, des, ext des and md5 */ #define PHP_USE_PHP_CRYPT_R 1 /* Whether the system supports standard DES salt */ #define PHP_STD_DES_CRYPT 1 /* Whether the system supports BlowFish salt */ #define PHP_BLOWFISH_CRYPT 1 /* Whether the system supports extended DES salt */ #define PHP_EXT_DES_CRYPT 1 /* Whether the system supports MD5 salt */ #define PHP_MD5_CRYPT 1 /* Whether the system supports SHA512 salt */ #define PHP_SHA512_CRYPT 1 /* Whether the system supports SHA256 salt */ #define PHP_SHA256_CRYPT 1 /* Whether the system supports standard DES salt */ #define PHP_STD_DES_CRYPT 1 /* Whether the system supports BlowFish salt */ #define PHP_BLOWFISH_CRYPT 1 /* Whether the system supports extended DES salt */ #define PHP_EXT_DES_CRYPT 1 /* Whether the system supports MD5 salt */ #define PHP_MD5_CRYPT 1 /* Whether the system supports SHA512 salt */ #define PHP_SHA512_CRYPT 1 /* Whether the system supports SHA256 salt */ #define PHP_SHA256_CRYPT 1 /* Whether PHP has to use its own crypt_r for blowfish, des and ext des */ #define PHP_USE_PHP_CRYPT_R 1 /* Define if your system has fork/vfork/CreateProcess */ #define PHP_CAN_SUPPORT_PROC_OPEN 1 /* Whether to enable chroot() function */ /* #undef ENABLE_CHROOT_FUNC */ /* */ #define HAVE_RES_NSEARCH 1 /* */ #define HAVE_RES_NSEARCH 1 /* */ #define HAVE_LIBRESOLV 1 /* */ #define HAVE_RES_NSEARCH 1 /* */ /* #undef HAVE_LIBBIND */ /* */ #define HAVE_RES_NSEARCH 1 /* */ #define HAVE_LIBSOCKET 1 /* */ /* #undef HAVE_DNS_SEARCH */ /* */ /* #undef HAVE_DNS_SEARCH */ /* */ #define HAVE_LIBRESOLV 1 /* */ /* #undef HAVE_DNS_SEARCH */ /* */ /* #undef HAVE_LIBBIND */ /* */ /* #undef HAVE_DNS_SEARCH */ /* */ #define HAVE_LIBSOCKET 1 /* */ #define HAVE_DN_EXPAND 1 /* */ #define HAVE_DN_EXPAND 1 /* */ #define HAVE_LIBRESOLV 1 /* */ #define HAVE_DN_EXPAND 1 /* */ /* #undef HAVE_LIBBIND */ /* */ #define HAVE_DN_EXPAND 1 /* */ #define HAVE_LIBSOCKET 1 /* */ #define HAVE_DN_SKIPNAME 1 /* */ #define HAVE_DN_SKIPNAME 1 /* */ #define HAVE_LIBRESOLV 1 /* */ #define HAVE_DN_SKIPNAME 1 /* */ /* #undef HAVE_LIBBIND */ /* */ #define HAVE_DN_SKIPNAME 1 /* */ #define HAVE_LIBSOCKET 1 /* */ #define HAVE_RES_SEARCH 1 /* */ #define HAVE_RES_SEARCH 1 /* */ #define HAVE_LIBRESOLV 1 /* */ #define HAVE_RES_SEARCH 1 /* */ /* #undef HAVE_LIBBIND */ /* */ #define HAVE_RES_SEARCH 1 /* */ #define HAVE_LIBSOCKET 1 /* whether atof() accepts NAN */ #define HAVE_ATOF_ACCEPTS_NAN 1 /* whether atof() accepts INF */ /* #undef HAVE_ATOF_ACCEPTS_INF */ /* whether HUGE_VAL == INF */ #define HAVE_HUGE_VAL_INF 1 /* whether HUGE_VAL + -HUGEVAL == NAN */ #define HAVE_HUGE_VAL_NAN 1 /* whether strptime() declaration fails */ #define HAVE_STRPTIME_DECL_FAILS 1 /* Define if your system has mbstate_t in wchar.h */ /* #undef HAVE_MBSTATE_T */ /* Whether to build standard as dynamic module */ /* #undef COMPILE_DL_STANDARD */ /* */ /* #undef HAVE_SYBASE_CT */ /* Whether to build sybase_ct as dynamic module */ /* #undef COMPILE_DL_SYBASE_CT */ /* */ /* #undef HAVE_SYSVMSG */ /* Whether to build sysvmsg as dynamic module */ /* #undef COMPILE_DL_SYSVMSG */ /* Whether to build sysvsem as dynamic module */ /* #undef COMPILE_DL_SYSVSEM */ /* */ /* #undef HAVE_SYSVSEM */ /* */ /* #undef HAVE_SEMUN */ /* */ /* #undef HAVE_SEMUN */ /* */ /* #undef HAVE_SYSVSHM */ /* Whether to build sysvshm as dynamic module */ /* #undef COMPILE_DL_SYSVSHM */ /* */ /* #undef HAVE_TIDYOPTGETDOC */ /* Whether to build tidy as dynamic module */ /* #undef COMPILE_DL_TIDY */ /* */ /* #undef HAVE_TIDY */ /* Whether to build tokenizer as dynamic module */ /* #undef COMPILE_DL_TOKENIZER */ /* */ #define HAVE_LIBXML 1 /* */ /* #undef HAVE_LIBEXPAT */ /* */ /* #undef HAVE_WDDX */ /* Whether to build wddx as dynamic module */ /* #undef COMPILE_DL_WDDX */ /* */ #define HAVE_LIBXML 1 /* */ /* #undef HAVE_LIBEXPAT */ /* Whether to build xml as dynamic module */ /* #undef COMPILE_DL_XML */ /* */ #define HAVE_XML 1 /* */ #define HAVE_LIBXML 1 /* */ #define HAVE_XMLREADER 1 /* Whether to build xmlreader as dynamic module */ /* #undef COMPILE_DL_XMLREADER */ /* */ /* #undef HAVE_XMLRPC */ /* */ #define HAVE_LIBXML 1 /* */ /* #undef HAVE_LIBEXPAT */ /* */ /* #undef HAVE_LIBICONV */ /* */ /* #undef HAVE_GICONV_H */ /* */ /* #undef HAVE_LIBICONV */ /* iconv() is aliased to libiconv() in -liconv */ /* #undef ICONV_ALIASED_LIBICONV */ /* */ #define HAVE_ICONV 1 /* */ /* #undef UNDEF_THREADS_HACK */ /* Whether to build xmlrpc as dynamic module */ /* #undef COMPILE_DL_XMLRPC */ /* Whether to build xmlrpc as dynamic module */ /* #undef COMPILE_DL_XMLRPC */ /* */ #define HAVE_LIBXML 1 /* */ #define HAVE_XMLWRITER 1 /* Whether to build xmlwriter as dynamic module */ /* #undef COMPILE_DL_XMLWRITER */ /* */ #define HAVE_XSL_EXSLT 1 /* */ #define HAVE_XSL 1 /* Whether to build xsl as dynamic module */ /* #undef COMPILE_DL_XSL */ /* */ #define HAVE_ZIP 1 /* Whether to build zip as dynamic module */ /* #undef COMPILE_DL_ZIP */ /* Whether to build mysqlnd as dynamic module */ /* #undef COMPILE_DL_MYSQLND */ /* Enable compressed protocol support */ /* #undef MYSQLND_COMPRESSION_ENABLED */ /* Enable SSL support */ /* #undef MYSQLND_SSL_SUPPORTED */ /* Define if int32_t type is present. */ #define HAVE_INT32_T 1 /* Define if uint32_t type is present. */ #define HAVE_UINT32_T 1 /* Whether sprintf is broken */ #define ZEND_BROKEN_SPRINTF 0 /* whether floatingpoint.h defines fp_except */ /* #undef HAVE_FP_EXCEPT */ /* whether _FPU_SETCW is present and usable */ /* #undef HAVE__FPU_SETCW */ /* whether fpsetprec is present and usable */ /* #undef HAVE_FPSETPREC */ /* whether _controlfp is present usable */ /* #undef HAVE__CONTROLFP */ /* whether _controlfp_s is present and usable */ /* #undef HAVE__CONTROLFP_S */ /* whether FPU control word can be manipulated by inline assembler */ #define HAVE_FPU_INLINE_ASM_X86 1 /* Define if double cast to long preserves least significant bits */ /* #undef ZEND_DVAL_TO_LVAL_CAST_OK */ /* Define if dlsym() requires a leading underscore in symbol names. */ /* #undef DLSYM_NEEDS_UNDERSCORE */ /* virtual machine dispatch method */ #define ZEND_VM_KIND ZEND_VM_KIND_CALL /* virtual machine dispatch method */ #define ZEND_VM_KIND ZEND_VM_KIND_CALL /* virtual machine dispatch method */ #define ZEND_VM_KIND ZEND_VM_KIND_CALL /* */ #define ZEND_DEBUG 0 /* */ #define ZEND_DEBUG 0 /* */ /* #undef ZTS */ /* */ /* #undef ZEND_MULTIBYTE */ /* Define if the target system is darwin */ /* #undef DARWIN */ /* */ #define ZEND_MM_ALIGNMENT 8 /* */ #define ZEND_MM_ALIGNMENT_LOG2 3 /* Define if the target system has support for memory allocation using mmap(MAP_ANON) */ #define HAVE_MEM_MMAP_ANON 1 /* Define if the target system has support for memory allocation using mmap(/dev/zero) */ #define HAVE_MEM_MMAP_ZERO 1 /* */ /* #undef ZTS */ /* Whether you use GNU Pth */ /* #undef GNUPTH */ /* */ /* #undef TSRM_ST */ /* Whether to use native BeOS threads */ /* #undef BETHREADS */ /* Whether to use Pthreads */ /* #undef PTHREADS */ /* PHP build date */ #define PHP_BUILD_DATE "2011-05-04" /* hardcode for each of the cross compiler host */ #define PHP_OS "SunOS" /* hardcode for each of the cross compiler host */ #define PHP_UNAME "SunOS lap 5.11 snv_134 i86pc i386 i86pc" /* uname -a output */ #define PHP_UNAME "SunOS lap 5.11 snv_134 i86pc i386 i86pc" /* uname output */ #define PHP_OS "SunOS" /* */ #define HAVE_BUILD_DEFS_H 1 #ifndef ZEND_ACCONFIG_H_NO_C_PROTOS #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_SELECT_H #include #endif #ifdef HAVE_IEEEFP_H # include #endif #ifdef HAVE_STRING_H # include #else # include #endif #if ZEND_BROKEN_SPRINTF int zend_sprintf(char *buffer, const char *format, ...); #else # define zend_sprintf sprintf #endif #include /* To enable the is_nan, is_infinite and is_finite PHP functions */ #ifdef NETWARE #define HAVE_ISNAN 1 #define HAVE_ISINF 1 #define HAVE_ISFINITE 1 #endif #ifndef zend_isnan #ifdef HAVE_ISNAN #define zend_isnan(a) isnan(a) #elif defined(HAVE_FPCLASS) #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN)) #else #define zend_isnan(a) 0 #endif #endif #ifdef HAVE_ISINF #define zend_isinf(a) isinf(a) #elif defined(INFINITY) /* Might not work, but is required by ISO C99 */ #define zend_isinf(a) (((a)==INFINITY)?1:0) #elif defined(HAVE_FPCLASS) #define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF)) #else #define zend_isinf(a) 0 #endif #ifdef HAVE_FINITE #define zend_finite(a) finite(a) #elif defined(HAVE_ISFINITE) || defined(isfinite) #define zend_finite(a) isfinite(a) #elif defined(fpclassify) #define zend_finite(a) ((fpclassify((a))!=FP_INFINITE&&fpclassify((a))!=FP_NAN)?1:0) #else #define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1) #endif #endif /* ifndef ZEND_ACCONFIG_H_NO_C_PROTOS */ #ifdef NETWARE #ifdef USE_WINSOCK #/*This detection against winsock is of no use*/ undef HAVE_SOCKLEN_T #/*This detection against winsock is of no use*/ undef HAVE_SYS_SOCKET_H #endif #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ /* #undef PTHREADS */ 07070100180de2000081a40000000000000000000000014dc0f41300000633000000b600010002ffffffffffffffff0000002c00000000root/usr/local/include/php/main/php_logos.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: | +----------------------------------------------------------------------+ */ /* $Id: php_logos.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef _PHP_LOGOS_H #define _PHP_LOGOS_H BEGIN_EXTERN_C() PHPAPI int php_register_info_logo(char *logo_string, const char *mimetype, const unsigned char *data, int size); PHPAPI int php_unregister_info_logo(char *logo_string); END_EXTERN_C() int php_init_info_logos(void); int php_shutdown_info_logos(void); int php_info_logos(const char *logo_string TSRMLS_DC); #endif /* _PHP_LOGOS_H */ 07070100180de1000081a40000000000000000000000014dc0f41300000edd000000b600010002ffffffffffffffff0000002a00000000root/usr/local/include/php/main/php_ini.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: php_ini.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef PHP_INI_H #define PHP_INI_H #include "zend_ini.h" BEGIN_EXTERN_C() PHPAPI void config_zval_dtor(zval *zvalue); int php_init_config(TSRMLS_D); int php_shutdown_config(void); void php_ini_register_extensions(TSRMLS_D); PHPAPI zval *cfg_get_entry(const char *name, uint name_length); PHPAPI int cfg_get_long(const char *varname, long *result); PHPAPI int cfg_get_double(const char *varname, double *result); PHPAPI int cfg_get_string(const char *varname, char **result); PHPAPI int php_parse_user_ini_file(const char *dirname, char *ini_filename, HashTable *target_hash TSRMLS_DC); PHPAPI void php_ini_activate_config(HashTable *source_hash, int modify_type, int stage TSRMLS_DC); PHPAPI int php_ini_has_per_dir_config(void); PHPAPI int php_ini_has_per_host_config(void); PHPAPI void php_ini_activate_per_dir_config(char *path, uint path_len TSRMLS_DC); PHPAPI void php_ini_activate_per_host_config(const char *host, uint host_len TSRMLS_DC); PHPAPI HashTable* php_ini_get_configuration_hash(void); END_EXTERN_C() #define PHP_INI_USER ZEND_INI_USER #define PHP_INI_PERDIR ZEND_INI_PERDIR #define PHP_INI_SYSTEM ZEND_INI_SYSTEM #define PHP_INI_ALL ZEND_INI_ALL #define php_ini_entry zend_ini_entry #define PHP_INI_MH ZEND_INI_MH #define PHP_INI_DISP ZEND_INI_DISP #define PHP_INI_BEGIN ZEND_INI_BEGIN #define PHP_INI_END ZEND_INI_END #define PHP_INI_ENTRY3_EX ZEND_INI_ENTRY3_EX #define PHP_INI_ENTRY3 ZEND_INI_ENTRY3 #define PHP_INI_ENTRY2_EX ZEND_INI_ENTRY2_EX #define PHP_INI_ENTRY2 ZEND_INI_ENTRY2 #define PHP_INI_ENTRY1_EX ZEND_INI_ENTRY1_EX #define PHP_INI_ENTRY1 ZEND_INI_ENTRY1 #define PHP_INI_ENTRY_EX ZEND_INI_ENTRY_EX #define PHP_INI_ENTRY ZEND_INI_ENTRY #define STD_PHP_INI_ENTRY STD_ZEND_INI_ENTRY #define STD_PHP_INI_ENTRY_EX STD_ZEND_INI_ENTRY_EX #define STD_PHP_INI_BOOLEAN STD_ZEND_INI_BOOLEAN #define PHP_INI_DISPLAY_ORIG ZEND_INI_DISPLAY_ORIG #define PHP_INI_DISPLAY_ACTIVE ZEND_INI_DISPLAY_ACTIVE #define PHP_INI_STAGE_STARTUP ZEND_INI_STAGE_STARTUP #define PHP_INI_STAGE_SHUTDOWN ZEND_INI_STAGE_SHUTDOWN #define PHP_INI_STAGE_ACTIVATE ZEND_INI_STAGE_ACTIVATE #define PHP_INI_STAGE_DEACTIVATE ZEND_INI_STAGE_DEACTIVATE #define PHP_INI_STAGE_RUNTIME ZEND_INI_STAGE_RUNTIME #define PHP_INI_STAGE_HTACCESS ZEND_INI_STAGE_HTACCESS #define php_ini_boolean_displayer_cb zend_ini_boolean_displayer_cb #define php_ini_color_displayer_cb zend_ini_color_displayer_cb #define php_alter_ini_entry zend_alter_ini_entry #define php_ini_long zend_ini_long #define php_ini_double zend_ini_double #define php_ini_string zend_ini_string #endif /* PHP_INI_H */ 07070100180dfd000081a40000000000000000000000014dc0f41300000684000000b600010002ffffffffffffffff0000004300000000root/usr/local/include/php/main/win32_internal_function_disabled.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Pierre A. Joye | +----------------------------------------------------------------------+ */ /* $Id: win32_internal_function_disabled.h 306939 2011-01-01 02:19:59Z felipe $ */ /* 5 means the min version is 5 (XP/2000), 6 (2k8/vista), etc. */ /* Windows Server 2008 6.0 Windows Vista 6.0 Windows Server 2003 R2 5.2 Windows Server 2003 5.2 Windows XP 5.1 Windows 2000 5.0 */ static const char *function_name_5[] = {"link", NULL}; const int function_name_cnt_5 = 1; static const char *function_name_6[] = {"readlink", "symlink", NULL}; const int function_name_cnt_6 = 2; 07070100180de6000081a40000000000000000000000014dc0f4130000070e000000b600010002ffffffffffffffff0000003a00000000root/usr/local/include/php/main/php_open_temporary_file.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: php_open_temporary_file.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef PHP_OPEN_TEMPORARY_FILE_H #define PHP_OPEN_TEMPORARY_FILE_H BEGIN_EXTERN_C() PHPAPI FILE *php_open_temporary_file(const char *dir, const char *pfx, char **opened_path_p TSRMLS_DC); PHPAPI int php_open_temporary_fd_ex(const char *dir, const char *pfx, char **opened_path_p, zend_bool open_basedir_check TSRMLS_DC); PHPAPI int php_open_temporary_fd(const char *dir, const char *pfx, char **opened_path_p TSRMLS_DC); PHPAPI const char *php_get_temporary_directory(void); PHPAPI void php_shutdown_temporary_directory(void); END_EXTERN_C() #endif /* PHP_OPEN_TEMPORARY_FILE_H */ 07070100180df1000081a40000000000000000000000014dc0f41300001ba5000000b600010002ffffffffffffffff0000002b00000000root/usr/local/include/php/main/snprintf.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Stig Sæther Bakken | | Marcus Boerger | +----------------------------------------------------------------------+ */ /* $Id: snprintf.h 308525 2011-02-21 06:53:24Z cataphract $ */ /* Comparing: sprintf, snprintf, slprintf, spprintf sprintf offers the ability to make a lot of failures since it does not know the size of the buffer it uses. Therefore usage of sprintf often results in possible entries for buffer overrun attacks. So please use this version only if you are sure the call is safe. sprintf allways terminstes the buffer it writes to. snprintf knows the buffers size and will not write behind it. But you will have to use either a static buffer or allocate a dynamic buffer before beeing able to call the function. In other words you must be sure that you really know the maximum size of the buffer required. A bad thing is having a big maximum while in most cases you would only need a small buffer. If the size of the resulting string is longer or equal to the buffer size than the buffer is not terminated. The function also returns the number of chars not including the terminating \0 that were needed to fully comply to the print request. slprintf same as snprintf with the difference that it actually returns the length printed not including the terminating \0. spprintf is the dynamical version of snprintf. It allocates the buffer in size as needed and allows a maximum setting as snprintf (turn this feature off by setting max_len to 0). spprintf is a little bit slower than snprintf and offers possible memory leakes if you miss freeing the buffer allocated by the function. Therfore this function should be used where either no maximum is known or the maximum is much bigger than normal size required. spprintf allways terminates the buffer. Example: #define MAX 1024 | #define MAX 1024 | #define MAX 1024 char buffer[MAX] | char buffer[MAX] | char *buffer; | | | | // No need to initialize buffer: | | // spprintf ignores value of buffer sprintf(buffer, "test"); | snprintf(buffer, MAX, "test"); | spprintf(&buffer, MAX, "text"); | | if (!buffer) | | return OUT_OF_MEMORY // sprintf allways terminates | // manual termination of | // spprintf allays terminates buffer // buffer | // buffer *IS* required | | buffer[MAX-1] = 0; | action_with_buffer(buffer); | action_with_buffer(buffer); | action_with_buffer(buffer); | | efree(buffer); */ #ifndef SNPRINTF_H #define SNPRINTF_H typedef int bool_int; typedef enum { NO = 0, YES = 1 } boolean_e; BEGIN_EXTERN_C() PHPAPI int ap_php_slprintf(char *buf, size_t len, const char *format,...); PHPAPI int ap_php_vslprintf(char *buf, size_t len, const char *format, va_list ap); PHPAPI int ap_php_snprintf(char *, size_t, const char *, ...); PHPAPI int ap_php_vsnprintf(char *, size_t, const char *, va_list ap); PHPAPI int ap_php_vasprintf(char **buf, const char *format, va_list ap); PHPAPI int ap_php_asprintf(char **buf, const char *format, ...); PHPAPI int php_sprintf (char* s, const char* format, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3); PHPAPI char * php_gcvt(double value, int ndigit, char dec_point, char exponent, char *buf); PHPAPI char * php_conv_fp(register char format, register double num, boolean_e add_dp, int precision, char dec_point, bool_int * is_negative, char *buf, int *len); END_EXTERN_C() #ifdef slprintf #undef slprintf #endif #define slprintf ap_php_slprintf #ifdef vslprintf #undef vslprintf #endif #define vslprintf ap_php_vslprintf #ifdef snprintf #undef snprintf #endif #define snprintf ap_php_snprintf #ifdef vsnprintf #undef vsnprintf #endif #define vsnprintf ap_php_vsnprintf #ifndef HAVE_VASPRINTF #define vasprintf ap_php_vasprintf #endif #ifndef HAVE_ASPRINTF #define asprintf ap_php_asprintf #endif #ifdef sprintf #undef sprintf #endif #define sprintf php_sprintf typedef enum { LM_STD = 0, #if SIZEOF_INTMAX_T LM_INTMAX_T, #endif #if SIZEOF_PTRDIFF_T LM_PTRDIFF_T, #endif #if SIZEOF_LONG_LONG LM_LONG_LONG, #endif LM_SIZE_T, LM_LONG, LM_LONG_DOUBLE } length_modifier_e; #ifdef PHP_WIN32 # define WIDE_INT __int64 #elif SIZEOF_LONG_LONG_INT # define WIDE_INT long long int #elif SIZEOF_LONG_LONG # define WIDE_INT long long #else # define WIDE_INT long #endif typedef WIDE_INT wide_int; typedef unsigned WIDE_INT u_wide_int; extern char * ap_php_conv_10(register wide_int num, register bool_int is_unsigned, register bool_int * is_negative, char *buf_end, register int *len); extern char * ap_php_conv_p2(register u_wide_int num, register int nbits, char format, char *buf_end, register int *len); /* The maximum precision that's allowed for float conversion. Does not include * decimal separator, exponent, sign, terminator. Currently does not affect * the modes e/f, only g/k/H, as those have a different limit enforced at * another level (see NDIG in php_conv_fp()). * Applies to the formatting functions of both spprintf.c and snprintf.c, which * use equally sized buffers of MAX_BUF_SIZE = 512 to hold the result of the * call to php_gcvt(). * This should be reasonably smaller than MAX_BUF_SIZE (I think MAX_BUF_SIZE - 9 * should be enough, but let's give some more space) */ #define FORMAT_CONV_MAX_PRECISION 500 #endif /* SNPRINTF_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: */ 07070100180ded000081a40000000000000000000000014dc0f41300000831000000b600010002ffffffffffffffff0000003000000000root/usr/local/include/php/main/php_variables.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Rasmus Lerdorf | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: php_variables.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef PHP_VARIABLES_H #define PHP_VARIABLES_H #include "php.h" #include "SAPI.h" #define PARSE_POST 0 #define PARSE_GET 1 #define PARSE_COOKIE 2 #define PARSE_STRING 3 #define PARSE_ENV 4 #define PARSE_SERVER 5 #define PARSE_SESSION 6 BEGIN_EXTERN_C() void php_startup_auto_globals(TSRMLS_D); extern PHPAPI void (*php_import_environment_variables)(zval *array_ptr TSRMLS_DC); PHPAPI void php_register_variable(char *var, char *val, zval *track_vars_array TSRMLS_DC); /* binary-safe version */ PHPAPI void php_register_variable_safe(char *var, char *val, int val_len, zval *track_vars_array TSRMLS_DC); PHPAPI void php_register_variable_ex(char *var, zval *val, zval *track_vars_array TSRMLS_DC); int php_hash_environment(TSRMLS_D); END_EXTERN_C() #define NUM_TRACK_VARS 6 #endif /* PHP_VARIABLES_H */ 07070100180df0000081a40000000000000000000000014dc0f4130000071b000000b600010002ffffffffffffffff0000002c00000000root/usr/local/include/php/main/safe_mode.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: | +----------------------------------------------------------------------+ */ /* $Id: safe_mode.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef SAFE_MODE_H #define SAFE_MODE_H /* mode's for php_checkuid() */ #define CHECKUID_DISALLOW_FILE_NOT_EXISTS 0 #define CHECKUID_ALLOW_FILE_NOT_EXISTS 1 #define CHECKUID_CHECK_FILE_AND_DIR 2 #define CHECKUID_ALLOW_ONLY_DIR 3 #define CHECKUID_CHECK_MODE_PARAM 4 #define CHECKUID_ALLOW_ONLY_FILE 5 /* flags for php_checkuid_ex() */ #define CHECKUID_NO_ERRORS 0x01 BEGIN_EXTERN_C() PHPAPI int php_checkuid(const char *filename, const char *fopen_mode, int mode); PHPAPI int php_checkuid_ex(const char *filename, const char *fopen_mode, int mode, int flags); PHPAPI char *php_get_current_user(void); END_EXTERN_C() #endif 07070100180ddc000081a40000000000000000000000014dc0f413000046c1000000b600010002ffffffffffffffff0000002d00000000root/usr/local/include/php/main/php_compat.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: | +----------------------------------------------------------------------+ */ /* $Id: php_compat.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef PHP_COMPAT_H #define PHP_COMPAT_H #ifdef PHP_WIN32 #include "config.w32.h" #else #include #endif #if defined(HAVE_BUNDLED_PCRE) || !defined(PHP_VERSION) #define pcre_compile php_pcre_compile #define pcre_compile2 php_pcre_compile2 #define pcre_copy_substring php_pcre_copy_substring #define pcre_exec php_pcre_exec #define pcre_get_substring php_pcre_get_substring #define pcre_get_substring_list php_pcre_get_substring_list #define pcre_info php_pcre_info #define pcre_maketables php_pcre_maketables #define pcre_study php_pcre_study #define pcre_version php_pcre_version #define pcre_fullinfo php_pcre_fullinfo #define pcre_free php_pcre_free #define pcre_malloc php_pcre_malloc #define pcre_config php_pcre_config #define pcre_copy_named_substring php_pcre_copy_named_substring #define pcre_free_substring php_pcre_free_substring #define pcre_free_substring_list php_pcre_free_substring_list #define pcre_get_named_substring php_pcre_get_named_substring #define pcre_get_stringnumber php_pcre_get_stringnumber #define pcre_refcount php_pcre_refcount #define _pcre_ord2utf8 php__pcre_ord2utf8 #define _pcre_try_flipped php__pcre_try_flipped #define _pcre_valid_utf8 php__pcre_valid_utf8 #define _pcre_xclass php__pcre_xclass #define pcre_callout php_pcre_callout #define _pcre_OP_lengths php__pcre_OP_lengths #define _pcre_utt_names php__pcre_utt_names #define _pcre_default_tables php__pcre_default_tables #define pcre_get_stringtable_entries php_pcre_get_stringtable_entries #define _pcre_is_newline php__pcre_is_newline #define pcre_stack_free php_pcre_stack_free #define pcre_stack_malloc php_pcre_stack_malloc #define _pcre_utf8_table1 php__pcre_utf8_table1 #define _pcre_utf8_table1_size php__pcre_utf8_table1_size #define _pcre_utf8_table2 php__pcre_utf8_table2 #define _pcre_utf8_table3 php__pcre_utf8_table3 #define _pcre_utf8_table4 php__pcre_utf8_table4 #define _pcre_utt php__pcre_utt #define _pcre_utt_size php__pcre_utt_size #define _pcre_was_newline php__pcre_was_newline #define _pcre_ucd_records php__pcre_ucd_records #define _pcre_ucd_stage1 php__pcre_ucd_stage1 #define _pcre_ucd_stage2 php__pcre_ucd_stage2 #define _pcre_ucp_gentype php__pcre_ucp_gentype #endif #define lookup php_lookup #define hashTableInit php_hashTableInit #define hashTableDestroy php_hashTableDestroy #define hashTableIterInit php_hashTableIterInit #define hashTableIterNext php_hashTableIterNext #if defined(HAVE_LIBXML) && (defined(HAVE_XML) || defined(HAVE_XMLRPC)) && !defined(HAVE_LIBEXPAT) #define XML_DefaultCurrent php_XML_DefaultCurrent #define XML_ErrorString php_XML_ErrorString #define XML_ExpatVersion php_XML_ExpatVersion #define XML_ExpatVersionInfo php_XML_ExpatVersionInfo #define XML_ExternalEntityParserCreate php_XML_ExternalEntityParserCreate #define XML_GetBase php_XML_GetBase #define XML_GetBuffer php_XML_GetBuffer #define XML_GetCurrentByteCount php_XML_GetCurrentByteCount #define XML_GetCurrentByteIndex php_XML_GetCurrentByteIndex #define XML_GetCurrentColumnNumber php_XML_GetCurrentColumnNumber #define XML_GetCurrentLineNumber php_XML_GetCurrentLineNumber #define XML_GetErrorCode php_XML_GetErrorCode #define XML_GetIdAttributeIndex php_XML_GetIdAttributeIndex #define XML_GetInputContext php_XML_GetInputContext #define XML_GetSpecifiedAttributeCount php_XML_GetSpecifiedAttributeCount #define XmlGetUtf16InternalEncodingNS php_XmlGetUtf16InternalEncodingNS #define XmlGetUtf16InternalEncoding php_XmlGetUtf16InternalEncoding #define XmlGetUtf8InternalEncodingNS php_XmlGetUtf8InternalEncodingNS #define XmlGetUtf8InternalEncoding php_XmlGetUtf8InternalEncoding #define XmlInitEncoding php_XmlInitEncoding #define XmlInitEncodingNS php_XmlInitEncodingNS #define XmlInitUnknownEncoding php_XmlInitUnknownEncoding #define XmlInitUnknownEncodingNS php_XmlInitUnknownEncodingNS #define XML_ParseBuffer php_XML_ParseBuffer #define XML_Parse php_XML_Parse #define XML_ParserCreate_MM php_XML_ParserCreate_MM #define XML_ParserCreateNS php_XML_ParserCreateNS #define XML_ParserCreate php_XML_ParserCreate #define XML_ParserFree php_XML_ParserFree #define XmlParseXmlDecl php_XmlParseXmlDecl #define XmlParseXmlDeclNS php_XmlParseXmlDeclNS #define XmlPrologStateInitExternalEntity php_XmlPrologStateInitExternalEntity #define XmlPrologStateInit php_XmlPrologStateInit #define XML_SetAttlistDeclHandler php_XML_SetAttlistDeclHandler #define XML_SetBase php_XML_SetBase #define XML_SetCdataSectionHandler php_XML_SetCdataSectionHandler #define XML_SetCharacterDataHandler php_XML_SetCharacterDataHandler #define XML_SetCommentHandler php_XML_SetCommentHandler #define XML_SetDefaultHandlerExpand php_XML_SetDefaultHandlerExpand #define XML_SetDefaultHandler php_XML_SetDefaultHandler #define XML_SetDoctypeDeclHandler php_XML_SetDoctypeDeclHandler #define XML_SetElementDeclHandler php_XML_SetElementDeclHandler #define XML_SetElementHandler php_XML_SetElementHandler #define XML_SetEncoding php_XML_SetEncoding #define XML_SetEndCdataSectionHandler php_XML_SetEndCdataSectionHandler #define XML_SetEndDoctypeDeclHandler php_XML_SetEndDoctypeDeclHandler #define XML_SetEndElementHandler php_XML_SetEndElementHandler #define XML_SetEndNamespaceDeclHandler php_XML_SetEndNamespaceDeclHandler #define XML_SetEntityDeclHandler php_XML_SetEntityDeclHandler #define XML_SetExternalEntityRefHandlerArg php_XML_SetExternalEntityRefHandlerArg #define XML_SetExternalEntityRefHandler php_XML_SetExternalEntityRefHandler #define XML_SetNamespaceDeclHandler php_XML_SetNamespaceDeclHandler #define XML_SetNotationDeclHandler php_XML_SetNotationDeclHandler #define XML_SetNotStandaloneHandler php_XML_SetNotStandaloneHandler #define XML_SetParamEntityParsing php_XML_SetParamEntityParsing #define XML_SetProcessingInstructionHandler php_XML_SetProcessingInstructionHandler #define XML_SetReturnNSTriplet php_XML_SetReturnNSTriplet #define XML_SetStartCdataSectionHandler php_XML_SetStartCdataSectionHandler #define XML_SetStartDoctypeDeclHandler php_XML_SetStartDoctypeDeclHandler #define XML_SetStartElementHandler php_XML_SetStartElementHandler #define XML_SetStartNamespaceDeclHandler php_XML_SetStartNamespaceDeclHandler #define XML_SetUnknownEncodingHandler php_XML_SetUnknownEncodingHandler #define XML_SetUnparsedEntityDeclHandler php_XML_SetUnparsedEntityDeclHandler #define XML_SetUserData php_XML_SetUserData #define XML_SetXmlDeclHandler php_XML_SetXmlDeclHandler #define XmlSizeOfUnknownEncoding php_XmlSizeOfUnknownEncoding #define XML_UseParserAsHandlerArg php_XML_UseParserAsHandlerArg #define XmlUtf16Encode php_XmlUtf16Encode #define XmlUtf8Encode php_XmlUtf8Encode #define XML_FreeContentModel php_XML_FreeContentModel #define XML_MemMalloc php_XML_MemMalloc #define XML_MemRealloc php_XML_MemRealloc #define XML_MemFree php_XML_MemFree #define XML_UseForeignDTD php_XML_UseForeignDTD #define XML_GetFeatureList php_XML_GetFeatureList #define XML_ParserReset php_XML_ParserReset #ifdef HAVE_GD_BUNDLED #define any2eucjp php_gd_any2eucjp #define createwbmp php_gd_createwbmp #define empty_output_buffer php_gd_empty_output_buffer #define fill_input_buffer php_gd_fill_input_buffer #define freewbmp php_gd_freewbmp #define gdAlphaBlend php_gd_gdAlphaBlend #define gdCompareInt php_gd_gdCompareInt #define gdCosT php_gd_gdCosT #define gdCtxPrintf php_gd_gdCtxPrintf #define gdDPExtractData php_gd_gdDPExtractData #define gdFontGetGiant php_gd_gdFontGetGiant #define gdFontGetLarge php_gd_gdFontGetLarge #define gdFontGetMediumBold php_gd_gdFontGetMediumBold #define gdFontGetSmall php_gd_gdFontGetSmall #define gdFontGetTiny php_gd_gdFontGetTiny #define gdFontGiant php_gd_gdFontGiant #define gdFontGiantData php_gd_gdFontGiantData #define gdFontGiantRep php_gd_gdFontGiantRep #define gdFontLarge php_gd_gdFontLarge #define gdFontLargeData php_gd_gdFontLargeData #define gdFontLargeRep php_gd_gdFontLargeRep #define gdFontMediumBold php_gd_gdFontMediumBold #define gdFontMediumBoldData php_gd_gdFontMediumBoldData #define gdFontMediumBoldRep php_gd_gdFontMediumBoldRep #define gdFontSmall php_gd_gdFontSmall #define gdFontSmallData php_gd_gdFontSmallData #define gdFontSmallRep php_gd_gdFontSmallRep #define gdFontTiny php_gd_gdFontTiny #define gdFontTinyData php_gd_gdFontTinyData #define gdFontTinyRep php_gd_gdFontTinyRep #define gdGetBuf php_gd_gdGetBuf #define gdGetByte php_gd_gdGetByte #define gdGetC php_gd_gdGetC #define _gdGetColors php_gd__gdGetColors #define gd_getin php_gd_gd_getin #define gdGetInt php_gd_gdGetInt #define gdGetWord php_gd_gdGetWord #define gdImageAABlend php_gd_gdImageAABlend #define gdImageAALine php_gd_gdImageAALine #define gdImageAlphaBlending php_gd_gdImageAlphaBlending #define gdImageAntialias php_gd_gdImageAntialias #define gdImageArc php_gd_gdImageArc #define gdImageBrightness php_gd_gdImageBrightness #define gdImageChar php_gd_gdImageChar #define gdImageCharUp php_gd_gdImageCharUp #define gdImageColor php_gd_gdImageColor #define gdImageColorAllocate php_gd_gdImageColorAllocate #define gdImageColorAllocateAlpha php_gd_gdImageColorAllocateAlpha #define gdImageColorClosest php_gd_gdImageColorClosest #define gdImageColorClosestAlpha php_gd_gdImageColorClosestAlpha #define gdImageColorClosestHWB php_gd_gdImageColorClosestHWB #define gdImageColorDeallocate php_gd_gdImageColorDeallocate #define gdImageColorExact php_gd_gdImageColorExact #define gdImageColorExactAlpha php_gd_gdImageColorExactAlpha #define gdImageColorMatch php_gd_gdImageColorMatch #define gdImageColorResolve php_gd_gdImageColorResolve #define gdImageColorResolveAlpha php_gd_gdImageColorResolveAlpha #define gdImageColorTransparent php_gd_gdImageColorTransparent #define gdImageCompare php_gd_gdImageCompare #define gdImageContrast php_gd_gdImageContrast #define gdImageConvolution php_gd_gdImageConvolution #define gdImageCopy php_gd_gdImageCopy #define gdImageCopyMerge php_gd_gdImageCopyMerge #define gdImageCopyMergeGray php_gd_gdImageCopyMergeGray #define gdImageCopyResampled php_gd_gdImageCopyResampled #define gdImageCopyResized php_gd_gdImageCopyResized #define gdImageCreate php_gd_gdImageCreate #define gdImageCreateFromGd php_gd_gdImageCreateFromGd #define gdImageCreateFromGd2 php_gd_gdImageCreateFromGd2 #define gdImageCreateFromGd2Ctx php_gd_gdImageCreateFromGd2Ctx #define gdImageCreateFromGd2Part php_gd_gdImageCreateFromGd2Part #define gdImageCreateFromGd2PartCtx php_gd_gdImageCreateFromGd2PartCtx #define gdImageCreateFromGd2PartPtr php_gd_gdImageCreateFromGd2PartPtr #define gdImageCreateFromGd2Ptr php_gd_gdImageCreateFromGd2Ptr #define gdImageCreateFromGdCtx php_gd_gdImageCreateFromGdCtx #define gdImageCreateFromGdPtr php_gd_gdImageCreateFromGdPtr #define gdImageCreateFromGif php_gd_gdImageCreateFromGif #define gdImageCreateFromGifCtx php_gd_gdImageCreateFromGifCtx #define gdImageCreateFromGifSource php_gd_gdImageCreateFromGifSource #define gdImageCreateFromJpeg php_gd_gdImageCreateFromJpeg #define gdImageCreateFromJpegCtx php_gd_gdImageCreateFromJpegCtx #define gdImageCreateFromJpegPtr php_gd_gdImageCreateFromJpegPtr #define gdImageCreateFromPng php_gd_gdImageCreateFromPng #define gdImageCreateFromPngCtx php_gd_gdImageCreateFromPngCtx #define gdImageCreateFromPngPtr php_gd_gdImageCreateFromPngPtr #define gdImageCreateFromPngSource php_gd_gdImageCreateFromPngSource #define gdImageCreateFromWBMP php_gd_gdImageCreateFromWBMP #define gdImageCreateFromWBMPCtx php_gd_gdImageCreateFromWBMPCtx #define gdImageCreateFromWBMPPtr php_gd_gdImageCreateFromWBMPPtr #define gdImageCreateFromXbm php_gd_gdImageCreateFromXbm #define gdImageCreatePaletteFromTrueColor php_gd_gdImageCreatePaletteFromTrueColor #define gdImageCreateTrueColor php_gd_gdImageCreateTrueColor #define gdImageDashedLine php_gd_gdImageDashedLine #define gdImageDestroy php_gd_gdImageDestroy #define gdImageEdgeDetectQuick php_gd_gdImageEdgeDetectQuick #define gdImageEllipse php_gd_gdImageEllipse #define gdImageEmboss php_gd_gdImageEmboss #define gdImageFill php_gd_gdImageFill #define gdImageFilledArc php_gd_gdImageFilledArc #define gdImageFilledEllipse php_gd_gdImageFilledEllipse #define gdImageFilledPolygon php_gd_gdImageFilledPolygon #define gdImageFilledRectangle php_gd_gdImageFilledRectangle #define _gdImageFillTiled php_gd__gdImageFillTiled #define gdImageFillToBorder php_gd_gdImageFillToBorder #define gdImageGaussianBlur php_gd_gdImageGaussianBlur #define gdImageGd php_gd_gdImageGd #define gdImageGd2 php_gd_gdImageGd2 #define gdImageGd2Ptr php_gd_gdImageGd2Ptr #define gdImageGdPtr php_gd_gdImageGdPtr #define gdImageGetClip php_gd_gdImageGetClip #define gdImageGetPixel php_gd_gdImageGetPixel #define gdImageGetTrueColorPixel php_gd_gdImageGetTrueColorPixel #define gdImageGif php_gd_gdImageGif #define gdImageGifCtx php_gd_gdImageGifCtx #define gdImageGifPtr php_gd_gdImageGifPtr #define gdImageGrayScale php_gd_gdImageGrayScale #define gdImageInterlace php_gd_gdImageInterlace #define gdImageJpeg php_gd_gdImageJpeg #define gdImageJpegCtx php_gd_gdImageJpegCtx #define gdImageJpegPtr php_gd_gdImageJpegPtr #define gdImageLine php_gd_gdImageLine #define gdImageMeanRemoval php_gd_gdImageMeanRemoval #define gdImageNegate php_gd_gdImageNegate #define gdImagePaletteCopy php_gd_gdImagePaletteCopy #define gdImagePng php_gd_gdImagePng #define gdImagePngCtx php_gd_gdImagePngCtx #define gdImagePngCtxEx php_gd_gdImagePngCtxEx #define gdImagePngEx php_gd_gdImagePngEx #define gdImagePngPtr php_gd_gdImagePngPtr #define gdImagePngPtrEx php_gd_gdImagePngPtrEx #define gdImagePngToSink php_gd_gdImagePngToSink #define gdImagePolygon php_gd_gdImagePolygon #define gdImageRectangle php_gd_gdImageRectangle #define gdImageRotate php_gd_gdImageRotate #define gdImageRotate180 php_gd_gdImageRotate180 #define gdImageRotate270 php_gd_gdImageRotate270 #define gdImageRotate45 php_gd_gdImageRotate45 #define gdImageRotate90 php_gd_gdImageRotate90 #define gdImageSaveAlpha php_gd_gdImageSaveAlpha #define gdImageSelectiveBlur php_gd_gdImageSelectiveBlur #define gdImageSetAntiAliased php_gd_gdImageSetAntiAliased #define gdImageSetAntiAliasedDontBlend php_gd_gdImageSetAntiAliasedDontBlend #define gdImageSetBrush php_gd_gdImageSetBrush #define gdImageSetClip php_gd_gdImageSetClip #define gdImageSetPixel php_gd_gdImageSetPixel #define gdImageSetStyle php_gd_gdImageSetStyle #define gdImageSetThickness php_gd_gdImageSetThickness #define gdImageSetTile php_gd_gdImageSetTile #define gdImageSkewX php_gd_gdImageSkewX #define gdImageSkewY php_gd_gdImageSkewY #define gdImageSmooth php_gd_gdImageSmooth #define gdImageString php_gd_gdImageString #define gdImageString16 php_gd_gdImageString16 #define gdImageStringFT php_gd_gdImageStringFT #define gdImageStringFTEx php_gd_gdImageStringFTEx #define gdImageStringTTF php_gd_gdImageStringTTF #define gdImageStringUp php_gd_gdImageStringUp #define gdImageStringUp16 php_gd_gdImageStringUp16 #define gdImageTrueColorToPalette php_gd_gdImageTrueColorToPalette #define gdImageWBMP php_gd_gdImageWBMP #define gdImageWBMPCtx php_gd_gdImageWBMPCtx #define gdImageWBMPPtr php_gd_gdImageWBMPPtr #define gdImageXbmCtx php_gd_gdImageXbmCtx #define gdNewDynamicCtx php_gd_gdNewDynamicCtx #define gdNewDynamicCtxEx php_gd_gdNewDynamicCtxEx #define gdNewFileCtx php_gd_gdNewFileCtx #define gdNewSSCtx php_gd_gdNewSSCtx #define gdPutBuf php_gd_gdPutBuf #define gdPutC php_gd_gdPutC #define _gdPutColors php_gd__gdPutColors #define gdPutInt php_gd_gdPutInt #define gd_putout php_gd_gd_putout #define gdPutWord php_gd_gdPutWord #define gdSeek php_gd_gdSeek #define gdSinT php_gd_gdSinT #define gd_strtok_r php_gd_gd_strtok_r #define gdTell php_gd_gdTell #define getmbi php_gd_getmbi #define init_destination php_gd_init_destination #define init_source php_gd_init_source #define jpeg_gdIOCtx_dest php_gd_jpeg_gdIOCtx_dest #define jpeg_gdIOCtx_src php_gd_jpeg_gdIOCtx_src #define lsqrt php_gd_lsqrt #define printwbmp php_gd_printwbmp #define Putchar php_gd_Putchar #define putmbi php_gd_putmbi #define Putword php_gd_Putword #define readwbmp php_gd_readwbmp #define skipheader php_gd_skipheader #define skip_input_data php_gd_skip_input_data #define term_destination php_gd_term_destination #define term_source php_gd_term_source #define writewbmp php_gd_writewbmp #define ZeroDataBlock php_gd_ZeroDataBlock #define gdCacheCreate php_gd_gdCacheCreate #define gdCacheDelete php_gd_gdCacheDelete #define gdCacheGet php_gd_gdCacheGet #define gdFontCacheSetup php_gd_gdFontCacheSetup #define gdFontCacheShutdown php_gd_gdFontCacheShutdown #define gdFreeFontCache php_gd_gdFreeFontCache #endif /* HAVE_GD_BUNDLED */ /* Define to specify how much context to retain around the current parse point. */ #define XML_CONTEXT_BYTES 1024 /* Define to make parameter entity parsing functionality available. */ #define XML_DTD 1 /* Define to make XML Namespaces functionality available. */ #define XML_NS 1 #endif #ifdef PHP_EXPORTS #define PCRE_STATIC #endif #endif 07070100180deb000081a40000000000000000000000014dc0f41300000658000000b600010002ffffffffffffffff0000002d00000000root/usr/local/include/php/main/php_syslog.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: | +----------------------------------------------------------------------+ */ /* $Id: php_syslog.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef PHP_SYSLOG_H #define PHP_SYSLOG_H #ifdef PHP_WIN32 #include "win32/syslog.h" #else #include #ifdef HAVE_SYSLOG_H #include #endif #endif /* * The SCO OpenServer 5 Development System (not the UDK) * defines syslog to std_syslog. */ #ifdef syslog #ifdef HAVE_STD_SYSLOG #define php_syslog std_syslog #endif #undef syslog #endif #ifndef php_syslog #define php_syslog syslog #endif #endif 07070100180dd8000081a40000000000000000000000014dc0f4130000dae7000000b600010002ffffffffffffffff0000002800000000root/usr/local/include/php/main/logos.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: | +----------------------------------------------------------------------+ */ /* $Id: logos.h 306939 2011-01-01 02:19:59Z felipe $ */ #define CONTEXT_TYPE_IMAGE_GIF "Content-Type: image/gif" static const unsigned char zend_logo[] = { 71, 73, 70, 56, 57, 97, 113, 0, 72, 0, 213, 0, 0, 13, 13, 14, 1, 3, 6, 2, 5, 9, 46, 68, 94, 21, 29, 39, 5, 15, 26, 4, 10, 17, 29, 43, 58, 0, 1, 2, 9, 25, 42, 38, 105, 171, 24, 67, 109, 13, 36, 59, 10, 27, 45, 9, 25, 41, 35, 96, 157, 32, 87, 142, 29, 79, 130, 26, 70, 114, 20, 54, 87, 29, 77, 124, 10, 26, 42, 34, 88, 141, 10, 24, 38, 11, 26, 41, 1, 2, 3, 55, 80, 105, 45, 63, 81, 49, 53, 57, 5, 15, 24, 9, 26, 42, 30, 85, 138, 33, 92, 149, 26, 73, 117, 10, 28, 45, 32, 89, 142, 30, 84, 134, 26, 72, 115, 15, 42, 67, 23, 62, 99, 12, 32, 51, 7, 21, 33, 9, 26, 41, 8, 23, 35, 7, 25, 37, 51, 58, 63, 2, 4, 5, 25, 26, 26, 49, 50, 50, 255, 102, 0, 255, 255, 255, 204, 204, 204, 199, 199, 199, 191, 191, 191, 171, 171, 171, 146, 146, 146, 115, 115, 115, 85, 85, 85, 60, 60, 60, 55, 55, 55, 38, 38, 38, 7, 7, 7, 3, 3, 3, 0, 0, 0, 44, 0, 0, 0, 0, 113, 0, 72, 0, 0, 6, 255, 192, 153, 112, 72, 44, 26, 143, 200, 164, 114, 121, 252, 49, 159, 208, 168, 148, 248, 171, 58, 167, 210, 171, 208, 170, 197, 122, 191, 70, 109, 23, 140, 236, 138, 201, 232, 239, 121, 102, 221, 186, 217, 219, 171, 83, 46, 110, 15, 207, 235, 180, 190, 124, 135, 187, 229, 127, 127, 128, 112, 121, 108, 118, 132, 123, 137, 77, 118, 120, 136, 115, 109, 117, 85, 126, 147, 147, 128, 99, 138, 137, 99, 107, 146, 146, 148, 133, 159, 125, 136, 152, 163, 151, 135, 121, 144, 84, 157, 92, 169, 157, 111, 163, 175, 176, 83, 151, 177, 180, 181, 161, 182, 184, 185, 186, 187, 188, 189, 67, 54, 56, 58, 56, 53, 190, 197, 88, 55, 57, 60, 63, 2, 43, 2, 56, 198, 208, 74, 192, 58, 0, 63, 5, 12, 11, 35, 35, 12, 47, 209, 222, 67, 53, 201, 203, 34, 19, 20, 218, 231, 37, 63, 54, 223, 222, 60, 2, 216, 231, 241, 231, 206, 76, 193, 55, 236, 176, 63, 39, 242, 252, 35, 40, 58, 75, 114, 8, 40, 240, 227, 25, 62, 76, 60, 24, 244, 147, 55, 161, 202, 11, 24, 57, 134, 17, 201, 241, 99, 130, 191, 130, 7, 21, 225, 48, 176, 48, 30, 137, 5, 11, 38, 48, 88, 81, 5, 198, 51, 138, 22, 181, 53, 52, 152, 49, 141, 141, 31, 230, 58, 46, 60, 129, 194, 74, 202, 115, 43, 91, 234, 1, 112, 83, 102, 63, 255, 18, 38, 122, 226, 252, 145, 67, 39, 153, 26, 47, 68, 248, 92, 186, 176, 97, 81, 163, 88, 108, 188, 48, 80, 130, 169, 85, 134, 68, 161, 74, 177, 1, 160, 0, 137, 171, 96, 135, 62, 213, 186, 132, 171, 215, 176, 104, 71, 52, 188, 71, 54, 9, 210, 179, 105, 195, 166, 99, 219, 214, 198, 58, 34, 48, 12, 124, 213, 38, 163, 175, 223, 191, 50, 22, 132, 216, 139, 182, 132, 0, 30, 196, 250, 218, 37, 70, 198, 198, 141, 199, 144, 31, 223, 253, 114, 163, 10, 0, 97, 192, 126, 100, 59, 7, 24, 176, 10, 20, 229, 210, 146, 48, 128, 88, 72, 223, 28, 57, 38, 111, 197, 17, 163, 181, 235, 215, 58, 116, 68, 100, 60, 5, 134, 136, 18, 19, 80, 24, 168, 162, 48, 94, 95, 21, 6, 82, 168, 80, 209, 215, 128, 1, 20, 39, 8, 95, 37, 81, 160, 180, 105, 25, 177, 233, 62, 1, 246, 186, 186, 245, 24, 209, 177, 84, 140, 71, 97, 130, 114, 109, 33, 76, 48, 152, 176, 192, 111, 135, 20, 222, 211, 54, 167, 61, 163, 111, 246, 39, 55, 174, 203, 175, 254, 30, 74, 229, 152, 62, 73, 132, 24, 60, 162, 47, 131, 14, 12, 132, 224, 155, 95, 130, 145, 208, 89, 129, 40, 116, 211, 25, 12, 58, 72, 135, 68, 124, 214, 197, 38, 161, 14, 243, 73, 200, 222, 18, 27, 161, 213, 215, 4, 159, 37, 199, 255, 25, 96, 12, 116, 230, 223, 9, 11, 252, 32, 226, 11, 13, 74, 35, 223, 132, 19, 174, 24, 27, 75, 76, 192, 128, 66, 88, 126, 161, 160, 66, 122, 124, 201, 112, 2, 3, 195, 125, 54, 65, 95, 29, 4, 87, 227, 9, 126, 233, 192, 3, 12, 125, 161, 232, 160, 93, 207, 184, 200, 98, 139, 17, 74, 24, 197, 118, 96, 249, 7, 160, 128, 31, 242, 72, 30, 72, 33, 244, 149, 2, 122, 229, 201, 0, 224, 105, 60, 52, 216, 23, 131, 14, 226, 96, 194, 1, 78, 74, 152, 195, 13, 196, 208, 192, 90, 148, 177, 217, 7, 83, 149, 50, 112, 136, 220, 94, 34, 22, 216, 159, 12, 195, 101, 227, 37, 113, 50, 192, 0, 3, 156, 238, 165, 72, 196, 11, 21, 178, 184, 228, 117, 19, 66, 145, 225, 85, 53, 222, 72, 152, 136, 42, 152, 32, 224, 111, 42, 8, 10, 40, 161, 101, 222, 96, 67, 95, 61, 40, 58, 3, 13, 55, 24, 112, 221, 101, 19, 226, 64, 131, 17, 54, 64, 42, 229, 19, 50, 226, 249, 95, 128, 127, 238, 23, 166, 113, 194, 105, 250, 103, 160, 191, 18, 90, 232, 13, 59, 0, 249, 130, 168, 56, 160, 198, 195, 10, 214, 161, 144, 1, 131, 245, 21, 1, 33, 125, 177, 141, 181, 4, 149, 76, 137, 232, 23, 3, 38, 132, 9, 216, 9, 93, 126, 234, 105, 160, 34, 94, 208, 129, 14, 7, 152, 112, 255, 2, 4, 40, 84, 80, 157, 8, 30, 176, 154, 195, 133, 68, 200, 250, 34, 124, 119, 102, 171, 109, 113, 157, 142, 16, 238, 111, 160, 113, 58, 110, 167, 38, 252, 213, 192, 193, 12, 72, 32, 193, 3, 15, 128, 192, 128, 7, 175, 121, 32, 66, 7, 101, 230, 240, 42, 18, 53, 216, 171, 131, 106, 73, 224, 32, 0, 88, 221, 217, 216, 227, 200, 190, 234, 39, 210, 112, 12, 36, 23, 158, 175, 254, 154, 160, 105, 9, 5, 236, 88, 129, 7, 41, 83, 240, 65, 195, 32, 56, 236, 128, 107, 14, 36, 208, 64, 10, 24, 41, 161, 177, 181, 74, 84, 182, 194, 4, 85, 45, 181, 239, 134, 11, 236, 165, 31, 151, 95, 233, 199, 223, 8, 82, 27, 40, 3, 9, 39, 144, 56, 24, 4, 92, 119, 61, 129, 3, 96, 135, 221, 128, 8, 12, 0, 64, 239, 47, 26, 59, 88, 52, 53, 227, 132, 182, 208, 210, 128, 178, 76, 163, 12, 46, 135, 208, 245, 221, 92, 3, 21, 54, 216, 9, 152, 208, 48, 64, 72, 12, 237, 197, 52, 0, 152, 208, 209, 111, 193, 141, 204, 239, 102, 104, 45, 96, 128, 9, 20, 224, 45, 249, 215, 97, 51, 240, 1, 8, 10, 152, 80, 20, 14, 56, 208, 213, 38, 199, 181, 245, 214, 207, 111, 96, 130, 4, 146, 72, 114, 135, 69, 194, 10, 38, 64, 0, 130, 228, 120, 71, 240, 181, 8, 145, 67, 240, 255, 128, 2, 44, 164, 0, 26, 2, 66, 180, 9, 163, 23, 56, 20, 112, 184, 184, 242, 232, 119, 224, 212, 127, 18, 56, 152, 95, 14, 252, 8, 88, 129, 120, 255, 37, 216, 205, 17, 68, 160, 192, 3, 24, 212, 64, 131, 198, 58, 92, 12, 70, 101, 223, 125, 8, 172, 60, 218, 166, 252, 149, 136, 41, 251, 21, 64, 249, 201, 117, 221, 89, 202, 151, 131, 112, 251, 9, 211, 194, 54, 161, 218, 88, 212, 128, 237, 128, 207, 35, 15, 164, 144, 125, 65, 78, 141, 206, 3, 164, 0, 245, 69, 0, 34, 248, 95, 10, 134, 68, 2, 8, 244, 101, 71, 97, 3, 77, 237, 70, 240, 0, 18, 248, 110, 15, 58, 80, 10, 63, 48, 37, 55, 47, 129, 169, 128, 86, 10, 152, 12, 132, 19, 166, 2, 36, 112, 132, 31, 20, 83, 128, 28, 40, 3, 6, 52, 207, 116, 91, 227, 218, 3, 218, 68, 52, 50, 224, 32, 95, 228, 147, 1, 175, 134, 211, 65, 226, 13, 138, 116, 222, 249, 77, 1, 10, 38, 3, 7, 52, 160, 47, 96, 91, 0, 11, 83, 224, 128, 62, 197, 176, 107, 32, 224, 222, 217, 192, 240, 130, 25, 109, 16, 133, 91, 242, 159, 15, 63, 37, 176, 63, 25, 64, 0, 68, 108, 128, 7, 144, 232, 0, 37, 146, 81, 68, 14, 208, 20, 20, 163, 72, 167, 216, 128, 14, 85, 201, 66, 205, 155, 110, 224, 61, 37, 220, 255, 16, 63, 226, 235, 215, 135, 194, 5, 44, 78, 249, 5, 61, 86, 251, 65, 5, 36, 208, 23, 15, 52, 177, 136, 101, 100, 97, 18, 195, 197, 171, 52, 218, 205, 117, 51, 108, 163, 169, 132, 16, 171, 54, 118, 174, 142, 69, 48, 75, 248, 224, 22, 162, 45, 146, 171, 51, 8, 160, 221, 25, 17, 105, 70, 82, 90, 237, 91, 131, 137, 164, 37, 137, 80, 73, 238, 221, 11, 86, 93, 9, 95, 242, 180, 101, 128, 46, 10, 236, 148, 126, 177, 6, 5, 70, 153, 68, 69, 38, 18, 2, 255, 42, 34, 104, 34, 160, 74, 106, 9, 99, 8, 245, 51, 230, 147, 126, 55, 131, 26, 196, 178, 35, 225, 25, 153, 52, 131, 82, 55, 240, 84, 19, 107, 60, 234, 11, 0, 12, 16, 1, 16, 148, 160, 110, 43, 123, 100, 56, 243, 22, 2, 145, 128, 45, 101, 16, 152, 15, 118, 44, 54, 131, 100, 218, 239, 73, 111, 58, 66, 13, 120, 0, 151, 133, 60, 205, 116, 248, 20, 12, 5, 246, 227, 52, 126, 106, 195, 120, 50, 56, 146, 1, 46, 247, 1, 126, 86, 141, 156, 79, 132, 192, 61, 67, 240, 1, 117, 182, 6, 85, 141, 90, 38, 232, 134, 176, 17, 89, 198, 165, 35, 134, 17, 70, 14, 92, 32, 63, 134, 141, 224, 117, 176, 11, 105, 215, 44, 232, 208, 136, 178, 72, 34, 118, 212, 203, 69, 173, 226, 148, 26, 216, 133, 7, 255, 39, 80, 192, 4, 102, 42, 191, 17, 136, 52, 164, 37, 109, 211, 253, 48, 137, 49, 122, 90, 116, 165, 255, 100, 64, 86, 40, 74, 128, 22, 0, 224, 6, 48, 152, 128, 2, 64, 122, 211, 187, 229, 84, 153, 142, 226, 169, 18, 230, 41, 128, 164, 1, 149, 31, 37, 98, 166, 93, 134, 192, 129, 133, 49, 181, 169, 36, 125, 234, 147, 36, 68, 71, 47, 80, 213, 170, 252, 32, 79, 92, 232, 177, 4, 14, 80, 32, 103, 77, 229, 218, 83, 177, 51, 214, 6, 73, 53, 10, 103, 237, 71, 67, 126, 96, 0, 164, 133, 69, 4, 128, 147, 134, 15, 72, 240, 85, 174, 229, 236, 176, 175, 203, 105, 93, 223, 116, 215, 41, 228, 53, 30, 43, 177, 65, 14, 94, 80, 133, 21, 160, 64, 93, 75, 153, 0, 0, 158, 224, 130, 19, 60, 224, 110, 57, 99, 216, 237, 74, 0, 130, 8, 120, 192, 3, 99, 243, 192, 97, 234, 58, 161, 120, 42, 226, 177, 106, 9, 26, 37, 57, 167, 131, 23, 8, 207, 39, 20, 248, 1, 254, 136, 80, 3, 20, 44, 21, 180, 32, 32, 79, 4, 80, 16, 128, 11, 64, 64, 4, 34, 80, 65, 7, 94, 80, 38, 214, 202, 102, 183, 105, 168, 1, 12, 170, 26, 219, 26, 34, 19, 135, 29, 41, 128, 117, 137, 128, 3, 9, 252, 214, 176, 15, 24, 64, 15, 56, 247, 12, 24, 168, 75, 4, 6, 0, 135, 192, 14, 156, 139, 82, 90, 8, 164, 38, 219, 29, 2, 79, 150, 194, 0, 24, 44, 97, 7, 22, 184, 29, 195, 58, 106, 223, 58, 230, 160, 156, 68, 89, 108, 89, 115, 145, 3, 147, 48, 33, 131, 50, 89, 0, 3, 4, 16, 95, 33, 220, 224, 5, 26, 64, 193, 91, 111, 167, 57, 35, 132, 35, 53, 148, 116, 12, 100, 166, 248, 13, 143, 241, 163, 59, 34, 16, 192, 15, 120, 208, 222, 36, 208, 192, 49, 63, 216, 192, 9, 36, 192, 128, 137, 114, 152, 44, 47, 217, 140, 130, 9, 114, 25, 28, 76, 148, 9, 162, 2, 128, 141, 219, 50, 5, 122, 134, 120, 196, 174, 141, 46, 143, 167, 96, 131, 23, 221, 120, 200, 72, 214, 74, 16, 0, 0, 59 }; static const unsigned char php_logo[] = { 71, 73, 70, 56, 57, 97, 120, 0, 67, 0, 230, 106, 0, 127, 130, 184, 57, 55, 71, 40, 37, 42, 204, 205, 226, 161, 164, 203, 211, 213, 231, 178, 180, 212, 67, 66, 88, 131, 134, 185, 130, 131, 179, 82, 82, 114, 144, 146, 194, 194, 196, 222, 170, 172, 208, 76, 75, 99, 91, 92, 131, 221, 222, 236, 59, 56, 60, 110, 113, 165, 106, 109, 157, 97, 99, 141, 117, 121, 177, 123, 126, 181, 229, 230, 240, 153, 156, 198, 140, 141, 193, 185, 186, 217, 107, 107, 146, 78, 78, 107, 113, 116, 169, 122, 122, 163, 136, 139, 189, 114, 116, 163, 116, 115, 152, 142, 144, 193, 90, 91, 126, 226, 227, 239, 123, 125, 173, 164, 165, 208, 109, 112, 162, 114, 118, 172, 149, 150, 200, 187, 189, 217, 116, 120, 174, 133, 136, 187, 146, 149, 195, 216, 217, 234, 146, 146, 196, 100, 102, 146, 107, 110, 159, 165, 168, 206, 148, 150, 197, 46, 43, 47, 83, 81, 104, 179, 180, 215, 108, 106, 140, 92, 91, 118, 138, 141, 191, 102, 104, 150, 104, 106, 154, 156, 159, 200, 49, 46, 57, 174, 176, 211, 156, 156, 205, 85, 86, 120, 158, 161, 202, 150, 153, 197, 129, 130, 175, 103, 105, 151, 63, 61, 80, 188, 190, 218, 94, 96, 137, 152, 153, 200, 140, 142, 191, 137, 138, 186, 87, 88, 124, 182, 183, 215, 213, 215, 232, 34, 30, 32, 108, 111, 158, 206, 208, 228, 191, 192, 220, 119, 123, 180, 118, 120, 167, 95, 94, 125, 153, 153, 204, 110, 111, 152, 115, 119, 174, 34, 30, 31, 255, 255, 255, 144, 142, 143, 89, 86, 87, 199, 198, 199, 238, 238, 245, 213, 212, 213, 246, 246, 250, 130, 128, 129, 172, 170, 171, 116, 114, 115, 241, 240, 241, 158, 156, 157, 227, 226, 227, 75, 72, 73, 185, 184, 185, 103, 100, 101, 137, 137, 182, 0, 255, 0, 71, 70, 95, 223, 224, 237, 155, 156, 204, 105, 107, 156, 111, 115, 167, 140, 140, 186, 184, 185, 217, 184, 186, 215, 154, 155, 204, 167, 170, 207, 219, 220, 235, 154, 156, 201, 102, 100, 132, 104, 103, 137, 167, 168, 210, 110, 112, 160, 139, 139, 185, 198, 199, 224, 199, 201, 225, 105, 108, 156, 151, 152, 203, 33, 249, 4, 1, 0, 0, 106, 0, 44, 0, 0, 0, 0, 120, 0, 67, 0, 0, 7, 255, 128, 106, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 150, 109, 63, 109, 115, 152, 158, 159, 160, 63, 121, 121, 54, 62, 26, 113, 76, 26, 26, 76, 6, 62, 62, 13, 50, 4, 65, 60, 24, 66, 45, 11, 73, 34, 57, 31, 25, 57, 34, 47, 41, 160, 194, 161, 13, 26, 12, 125, 77, 5, 80, 80, 3, 125, 124, 12, 81, 81, 42, 114, 172, 175, 116, 177, 179, 66, 51, 45, 186, 31, 8, 0, 22, 22, 21, 87, 40, 37, 22, 9, 25, 193, 195, 235, 140, 38, 113, 124, 46, 108, 108, 16, 16, 117, 46, 201, 3, 212, 50, 179, 34, 31, 254, 44, 0, 17, 8, 4, 64, 176, 224, 55, 130, 225, 164, 172, 64, 241, 70, 194, 9, 63, 59, 158, 76, 25, 146, 132, 157, 69, 53, 65, 108, 12, 96, 67, 226, 130, 71, 18, 36, 242, 53, 16, 178, 64, 138, 201, 147, 40, 83, 170, 92, 121, 114, 92, 7, 9, 19, 118, 232, 128, 65, 225, 8, 5, 43, 67, 68, 92, 196, 20, 132, 9, 20, 142, 30, 47, 184, 48, 66, 167, 5, 203, 163, 72, 147, 162, 188, 242, 38, 6, 140, 35, 71, 30, 140, 88, 114, 196, 131, 206, 157, 144, 126, 104, 116, 1, 129, 35, 4, 35, 4, 88, 40, 29, 75, 54, 233, 149, 19, 58, 30, 44, 1, 162, 64, 193, 136, 41, 51, 255, 176, 46, 50, 161, 161, 64, 19, 23, 117, 10, 24, 72, 82, 182, 175, 95, 164, 29, 96, 44, 81, 192, 129, 131, 3, 60, 9, 228, 26, 202, 19, 101, 0, 148, 2, 3, 124, 228, 248, 187, 114, 1, 134, 203, 152, 49, 124, 160, 156, 244, 13, 5, 5, 14, 214, 172, 81, 224, 65, 177, 154, 60, 70, 248, 244, 25, 192, 100, 6, 231, 149, 31, 178, 112, 153, 77, 155, 75, 151, 215, 74, 221, 44, 89, 115, 224, 128, 131, 16, 59, 221, 69, 97, 192, 160, 1, 2, 220, 43, 49, 112, 193, 194, 188, 185, 153, 219, 200, 147, 118, 216, 93, 164, 200, 154, 210, 195, 126, 248, 144, 99, 68, 5, 15, 11, 209, 87, 170, 32, 211, 188, 185, 152, 2, 225, 149, 94, 121, 112, 32, 64, 0, 14, 112, 64, 153, 48, 192, 68, 14, 1, 0, 233, 87, 22, 16, 83, 158, 57, 25, 21, 249, 41, 245, 134, 2, 238, 245, 112, 7, 38, 115, 208, 225, 131, 1, 50, 28, 23, 160, 74, 93, 152, 209, 31, 22, 92, 16, 240, 160, 82, 49, 172, 209, 67, 15, 7, 236, 81, 201, 15, 50, 52, 208, 64, 73, 23, 166, 4, 64, 22, 19, 98, 145, 197, 102, 37, 38, 245, 64, 0, 27, 2, 39, 73, 27, 4, 236, 227, 96, 139, 39, 41, 55, 161, 25, 95, 224, 168, 148, 31, 69, 208, 64, 3, 21, 145, 216, 17, 4, 1, 51, 128, 135, 212, 255, 7, 153, 53, 217, 36, 139, 71, 169, 16, 198, 132, 98, 92, 208, 36, 137, 44, 49, 233, 228, 150, 248, 141, 133, 130, 3, 52, 8, 80, 195, 35, 72, 96, 16, 4, 148, 71, 125, 240, 69, 22, 108, 182, 233, 230, 155, 89, 116, 81, 64, 3, 93, 162, 84, 0, 24, 19, 146, 1, 103, 155, 23, 12, 96, 225, 73, 11, 236, 41, 40, 155, 93, 12, 208, 128, 82, 64, 8, 32, 128, 3, 141, 204, 32, 4, 6, 98, 41, 69, 192, 114, 41, 86, 106, 6, 24, 92, 124, 1, 32, 74, 93, 108, 81, 105, 138, 52, 108, 161, 69, 25, 93, 144, 104, 192, 148, 159, 78, 184, 5, 24, 94, 116, 113, 40, 82, 35, 8, 224, 4, 163, 138, 108, 35, 196, 141, 73, 141, 151, 234, 167, 91, 120, 1, 65, 151, 39, 238, 250, 41, 24, 99, 96, 32, 197, 0, 120, 10, 171, 106, 25, 3, 36, 53, 130, 19, 78, 224, 144, 72, 10, 34, 180, 128, 102, 82, 16, 240, 167, 108, 138, 97, 64, 96, 18, 6, 94, 108, 155, 34, 26, 183, 93, 224, 169, 184, 229, 209, 224, 69, 179, 72, 173, 1, 45, 118, 133, 252, 225, 203, 100, 101, 125, 33, 33, 186, 253, 121, 1, 160, 148, 248, 230, 219, 0, 138, 253, 54, 71, 67, 25, 127, 30, 21, 128, 19, 2, 44, 96, 72, 63, 244, 146, 21, 91, 192, 229, 109, 209, 227, 157, 16, 51, 167, 197, 255, 5, 225, 86, 140, 133, 24, 208, 29, 213, 129, 172, 99, 18, 146, 2, 2, 31, 212, 57, 214, 164, 59, 194, 57, 198, 25, 218, 78, 232, 5, 1, 157, 78, 200, 197, 155, 99, 112, 129, 70, 138, 90, 100, 129, 106, 196, 112, 150, 113, 198, 185, 19, 150, 129, 37, 75, 10, 64, 155, 6, 33, 222, 224, 58, 150, 174, 253, 137, 225, 45, 74, 11, 52, 208, 5, 121, 19, 106, 193, 0, 192, 253, 173, 136, 18, 6, 13, 124, 17, 65, 213, 89, 104, 81, 53, 187, 128, 26, 240, 69, 178, 253, 133, 97, 128, 82, 52, 204, 58, 200, 31, 0, 32, 160, 100, 89, 217, 230, 185, 169, 137, 89, 124, 221, 116, 22, 25, 151, 199, 227, 74, 16, 0, 221, 92, 206, 130, 51, 119, 198, 218, 42, 125, 48, 6, 206, 119, 31, 181, 4, 180, 10, 171, 33, 130, 5, 38, 147, 101, 175, 204, 5, 167, 20, 184, 170, 58, 83, 249, 116, 74, 49, 247, 119, 70, 22, 52, 4, 109, 236, 74, 161, 151, 167, 69, 227, 44, 117, 0, 237, 13, 130, 176, 144, 80, 95, 15, 79, 56, 198, 181, 39, 109, 222, 31, 26, 89, 160, 221, 220, 127, 42, 5, 27, 116, 25, 19, 210, 144, 197, 81, 169, 15, 206, 58, 75, 69, 184, 173, 70, 56, 115, 147, 133, 114, 127, 17, 244, 200, 210, 229, 253, 17, 142, 185, 74, 224, 22, 159, 197, 25, 170, 94, 112, 20, 255, 214, 229, 1, 175, 20, 7, 78, 244, 32, 72, 5, 148, 49, 93, 30, 26, 159, 167, 84, 123, 218, 228, 55, 119, 187, 74, 252, 246, 183, 69, 216, 99, 179, 132, 1, 241, 219, 83, 10, 5, 160, 37, 136, 21, 80, 166, 110, 217, 91, 158, 73, 12, 0, 190, 160, 245, 173, 57, 213, 211, 143, 239, 152, 3, 134, 44, 20, 14, 11, 135, 99, 9, 3, 168, 214, 159, 251, 9, 144, 128, 41, 184, 2, 251, 252, 130, 189, 242, 84, 136, 37, 201, 99, 78, 4, 58, 183, 187, 248, 157, 36, 133, 88, 8, 3, 233, 76, 183, 18, 0, 120, 109, 66, 228, 34, 203, 0, 157, 32, 8, 20, 24, 176, 47, 194, 235, 32, 238, 142, 69, 169, 236, 245, 174, 106, 203, 11, 98, 121, 188, 0, 192, 116, 29, 79, 63, 28, 44, 79, 24, 20, 184, 146, 29, 10, 162, 3, 40, 24, 33, 89, 116, 68, 189, 39, 162, 228, 3, 5, 240, 66, 233, 250, 67, 131, 49, 124, 225, 130, 39, 76, 73, 247, 38, 244, 189, 240, 113, 15, 2, 98, 156, 80, 245, 42, 119, 20, 43, 170, 97, 33, 90, 92, 90, 20, 153, 67, 46, 21, 248, 81, 5, 16, 232, 194, 24, 180, 48, 70, 209, 13, 160, 126, 204, 241, 32, 74, 242, 199, 51, 177, 101, 175, 11, 127, 4, 100, 23, 202, 224, 72, 153, 81, 113, 37, 232, 83, 223, 243, 58, 112, 133, 190, 236, 71, 255, 85, 90, 8, 101, 40, 197, 112, 175, 20, 137, 225, 11, 4, 120, 160, 10, 189, 104, 167, 9, 98, 161, 130, 23, 20, 149, 40, 181, 64, 202, 97, 137, 175, 44, 205, 163, 213, 7, 222, 208, 129, 190, 68, 72, 99, 104, 248, 194, 2, 78, 133, 67, 23, 154, 196, 92, 19, 146, 97, 33, 3, 118, 202, 161, 73, 231, 117, 130, 72, 129, 4, 222, 240, 67, 165, 40, 177, 95, 205, 60, 150, 43, 173, 182, 18, 68, 98, 129, 137, 26, 3, 131, 48, 251, 242, 56, 39, 68, 238, 121, 18, 232, 229, 88, 214, 216, 47, 26, 156, 97, 156, 82, 64, 102, 127, 184, 240, 170, 173, 169, 146, 57, 109, 12, 88, 4, 206, 112, 1, 103, 178, 205, 121, 130, 120, 193, 9, 36, 208, 73, 165, 48, 82, 92, 102, 32, 195, 24, 6, 80, 167, 25, 118, 208, 159, 196, 212, 31, 255, 240, 101, 6, 25, 50, 128, 142, 73, 41, 154, 19, 142, 70, 136, 33, 156, 224, 13, 99, 161, 152, 254, 102, 57, 75, 50, 112, 97, 12, 133, 66, 83, 160, 72, 26, 74, 86, 158, 68, 5, 92, 96, 233, 232, 46, 40, 6, 150, 134, 210, 164, 40, 101, 192, 16, 165, 3, 50, 67, 164, 224, 4, 39, 80, 39, 82, 96, 200, 133, 11, 208, 131, 30, 5, 248, 35, 1, 252, 105, 18, 64, 30, 245, 168, 153, 3, 212, 0, 158, 74, 143, 67, 46, 147, 57, 94, 255, 48, 234, 81, 147, 234, 71, 2, 236, 116, 44, 7, 75, 216, 33, 146, 16, 131, 19, 160, 0, 41, 215, 76, 36, 83, 125, 36, 133, 5, 52, 177, 60, 89, 192, 40, 114, 220, 229, 4, 120, 25, 34, 1, 101, 45, 104, 114, 238, 185, 66, 182, 178, 164, 1, 13, 140, 88, 199, 242, 83, 78, 105, 41, 162, 4, 121, 101, 201, 65, 249, 104, 76, 191, 74, 129, 1, 149, 108, 14, 24, 208, 19, 160, 114, 210, 106, 17, 136, 53, 171, 4, 171, 198, 0, 199, 170, 68, 119, 82, 188, 36, 101, 52, 122, 89, 70, 148, 96, 2, 49, 232, 64, 30, 165, 64, 212, 122, 122, 214, 36, 121, 115, 217, 233, 162, 211, 129, 3, 64, 171, 180, 141, 72, 0, 106, 37, 160, 197, 180, 98, 97, 12, 107, 245, 209, 2, 22, 199, 70, 185, 250, 133, 8, 61, 128, 150, 97, 35, 161, 132, 39, 76, 64, 179, 82, 248, 223, 22, 166, 75, 93, 222, 189, 214, 158, 212, 165, 46, 24, 6, 251, 26, 5, 200, 74, 0, 50, 154, 196, 11, 64, 224, 135, 24, 240, 22, 0, 5, 160, 42, 61, 16, 119, 93, 41, 160, 87, 189, 16, 112, 45, 101, 136, 112, 48, 39, 68, 128, 163, 150, 72, 128, 27, 80, 251, 134, 213, 182, 215, 175, 39, 176, 173, 114, 65, 241, 130, 41, 248, 1, 181, 170, 253, 175, 95, 81, 192, 1, 89, 57, 161, 8, 248, 5, 133, 255, 18, 244, 224, 134, 3, 247, 87, 193, 37, 58, 193, 26, 28, 220, 131, 240, 178, 131, 5, 20, 62, 176, 4, 206, 138, 225, 240, 28, 225, 0, 138, 18, 64, 15, 96, 167, 24, 22, 128, 96, 7, 110, 112, 67, 12, 168, 89, 98, 202, 248, 129, 3, 1, 8, 147, 0, 2, 192, 98, 211, 8, 34, 9, 37, 32, 194, 14, 96, 60, 1, 26, 215, 56, 41, 19, 32, 80, 15, 132, 36, 38, 187, 250, 120, 16, 41, 72, 128, 30, 116, 64, 4, 33, 187, 33, 168, 254, 197, 240, 27, 142, 128, 227, 13, 45, 185, 8, 120, 120, 193, 147, 23, 241, 2, 41, 235, 224, 204, 103, 222, 193, 71, 73, 124, 221, 29, 28, 65, 1, 237, 129, 209, 134, 14, 112, 3, 15, 141, 249, 17, 47, 64, 192, 20, 136, 0, 131, 62, 251, 153, 8, 126, 248, 168, 80, 243, 51, 1, 34, 60, 0, 52, 213, 113, 143, 162, 113, 16, 2, 59, 223, 153, 18, 34, 24, 194, 158, 41, 64, 233, 74, 83, 250, 8, 125, 174, 112, 160, 223, 192, 105, 78, 75, 224, 211, 159, 6, 42, 80, 137, 112, 105, 182, 136, 166, 55, 7, 168, 78, 17, 2, 112, 0, 28, 108, 32, 49, 143, 22, 70, 10, 62, 80, 2, 16, 88, 1, 42, 80, 121, 128, 174, 119, 61, 149, 37, 172, 5, 8, 108, 105, 11, 97, 10, 99, 152, 208, 156, 186, 55, 69, 80, 0, 21, 110, 56, 48, 4, 49, 199, 90, 49, 41, 80, 2, 2, 60, 224, 129, 13, 108, 32, 45, 190, 6, 118, 176, 219, 66, 108, 195, 112, 128, 10, 35, 24, 129, 21, 172, 80, 130, 102, 63, 251, 220, 139, 16, 65, 26, 16, 112, 21, 116, 187, 251, 221, 240, 142, 119, 188, 3, 1, 0, 59, 0 }; static const unsigned char php_egg_logo[] = { 71, 73, 70, 56, 57, 97, 120, 0, 67, 0, 231, 255, 0, 18, 25, 33, 32, 30, 34, 28, 33, 44, 15, 35, 71, 6, 37, 85, 37, 40, 47, 34, 41, 53, 41, 40, 43, 9, 47, 109, 30, 45, 68, 21, 48, 84, 51, 46, 55, 43, 49, 59, 31, 59, 98, 15, 61, 128, 58, 55, 69, 50, 57, 74, 0, 66, 144, 56, 58, 60, 54, 59, 71, 32, 66, 113, 60, 65, 67, 63, 65, 84, 63, 68, 79, 28, 79, 145, 15, 82, 162, 75, 72, 98, 68, 78, 86, 74, 77, 88, 50, 82, 122, 41, 85, 134, 76, 78, 108, 70, 83, 101, 5, 94, 190, 0, 95, 197, 86, 80, 101, 28, 92, 159, 80, 84, 96, 83, 83, 115, 81, 87, 89, 22, 97, 183, 86, 88, 85, 0, 102, 210, 8, 101, 204, 24, 100, 177, 85, 90, 127, 35, 101, 169, 42, 100, 159, 88, 92, 103, 0, 107, 216, 69, 95, 132, 0, 108, 210, 84, 93, 112, 94, 90, 117, 18, 105, 201, 96, 92, 105, 89, 96, 98, 94, 93, 135, 94, 94, 126, 30, 106, 210, 7, 112, 222, 33, 108, 198, 16, 114, 217, 27, 113, 198, 24, 113, 209, 59, 108, 159, 96, 100, 138, 0, 120, 229, 44, 112, 180, 49, 112, 171, 71, 108, 148, 99, 104, 115, 90, 106, 125, 27, 115, 232, 100, 102, 147, 42, 115, 192, 86, 110, 137, 9, 123, 239, 106, 108, 105, 105, 105, 138, 33, 118, 228, 12, 125, 227, 48, 117, 208, 16, 126, 222, 37, 120, 224, 20, 125, 235, 35, 123, 213, 50, 121, 190, 43, 123, 206, 40, 123, 220, 105, 110, 160, 59, 122, 182, 78, 119, 158, 44, 122, 233, 3, 134, 250, 112, 112, 151, 73, 123, 175, 113, 118, 114, 51, 128, 205, 34, 129, 246, 11, 136, 245, 34, 130, 240, 113, 117, 149, 111, 116, 166, 111, 119, 141, 48, 130, 221, 38, 132, 235, 53, 130, 215, 97, 124, 146, 116, 122, 124, 117, 121, 131, 54, 130, 229, 41, 135, 232, 68, 130, 223, 46, 135, 246, 65, 134, 202, 42, 137, 241, 75, 131, 205, 124, 121, 161, 101, 125, 191, 86, 128, 210, 121, 122, 169, 105, 128, 157, 121, 122, 180, 114, 124, 181, 94, 128, 201, 81, 134, 185, 46, 138, 252, 76, 135, 195, 34, 142, 252, 62, 137, 229, 63, 138, 217, 33, 144, 247, 58, 139, 223, 56, 141, 246, 54, 143, 234, 57, 143, 241, 102, 135, 193, 129, 130, 176, 122, 136, 144, 46, 148, 252, 45, 149, 246, 118, 133, 191, 65, 146, 231, 73, 146, 216, 129, 133, 185, 135, 135, 156, 69, 148, 226, 44, 153, 255, 94, 143, 216, 132, 136, 175, 88, 146, 207, 137, 139, 136, 93, 146, 197, 95, 147, 188, 137, 139, 150, 104, 146, 178, 122, 143, 172, 135, 139, 191, 57, 156, 254, 67, 154, 245, 70, 154, 239, 134, 141, 180, 117, 145, 201, 120, 146, 190, 79, 154, 233, 140, 141, 188, 129, 144, 194, 142, 142, 176, 137, 147, 156, 88, 155, 222, 82, 157, 230, 93, 157, 218, 66, 162, 253, 100, 157, 210, 77, 161, 247, 55, 168, 255, 81, 162, 241, 148, 148, 195, 145, 149, 202, 127, 156, 204, 77, 166, 255, 142, 155, 177, 141, 153, 200, 123, 160, 193, 73, 171, 255, 93, 167, 240, 96, 167, 234, 152, 158, 160, 101, 167, 228, 119, 164, 206, 155, 158, 171, 110, 167, 219, 156, 155, 203, 89, 172, 252, 128, 164, 219, 151, 163, 174, 81, 178, 255, 158, 162, 202, 102, 175, 249, 93, 178, 251, 108, 175, 237, 103, 177, 244, 166, 168, 165, 97, 182, 255, 87, 185, 255, 149, 174, 216, 125, 181, 235, 110, 185, 252, 117, 183, 254, 171, 172, 209, 166, 175, 197, 103, 190, 255, 174, 176, 189, 140, 183, 221, 128, 184, 248, 120, 187, 249, 179, 180, 184, 115, 193, 253, 170, 183, 193, 174, 181, 215, 107, 197, 255, 135, 191, 246, 151, 192, 219, 187, 183, 213, 128, 197, 253, 121, 202, 255, 147, 198, 239, 188, 191, 219, 148, 200, 252, 192, 193, 197, 134, 205, 254, 171, 199, 236, 183, 199, 218, 163, 207, 251, 142, 213, 255, 158, 211, 253, 195, 205, 217, 166, 211, 245, 205, 204, 228, 153, 218, 255, 190, 210, 236, 186, 212, 231, 177, 213, 248, 162, 224, 255, 188, 221, 250, 214, 219, 221, 214, 219, 233, 174, 229, 254, 198, 225, 247, 209, 226, 248, 186, 233, 251, 227, 230, 239, 225, 241, 252, 253, 255, 252, 255, 255, 255, 33, 249, 4, 1, 10, 0, 255, 0, 44, 0, 0, 0, 0, 120, 0, 67, 0, 0, 8, 254, 0, 255, 9, 28, 72, 176, 160, 193, 131, 8, 19, 42, 92, 200, 176, 161, 195, 135, 16, 35, 74, 156, 72, 177, 162, 197, 139, 22, 131, 105, 12, 134, 177, 163, 199, 143, 193, 164, 73, 227, 38, 141, 28, 56, 112, 228, 76, 146, 20, 41, 205, 152, 75, 99, 183, 100, 201, 50, 101, 202, 147, 77, 79, 166, 102, 205, 250, 200, 19, 100, 73, 114, 239, 238, 221, 123, 71, 148, 104, 202, 163, 224, 86, 138, 124, 25, 115, 166, 205, 72, 145, 246, 72, 221, 195, 39, 207, 30, 69, 158, 118, 246, 220, 202, 208, 24, 184, 160, 252, 248, 9, 29, 59, 212, 100, 75, 99, 53, 159, 66, 93, 203, 182, 109, 84, 169, 124, 248, 156, 57, 163, 165, 174, 150, 60, 138, 76, 113, 221, 251, 207, 24, 183, 119, 97, 3, 135, 125, 71, 78, 90, 76, 62, 142, 70, 141, 18, 53, 109, 170, 227, 199, 144, 35, 75, 157, 91, 87, 137, 229, 28, 74, 190, 228, 229, 139, 209, 43, 96, 193, 247, 10, 203, 114, 212, 167, 82, 47, 93, 197, 138, 81, 163, 166, 173, 19, 47, 201, 176, 99, 59, 166, 171, 36, 135, 237, 22, 45, 114, 216, 209, 203, 25, 98, 176, 191, 66, 195, 134, 54, 230, 233, 150, 179, 100, 197, 106, 181, 90, 158, 171, 57, 179, 110, 231, 124, 185, 145, 77, 157, 186, 150, 218, 45, 76, 104, 111, 145, 71, 86, 239, 133, 198, 200, 254, 145, 189, 199, 205, 212, 212, 115, 244, 232, 157, 107, 86, 172, 185, 234, 92, 197, 154, 137, 11, 231, 11, 77, 245, 251, 178, 207, 40, 201, 254, 225, 131, 134, 39, 138, 124, 103, 80, 73, 68, 13, 37, 141, 39, 144, 213, 115, 14, 60, 235, 116, 211, 12, 123, 197, 136, 67, 141, 106, 226, 156, 51, 78, 16, 92, 208, 194, 7, 126, 28, 70, 166, 159, 9, 26, 132, 104, 130, 29, 2, 254, 67, 32, 81, 224, 200, 18, 91, 56, 240, 208, 35, 78, 51, 238, 49, 40, 223, 58, 240, 88, 99, 132, 31, 207, 168, 131, 14, 55, 206, 56, 115, 203, 41, 167, 172, 229, 73, 36, 158, 196, 133, 216, 83, 29, 58, 166, 69, 11, 26, 88, 96, 129, 6, 95, 112, 230, 213, 81, 210, 188, 21, 27, 59, 208, 208, 179, 14, 123, 205, 81, 227, 96, 55, 235, 208, 227, 14, 23, 126, 244, 162, 204, 49, 200, 64, 3, 13, 51, 194, 232, 162, 139, 50, 105, 106, 131, 13, 54, 225, 132, 227, 205, 157, 207, 96, 243, 204, 48, 195, 244, 72, 28, 126, 103, 48, 233, 164, 6, 36, 246, 20, 210, 81, 198, 224, 87, 143, 48, 12, 78, 8, 75, 43, 242, 21, 3, 38, 60, 227, 116, 224, 2, 22, 135, 32, 162, 41, 33, 112, 208, 129, 72, 35, 135, 8, 242, 72, 40, 163, 150, 82, 202, 42, 186, 172, 178, 203, 46, 169, 170, 154, 76, 50, 254, 123, 158, 194, 97, 14, 22, 60, 240, 192, 7, 188, 117, 228, 23, 74, 198, 88, 41, 219, 56, 189, 36, 19, 203, 57, 235, 80, 147, 11, 44, 176, 20, 211, 96, 51, 240, 192, 195, 14, 5, 36, 88, 129, 8, 33, 116, 200, 81, 198, 181, 101, 208, 1, 199, 27, 220, 110, 59, 69, 22, 130, 20, 82, 200, 35, 165, 76, 34, 110, 33, 147, 64, 162, 174, 42, 192, 200, 122, 223, 25, 38, 216, 186, 192, 19, 24, 133, 52, 82, 149, 247, 161, 179, 203, 35, 136, 8, 243, 72, 57, 244, 80, 179, 220, 39, 185, 192, 163, 77, 55, 244, 236, 227, 14, 5, 17, 0, 65, 7, 25, 101, 120, 81, 197, 196, 216, 82, 97, 49, 21, 81, 68, 145, 69, 22, 105, 116, 236, 113, 26, 161, 148, 59, 136, 24, 98, 64, 210, 203, 40, 28, 106, 161, 193, 2, 11, 88, 144, 171, 68, 246, 74, 163, 226, 125, 207, 156, 105, 8, 25, 212, 54, 218, 202, 39, 4, 227, 115, 142, 54, 233, 177, 211, 65, 4, 51, 84, 113, 109, 21, 77, 52, 1, 69, 23, 19, 15, 1, 197, 16, 84, 12, 17, 197, 182, 112, 8, 146, 198, 20, 86, 147, 139, 204, 49, 169, 78, 50, 200, 32, 144, 56, 210, 97, 14, 15, 176, 28, 37, 204, 198, 180, 228, 107, 108, 158, 60, 19, 202, 43, 159, 200, 225, 133, 28, 175, 224, 3, 15, 50, 176, 80, 2, 75, 254, 51, 94, 34, 140, 143, 208, 68, 119, 129, 45, 210, 93, 48, 13, 197, 210, 60, 240, 0, 133, 15, 111, 104, 138, 8, 28, 27, 79, 1, 199, 35, 163, 234, 18, 139, 155, 233, 206, 177, 97, 202, 22, 28, 112, 128, 14, 17, 5, 227, 210, 204, 213, 69, 178, 11, 40, 160, 16, 194, 8, 33, 134, 52, 17, 142, 122, 197, 236, 156, 11, 51, 185, 52, 3, 244, 62, 128, 207, 16, 49, 182, 93, 36, 125, 120, 23, 135, 67, 193, 131, 15, 112, 148, 147, 143, 58, 216, 8, 3, 249, 198, 89, 192, 1, 199, 33, 143, 196, 18, 203, 42, 144, 104, 222, 33, 31, 26, 120, 62, 194, 67, 162, 255, 121, 159, 35, 149, 104, 58, 135, 21, 100, 64, 92, 69, 139, 198, 238, 156, 236, 222, 226, 208, 131, 207, 56, 13, 56, 80, 116, 19, 215, 54, 81, 197, 24, 73, 23, 126, 248, 16, 62, 248, 144, 133, 62, 110, 112, 194, 50, 202, 113, 8, 231, 101, 193, 7, 64, 152, 220, 184, 30, 129, 42, 93, 168, 66, 108, 29, 50, 129, 231, 52, 208, 16, 89, 220, 162, 87, 248, 137, 68, 29, 178, 160, 6, 53, 188, 225, 5, 85, 176, 86, 21, 232, 1, 15, 113, 228, 98, 57, 173, 104, 143, 151, 224, 241, 190, 248, 249, 160, 126, 114, 136, 161, 181, 202, 16, 53, 167, 13, 97, 120, 105, 184, 7, 7, 12, 224, 4, 111, 192, 65, 114, 254, 144, 3, 66, 26, 14, 145, 6, 43, 88, 1, 11, 107, 128, 196, 42, 86, 1, 65, 14, 181, 224, 0, 1, 160, 160, 66, 100, 114, 139, 181, 197, 230, 22, 117, 152, 194, 20, 162, 160, 134, 42, 144, 64, 10, 248, 163, 67, 122, 214, 17, 187, 79, 232, 45, 23, 226, 16, 7, 62, 240, 97, 13, 5, 16, 109, 12, 215, 98, 4, 207, 64, 193, 51, 77, 53, 66, 83, 84, 240, 65, 26, 218, 113, 1, 3, 180, 1, 27, 144, 19, 196, 183, 128, 128, 196, 66, 132, 98, 13, 63, 72, 228, 15, 176, 32, 134, 68, 52, 241, 62, 45, 8, 64, 0, 106, 144, 144, 89, 152, 66, 22, 8, 186, 207, 40, 214, 32, 8, 107, 216, 194, 5, 67, 144, 218, 15, 134, 208, 5, 68, 184, 15, 30, 205, 120, 148, 25, 97, 1, 157, 125, 208, 227, 25, 3, 136, 64, 12, 232, 215, 136, 121, 200, 35, 31, 249, 168, 71, 61, 242, 33, 143, 118, 108, 67, 30, 208, 128, 195, 32, 218, 49, 1, 1, 180, 1, 121, 199, 120, 197, 35, 136, 184, 134, 102, 146, 11, 137, 88, 80, 228, 37, 104, 145, 36, 13, 72, 178, 80, 5, 153, 5, 78, 50, 73, 157, 72, 92, 98, 13, 135, 208, 135, 63, 252, 129, 132, 40, 116, 193, 105, 192, 11, 5, 62, 92, 217, 140, 157, 49, 162, 21, 104, 60, 199, 62, 224, 225, 10, 2, 68, 128, 10, 114, 254, 32, 196, 49, 178, 113, 129, 11, 112, 224, 159, 37, 224, 192, 6, 46, 176, 129, 108, 148, 99, 21, 213, 40, 230, 1, 78, 128, 3, 55, 240, 34, 29, 216, 8, 197, 36, 122, 81, 10, 114, 61, 2, 93, 107, 136, 230, 28, 230, 96, 13, 43, 202, 230, 1, 1, 56, 128, 119, 10, 146, 150, 251, 240, 65, 21, 88, 200, 194, 60, 198, 233, 143, 84, 164, 193, 104, 72, 43, 195, 49, 214, 8, 143, 216, 49, 226, 157, 197, 208, 70, 251, 216, 193, 5, 2, 100, 160, 10, 129, 64, 4, 54, 54, 81, 2, 24, 148, 128, 6, 48, 160, 193, 81, 3, 202, 0, 115, 120, 99, 19, 19, 40, 128, 1, 74, 208, 79, 6, 20, 32, 12, 222, 8, 133, 45, 136, 241, 141, 103, 232, 194, 84, 143, 72, 195, 15, 196, 112, 9, 87, 248, 226, 22, 28, 58, 3, 20, 183, 71, 144, 89, 16, 201, 163, 145, 185, 68, 74, 7, 145, 130, 106, 140, 83, 15, 136, 40, 131, 181, 154, 48, 6, 111, 140, 145, 61, 173, 72, 214, 131, 210, 83, 41, 2, 160, 128, 12, 140, 104, 68, 57, 220, 80, 212, 106, 224, 50, 151, 250, 248, 69, 9, 24, 208, 6, 126, 28, 225, 2, 1, 32, 70, 53, 126, 193, 88, 1, 0, 96, 17, 165, 96, 2, 65, 113, 16, 6, 76, 96, 98, 27, 202, 16, 43, 89, 51, 193, 10, 82, 108, 174, 58, 38, 144, 254, 228, 203, 134, 4, 87, 200, 220, 1, 11, 64, 160, 66, 16, 12, 80, 128, 118, 216, 195, 5, 141, 40, 31, 182, 216, 145, 30, 23, 181, 135, 149, 212, 8, 19, 60, 188, 145, 0, 4, 100, 225, 19, 59, 155, 7, 13, 78, 80, 130, 109, 60, 67, 24, 141, 128, 67, 33, 204, 81, 130, 2, 84, 224, 30, 37, 152, 128, 4, 242, 113, 167, 121, 216, 162, 152, 39, 120, 6, 8, 4, 192, 128, 13, 112, 160, 159, 6, 192, 68, 41, 122, 240, 131, 65, 0, 2, 16, 115, 48, 171, 51, 238, 3, 69, 41, 254, 195, 173, 181, 125, 12, 31, 122, 0, 132, 25, 248, 192, 3, 211, 56, 0, 13, 54, 145, 5, 50, 236, 149, 126, 236, 104, 17, 60, 186, 113, 44, 73, 73, 120, 29, 174, 136, 37, 28, 102, 215, 10, 121, 208, 192, 13, 71, 72, 135, 50, 38, 22, 133, 66, 164, 163, 187, 12, 216, 6, 7, 24, 112, 132, 114, 192, 33, 13, 144, 248, 69, 1, 0, 112, 2, 98, 126, 54, 30, 211, 32, 6, 26, 120, 11, 12, 32, 244, 64, 12, 115, 240, 195, 18, 174, 0, 8, 87, 144, 226, 20, 164, 147, 76, 36, 3, 48, 82, 243, 4, 120, 42, 3, 182, 193, 10, 86, 48, 3, 18, 20, 32, 0, 2, 32, 129, 26, 200, 80, 133, 194, 53, 129, 12, 236, 160, 17, 60, 210, 7, 11, 113, 172, 227, 204, 225, 144, 129, 254, 97, 65, 33, 12, 129, 165, 131, 3, 55, 112, 131, 45, 142, 81, 5, 42, 188, 225, 17, 237, 88, 241, 2, 36, 107, 128, 69, 196, 66, 13, 130, 120, 6, 26, 60, 187, 136, 106, 120, 22, 23, 186, 224, 90, 60, 12, 0, 0, 78, 76, 161, 7, 88, 152, 67, 16, 92, 176, 4, 34, 92, 97, 11, 91, 200, 132, 53, 204, 35, 153, 51, 72, 146, 94, 255, 120, 242, 84, 60, 177, 4, 41, 171, 64, 5, 59, 0, 2, 5, 18, 128, 1, 56, 220, 236, 90, 189, 83, 3, 59, 206, 97, 230, 102, 64, 55, 23, 201, 61, 179, 55, 26, 128, 128, 52, 188, 162, 24, 204, 128, 196, 52, 56, 0, 131, 77, 88, 67, 24, 132, 64, 196, 33, 212, 241, 139, 11, 20, 224, 8, 104, 184, 128, 0, 170, 129, 8, 53, 100, 193, 25, 16, 0, 0, 0, 182, 49, 104, 6, 36, 67, 153, 143, 184, 68, 2, 0, 192, 133, 52, 160, 0, 11, 87, 120, 129, 11, 88, 192, 110, 18, 144, 128, 8, 153, 118, 70, 162, 34, 99, 129, 40, 10, 196, 164, 128, 232, 193, 10, 98, 16, 131, 29, 248, 27, 8, 133, 224, 32, 33, 132, 123, 173, 70, 172, 35, 141, 235, 64, 6, 116, 97, 65, 172, 51, 103, 98, 0, 25, 120, 133, 48, 218, 163, 138, 84, 252, 51, 27, 232, 160, 6, 51, 160, 193, 142, 108, 28, 97, 2, 12, 176, 7, 18, 254, 250, 136, 142, 14, 102, 161, 19, 140, 102, 64, 59, 178, 189, 1, 109, 188, 34, 20, 133, 240, 131, 103, 57, 113, 136, 31, 44, 97, 14, 91, 32, 1, 187, 89, 224, 110, 23, 144, 160, 8, 96, 240, 3, 46, 146, 44, 149, 15, 4, 96, 1, 247, 174, 206, 41, 176, 96, 131, 29, 240, 32, 6, 42, 224, 247, 14, 124, 16, 5, 58, 88, 221, 193, 85, 240, 2, 51, 194, 113, 142, 110, 72, 40, 23, 202, 233, 70, 179, 202, 209, 1, 2, 212, 129, 25, 108, 202, 133, 55, 208, 192, 129, 18, 152, 227, 30, 230, 216, 6, 49, 156, 64, 108, 8, 164, 226, 30, 48, 152, 192, 6, 158, 65, 7, 53, 88, 1, 9, 158, 61, 194, 52, 102, 76, 12, 109, 8, 35, 22, 144, 232, 196, 161, 225, 32, 134, 43, 92, 161, 8, 47, 120, 1, 17, 212, 237, 110, 12, 252, 28, 211, 156, 128, 140, 18, 36, 41, 144, 215, 194, 198, 19, 115, 0, 194, 10, 84, 192, 131, 33, 240, 187, 223, 62, 160, 66, 178, 7, 14, 49, 50, 208, 233, 96, 231, 152, 16, 123, 230, 83, 142, 12, 59, 32, 22, 26, 103, 70, 43, 230, 1, 130, 182, 95, 128, 6, 19, 184, 64, 240, 139, 234, 134, 120, 84, 99, 197, 109, 240, 134, 26, 232, 80, 7, 11, 104, 123, 27, 72, 0, 192, 6, 228, 49, 14, 61, 165, 131, 6, 0, 144, 0, 43, 4, 254, 49, 136, 43, 16, 33, 8, 30, 136, 60, 188, 225, 237, 238, 23, 20, 97, 11, 153, 127, 204, 230, 3, 240, 223, 234, 140, 2, 11, 83, 142, 58, 15, 202, 80, 133, 167, 199, 96, 8, 141, 128, 155, 33, 62, 65, 6, 67, 112, 29, 26, 21, 114, 14, 204, 144, 83, 212, 112, 14, 222, 80, 118, 98, 128, 12, 180, 35, 12, 185, 32, 15, 16, 0, 103, 71, 0, 98, 71, 0, 3, 48, 224, 6, 219, 48, 15, 143, 32, 9, 28, 48, 1, 188, 80, 14, 84, 160, 6, 137, 192, 104, 23, 144, 14, 217, 38, 1, 188, 112, 130, 188, 0, 3, 152, 149, 10, 230, 50, 8, 150, 22, 4, 50, 0, 6, 91, 64, 4, 46, 224, 2, 145, 7, 126, 65, 16, 4, 91, 128, 11, 234, 199, 121, 255, 16, 23, 178, 81, 7, 82, 32, 2, 168, 22, 3, 62, 48, 4, 100, 160, 6, 79, 23, 5, 135, 240, 10, 173, 48, 45, 251, 7, 13, 231, 160, 38, 102, 118, 14, 117, 82, 39, 126, 0, 113, 186, 128, 12, 12, 88, 11, 185, 176, 13, 19, 112, 3, 37, 192, 15, 185, 84, 15, 243, 16, 15, 234, 112, 12, 136, 80, 10, 237, 64, 12, 196, 112, 15, 215, 64, 5, 112, 128, 11, 22, 208, 103, 182, 32, 1, 0, 192, 0, 239, 5, 80, 23, 208, 6, 207, 80, 8, 96, 3, 111, 70, 128, 6, 118, 192, 4, 96, 0, 121, 254, 36, 240, 2, 96, 176, 33, 150, 192, 5, 92, 224, 43, 235, 39, 16, 103, 224, 121, 144, 49, 10, 63, 48, 3, 163, 23, 3, 195, 243, 129, 101, 160, 6, 169, 247, 10, 200, 0, 10, 204, 209, 10, 194, 16, 14, 201, 195, 34, 7, 151, 12, 225, 0, 12, 10, 224, 0, 147, 160, 13, 180, 227, 133, 208, 240, 11, 196, 230, 6, 253, 112, 12, 159, 208, 119, 86, 103, 8, 214, 246, 10, 209, 80, 14, 209, 0, 10, 67, 0, 7, 227, 16, 15, 247, 192, 15, 72, 192, 91, 246, 176, 13, 169, 176, 8, 110, 144, 10, 214, 5, 61, 35, 227, 2, 91, 32, 3, 86, 33, 21, 92, 0, 6, 47, 224, 1, 50, 32, 10, 176, 17, 137, 63, 72, 137, 142, 113, 10, 98, 208, 116, 81, 199, 111, 60, 64, 5, 143, 83, 6, 67, 160, 6, 177, 16, 14, 208, 160, 13, 106, 194, 12, 200, 160, 12, 218, 112, 12, 82, 152, 12, 187, 160, 10, 151, 64, 1, 8, 240, 3, 10, 184, 51, 148, 208, 10, 139, 85, 2, 37, 176, 9, 253, 32, 12, 134, 80, 6, 251, 83, 62, 84, 144, 45, 141, 64, 8, 84, 192, 3, 158, 8, 4, 86, 64, 10, 28, 32, 0, 56, 224, 13, 194, 176, 11, 222, 80, 14, 202, 16, 10, 135, 32, 46, 141, 7, 111, 45, 224, 24, 145, 144, 9, 91, 0, 6, 70, 0, 6, 112, 101, 116, 72, 247, 254, 15, 123, 112, 6, 176, 65, 11, 63, 176, 111, 59, 208, 111, 154, 216, 142, 135, 0, 10, 136, 16, 10, 194, 160, 13, 201, 160, 13, 117, 34, 14, 208, 128, 12, 186, 208, 11, 187, 112, 9, 128, 224, 1, 20, 64, 0, 8, 96, 3, 203, 1, 11, 159, 112, 83, 175, 80, 15, 52, 208, 118, 196, 144, 15, 185, 32, 66, 67, 80, 5, 100, 64, 7, 81, 83, 56, 85, 48, 3, 20, 233, 3, 54, 208, 3, 157, 192, 0, 0, 64, 12, 208, 0, 10, 63, 4, 7, 202, 54, 146, 133, 48, 7, 151, 64, 4, 96, 112, 146, 144, 225, 7, 96, 192, 5, 226, 40, 21, 245, 38, 69, 158, 48, 23, 145, 97, 10, 115, 96, 3, 34, 48, 122, 231, 88, 122, 112, 160, 6, 165, 16, 11, 161, 112, 12, 202, 112, 9, 151, 16, 14, 226, 32, 143, 244, 40, 6, 24, 224, 0, 8, 128, 0, 17, 128, 2, 135, 128, 66, 173, 64, 9, 140, 64, 9, 185, 208, 15, 196, 144, 10, 191, 192, 15, 236, 0, 10, 114, 96, 56, 93, 32, 7, 73, 120, 67, 80, 64, 5, 59, 128, 132, 84, 0, 4, 107, 48, 104, 5, 240, 13, 194, 0, 10, 111, 0, 4, 64, 32, 57, 105, 128, 46, 171, 48, 7, 223, 39, 4, 145, 1, 132, 157, 246, 105, 2, 49, 11, 115, 33, 142, 167, 240, 3, 54, 224, 3, 153, 152, 56, 80, 243, 6, 112, 254, 0, 138, 177, 32, 12, 208, 160, 10, 106, 130, 13, 0, 24, 14, 197, 128, 148, 107, 208, 3, 86, 32, 138, 202, 193, 51, 85, 121, 83, 173, 112, 14, 229, 192, 14, 234, 80, 14, 173, 160, 87, 101, 0, 60, 33, 148, 132, 112, 32, 60, 60, 48, 3, 184, 233, 3, 170, 224, 75, 237, 128, 13, 79, 72, 5, 84, 246, 45, 83, 0, 136, 221, 71, 4, 50, 64, 147, 29, 178, 100, 35, 37, 147, 132, 249, 24, 137, 128, 152, 43, 224, 111, 57, 121, 132, 92, 4, 7, 161, 160, 12, 111, 162, 11, 115, 32, 153, 199, 176, 117, 63, 83, 158, 244, 8, 10, 148, 48, 144, 237, 25, 8, 44, 26, 8, 114, 16, 8, 169, 193, 8, 11, 41, 56, 133, 195, 3, 244, 99, 117, 84, 80, 5, 80, 192, 111, 244, 195, 63, 64, 16, 10, 186, 32, 12, 5, 234, 3, 49, 48, 3, 195, 153, 6, 88, 48, 50, 240, 246, 1, 73, 178, 7, 253, 213, 86, 90, 224, 160, 142, 33, 6, 33, 48, 101, 254, 118, 67, 169, 39, 8, 175, 208, 132, 210, 179, 11, 189, 176, 5, 202, 160, 12, 107, 194, 117, 83, 216, 10, 180, 83, 149, 44, 234, 5, 99, 224, 5, 127, 224, 5, 110, 58, 6, 178, 89, 6, 74, 51, 49, 80, 192, 144, 246, 83, 6, 159, 210, 119, 166, 55, 75, 12, 57, 3, 213, 201, 132, 160, 160, 6, 81, 48, 4, 254, 51, 48, 3, 89, 96, 68, 73, 234, 125, 65, 96, 2, 73, 18, 91, 1, 240, 50, 255, 160, 8, 81, 234, 24, 142, 176, 4, 33, 32, 2, 137, 57, 3, 84, 0, 5, 29, 84, 53, 64, 154, 42, 170, 144, 9, 92, 112, 9, 165, 16, 143, 196, 98, 133, 12, 184, 51, 104, 170, 166, 99, 176, 166, 115, 227, 162, 173, 154, 52, 247, 217, 101, 89, 87, 6, 132, 208, 8, 62, 89, 5, 67, 144, 147, 19, 195, 3, 43, 96, 3, 81, 240, 10, 141, 160, 6, 95, 217, 159, 126, 106, 3, 71, 36, 6, 68, 80, 4, 50, 144, 36, 106, 21, 0, 108, 5, 165, 147, 42, 21, 166, 96, 169, 83, 214, 111, 137, 83, 5, 206, 3, 10, 161, 48, 61, 170, 224, 7, 32, 0, 1, 50, 0, 9, 186, 64, 39, 86, 104, 120, 202, 161, 170, 140, 224, 166, 106, 250, 7, 109, 234, 166, 49, 228, 5, 134, 224, 5, 73, 67, 63, 114, 80, 5, 183, 154, 58, 55, 164, 2, 177, 73, 6, 80, 96, 164, 108, 214, 10, 92, 198, 63, 51, 16, 2, 6, 75, 95, 138, 42, 165, 248, 1, 82, 34, 117, 16, 166, 80, 23, 155, 115, 11, 87, 96, 161, 51, 192, 111, 156, 170, 108, 160, 32, 61, 171, 192, 10, 32, 16, 124, 48, 208, 9, 189, 128, 148, 208, 16, 14, 176, 72, 59, 55, 69, 154, 129, 192, 166, 127, 176, 166, 114, 163, 254, 166, 94, 0, 49, 77, 192, 3, 73, 208, 4, 115, 67, 6, 160, 128, 171, 132, 160, 6, 60, 10, 49, 60, 96, 3, 112, 112, 179, 100, 16, 8, 236, 8, 4, 54, 96, 176, 33, 128, 2, 40, 192, 2, 68, 160, 4, 213, 116, 77, 9, 33, 169, 90, 48, 21, 115, 160, 111, 153, 184, 3, 114, 136, 58, 135, 208, 173, 171, 224, 10, 253, 132, 6, 81, 113, 10, 172, 240, 38, 216, 160, 13, 242, 40, 164, 104, 250, 7, 129, 224, 174, 129, 192, 8, 114, 208, 166, 134, 128, 63, 17, 147, 56, 77, 32, 155, 132, 32, 138, 136, 80, 5, 58, 11, 5, 47, 219, 5, 253, 9, 7, 46, 74, 8, 236, 232, 3, 244, 133, 2, 71, 139, 180, 44, 16, 4, 73, 178, 100, 148, 164, 16, 121, 80, 23, 82, 225, 10, 55, 153, 137, 70, 168, 6, 136, 32, 8, 47, 86, 8, 165, 160, 9, 19, 96, 6, 142, 193, 7, 163, 176, 11, 202, 192, 117, 242, 232, 78, 108, 235, 174, 238, 58, 6, 104, 203, 170, 73, 227, 5, 73, 48, 179, 65, 139, 171, 175, 80, 109, 84, 80, 52, 178, 217, 4, 187, 58, 4, 217, 82, 5, 83, 99, 5, 61, 128, 180, 190, 203, 2, 46, 192, 180, 78, 36, 73, 254, 197, 184, 117, 145, 7, 180, 192, 116, 138, 201, 111, 133, 74, 117, 89, 112, 8, 186, 160, 9, 23, 16, 25, 159, 171, 83, 240, 254, 120, 66, 104, 58, 6, 129, 176, 166, 174, 10, 167, 100, 80, 175, 245, 138, 51, 160, 144, 11, 112, 153, 71, 47, 84, 62, 49, 91, 122, 116, 0, 60, 81, 0, 4, 152, 122, 180, 75, 144, 1, 25, 112, 184, 17, 68, 188, 15, 209, 184, 90, 80, 173, 54, 80, 168, 167, 39, 60, 22, 243, 6, 208, 43, 189, 146, 49, 10, 218, 112, 174, 19, 119, 44, 60, 67, 186, 45, 234, 162, 114, 80, 175, 93, 86, 6, 159, 0, 10, 177, 11, 7, 81, 112, 132, 47, 75, 175, 78, 99, 52, 60, 160, 2, 86, 90, 168, 54, 176, 4, 46, 144, 1, 87, 112, 141, 213, 113, 6, 245, 102, 111, 16, 33, 169, 138, 48, 177, 152, 184, 147, 19, 153, 122, 28, 154, 12, 156, 48, 189, 146, 241, 12, 87, 8, 13, 26, 215, 30, 237, 89, 11, 200, 128, 12, 178, 3, 93, 235, 234, 5, 101, 144, 132, 208, 149, 41, 21, 252, 144, 220, 27, 60, 117, 250, 116, 161, 228, 163, 132, 116, 5, 46, 144, 8, 248, 161, 4, 11, 32, 73, 139, 27, 17, 166, 240, 5, 144, 208, 3, 251, 187, 111, 165, 39, 135, 136, 240, 10, 146, 41, 192, 146, 113, 10, 231, 96, 133, 212, 32, 12, 112, 195, 162, 104, 27, 8, 173, 0, 55, 183, 214, 10, 55, 85, 149, 79, 200, 173, 144, 99, 96, 170, 35, 92, 192, 51, 4, 116, 64, 127, 161, 244, 129, 254, 83, 80, 156, 147, 16, 100, 222, 8, 91, 80, 116, 0, 103, 51, 17, 193, 192, 10, 145, 123, 161, 6, 118, 181, 175, 240, 38, 153, 64, 195, 53, 76, 178, 218, 128, 12, 185, 80, 149, 109, 251, 7, 132, 32, 7, 134, 240, 7, 49, 180, 182, 107, 11, 187, 91, 122, 8, 82, 96, 3, 89, 128, 8, 173, 208, 8, 154, 92, 6, 141, 208, 8, 129, 96, 8, 3, 103, 117, 207, 35, 81, 27, 203, 131, 212, 161, 4, 32, 21, 0, 18, 0, 169, 18, 49, 14, 107, 128, 137, 251, 150, 122, 87, 43, 12, 245, 8, 12, 27, 240, 151, 82, 241, 12, 218, 64, 13, 56, 44, 12, 181, 192, 8, 105, 123, 83, 210, 44, 55, 160, 204, 162, 148, 64, 48, 185, 16, 10, 161, 80, 68, 105, 48, 190, 114, 76, 205, 55, 149, 79, 172, 71, 45, 112, 208, 8, 163, 178, 10, 201, 128, 203, 176, 161, 5, 39, 60, 73, 30, 49, 8, 82, 230, 197, 95, 169, 202, 109, 162, 12, 192, 64, 3, 150, 0, 27, 201, 35, 12, 108, 34, 12, 210, 220, 162, 55, 229, 162, 110, 26, 203, 238, 249, 198, 177, 160, 12, 144, 48, 8, 177, 112, 12, 194, 0, 148, 205, 1, 55, 210, 44, 205, 229, 67, 7, 201, 6, 42, 12, 148, 12, 190, 0, 27, 124, 240, 1, 80, 20, 0, 46, 243, 17, 170, 96, 5, 133, 122, 155, 31, 168, 202, 14, 141, 254, 12, 189, 128, 4, 146, 32, 25, 124, 160, 13, 171, 44, 144, 45, 106, 8, 134, 240, 162, 11, 188, 182, 208, 149, 66, 229, 169, 13, 151, 160, 10, 247, 88, 10, 68, 89, 182, 85, 233, 96, 194, 101, 209, 81, 160, 108, 151, 211, 11, 192, 240, 24, 168, 192, 7, 42, 243, 209, 11, 144, 200, 30, 145, 12, 105, 80, 168, 205, 171, 6, 231, 252, 10, 151, 179, 11, 156, 112, 4, 252, 188, 198, 100, 112, 205, 46, 26, 208, 114, 243, 162, 238, 233, 133, 104, 87, 143, 47, 192, 10, 202, 80, 10, 200, 64, 148, 225, 160, 198, 104, 26, 8, 179, 137, 183, 114, 120, 8, 166, 162, 212, 190, 66, 43, 158, 115, 0, 243, 194, 21, 127, 232, 167, 51, 224, 111, 84, 87, 203, 165, 176, 11, 154, 0, 3, 220, 244, 24, 189, 16, 206, 14, 214, 182, 11, 108, 8, 105, 107, 211, 239, 36, 12, 150, 29, 39, 30, 176, 5, 172, 208, 11, 14, 205, 12, 218, 80, 11, 235, 73, 9, 44, 42, 155, 134, 128, 49, 181, 60, 9, 170, 48, 10, 230, 161, 5, 31, 240, 0, 125, 253, 0, 160, 182, 23, 147, 64, 180, 23, 58, 117, 84, 23, 5, 130, 112, 42, 174, 0, 3, 150, 240, 151, 171, 144, 58, 1, 205, 174, 114, 80, 205, 160, 108, 214, 3, 25, 209, 185, 160, 13, 202, 208, 0, 3, 224, 1, 151, 32, 166, 152, 57, 48, 134, 254, 112, 83, 16, 115, 45, 114, 184, 6, 125, 112, 7, 123, 160, 5, 241, 178, 0, 125, 61, 2, 216, 196, 23, 144, 80, 96, 21, 91, 177, 253, 19, 5, 83, 112, 216, 192, 80, 2, 95, 96, 23, 82, 234, 9, 165, 128, 8, 65, 27, 180, 110, 74, 8, 163, 221, 182, 54, 157, 205, 181, 192, 128, 185, 240, 10, 208, 160, 11, 13, 160, 0, 24, 0, 6, 208, 32, 158, 208, 208, 30, 234, 42, 223, 85, 144, 5, 216, 45, 23, 57, 208, 218, 44, 227, 221, 22, 240, 4, 90, 241, 29, 170, 64, 157, 215, 170, 147, 196, 147, 208, 201, 128, 4, 102, 96, 25, 32, 94, 23, 147, 120, 7, 125, 176, 6, 113, 160, 6, 214, 60, 55, 106, 122, 223, 114, 4, 79, 39, 148, 11, 255, 77, 1, 20, 112, 5, 170, 48, 182, 205, 12, 205, 159, 64, 57, 120, 144, 221, 219, 157, 3, 38, 80, 43, 101, 195, 50, 19, 238, 203, 189, 1, 185, 243, 188, 188, 62, 48, 5, 202, 128, 13, 201, 192, 6, 110, 224, 86, 121, 0, 226, 82, 174, 4, 34, 126, 6, 36, 222, 7, 120, 96, 226, 220, 226, 56, 17, 44, 154, 151, 227, 148, 118, 201, 10, 124, 50, 10, 142, 176, 33, 215, 225, 227, 77, 2, 228, 182, 242, 0, 53, 240, 5, 68, 94, 34, 229, 120, 169, 137, 169, 2, 6, 150, 5, 229, 186, 206, 48, 64, 16, 166, 160, 8, 192, 81, 62, 229, 32, 142, 25, 84, 238, 222, 115, 49, 232, 132, 110, 23, 215, 113, 25, 218, 17, 34, 78, 178, 232, 181, 98, 1, 109, 30, 32, 37, 162, 16, 151, 64, 184, 152, 26, 127, 73, 94, 10, 73, 9, 12, 56, 128, 16, 218, 148, 7, 121, 240, 5, 182, 17, 234, 162, 158, 3, 184, 129, 27, 218, 113, 234, 218, 209, 31, 253, 17, 34, 172, 206, 232, 38, 160, 3, 0, 82, 225, 145, 206, 16, 148, 142, 169, 116, 126, 164, 186, 144, 12, 187, 237, 16, 150, 20, 9, 118, 96, 7, 95, 240, 5, 216, 145, 29, 168, 158, 234, 170, 174, 1, 31, 160, 3, 184, 17, 236, 120, 33, 235, 179, 254, 16, 144, 75, 184, 136, 153, 106, 22, 185, 6, 147, 192, 10, 174, 176, 1, 60, 65, 19, 145, 240, 230, 207, 222, 17, 128, 64, 184, 33, 96, 164, 86, 144, 6, 225, 226, 165, 154, 32, 1, 223, 190, 238, 21, 225, 10, 75, 128, 2, 54, 240, 3, 66, 148, 6, 228, 178, 11, 192, 192, 4, 236, 158, 239, 2, 17, 16, 0, 59}; 07070100180dec000081a40000000000000000000000014dc0f4130000064a000000b600010002ffffffffffffffff0000002c00000000root/usr/local/include/php/main/php_ticks.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Stig Bakken | +----------------------------------------------------------------------+ */ /* $Id: php_ticks.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef PHP_TICKS_H #define PHP_TICKS_H int php_startup_ticks(TSRMLS_D); void php_deactivate_ticks(TSRMLS_D); void php_shutdown_ticks(TSRMLS_D); void php_run_ticks(int count); BEGIN_EXTERN_C() PHPAPI void php_add_tick_function(void (*func)(int)); PHPAPI void php_remove_tick_function(void (*func)(int)); END_EXTERN_C() #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: */ 07070100180dfe000081a40000000000000000000000014dc0f41300000ab4000000b600010002ffffffffffffffff0000002a00000000root/usr/local/include/php/main/win95nt.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: | +----------------------------------------------------------------------+ */ /* $Id: win95nt.h 306939 2011-01-01 02:19:59Z felipe $ */ /* Defines and types for Windows 95/NT */ #define HAVE_DECLARED_TIMEZONE #define WIN32_LEAN_AND_MEAN #include #include #include #include #include #include #include #include typedef int uid_t; typedef int gid_t; typedef char * caddr_t; #define lstat(x, y) php_sys_lstat(x, y) #define _IFIFO 0010000 /* fifo */ #define _IFBLK 0060000 /* block special */ #define _IFLNK 0120000 /* symbolic link */ #define S_IFIFO _IFIFO #define S_IFBLK _IFBLK #define S_IFLNK _IFLNK #ifndef S_ISREG #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif #define chdir(path) _chdir(path) #define mkdir(a, b) _mkdir(a) #define rmdir(a) _rmdir(a) #define getpid _getpid #define php_sleep(t) SleepEx(t*1000, TRUE) #ifndef getcwd # define getcwd(a, b) _getcwd(a, b) #endif #define off_t _off_t typedef unsigned int uint; typedef unsigned long ulong; #if !NSAPI typedef long pid_t; #endif /* missing in vc5 math.h */ #define M_PI 3.14159265358979323846 #define M_TWOPI (M_PI * 2.0) #define M_PI_2 1.57079632679489661923 #ifndef M_PI_4 #define M_PI_4 0.78539816339744830962 #endif #if !defined(PHP_DEBUG) #ifdef inline #undef inline #endif #define inline __inline #endif /* General Windows stuff */ #ifndef WINDOWS # define WINDOWS 1 #endif /* Prevent use of VC5 OpenFile function */ #define NOOPENFILE /* sendmail is built-in */ #ifdef PHP_PROG_SENDMAIL #undef PHP_PROG_SENDMAIL #define PHP_PROG_SENDMAIL "Built in mailer" #endif 07070100180dd5000081a40000000000000000000000014dc0f4130000264c000000b600010002ffffffffffffffff0000002700000000root/usr/local/include/php/main/SAPI.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: SAPI.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef SAPI_H #define SAPI_H #include "zend.h" #include "zend_API.h" #include "zend_llist.h" #include "zend_operators.h" #ifdef PHP_WIN32 #include "win95nt.h" #endif #include #define SAPI_OPTION_NO_CHDIR 1 #define SAPI_POST_BLOCK_SIZE 4000 #ifdef PHP_WIN32 # ifdef SAPI_EXPORTS # define SAPI_API __declspec(dllexport) # else # define SAPI_API __declspec(dllimport) # endif #elif defined(__GNUC__) && __GNUC__ >= 4 # define SAPI_API __attribute__ ((visibility("default"))) #else # define SAPI_API #endif #undef shutdown typedef struct { char *header; uint header_len; } sapi_header_struct; typedef struct { zend_llist headers; int http_response_code; unsigned char send_default_content_type; char *mimetype; char *http_status_line; } sapi_headers_struct; typedef struct _sapi_post_entry sapi_post_entry; typedef struct _sapi_module_struct sapi_module_struct; BEGIN_EXTERN_C() extern SAPI_API sapi_module_struct sapi_module; /* true global */ END_EXTERN_C() /* Some values in this structure needs to be filled in before * calling sapi_activate(). We WILL change the `char *' entries, * so make sure that you allocate a separate buffer for them * and that you free them after sapi_deactivate(). */ typedef struct { const char *request_method; char *query_string; char *post_data, *raw_post_data; char *cookie_data; long content_length; uint post_data_length, raw_post_data_length; char *path_translated; char *request_uri; const char *content_type; zend_bool headers_only; zend_bool no_headers; zend_bool headers_read; sapi_post_entry *post_entry; char *content_type_dup; /* for HTTP authentication */ char *auth_user; char *auth_password; char *auth_digest; /* this is necessary for the CGI SAPI module */ char *argv0; /* this is necessary for Safe Mode */ char *current_user; int current_user_length; /* this is necessary for CLI module */ int argc; char **argv; int proto_num; } sapi_request_info; typedef struct _sapi_globals_struct { void *server_context; sapi_request_info request_info; sapi_headers_struct sapi_headers; int read_post_bytes; unsigned char headers_sent; struct stat global_stat; char *default_mimetype; char *default_charset; HashTable *rfc1867_uploaded_files; long post_max_size; int options; zend_bool sapi_started; time_t global_request_time; HashTable known_post_content_types; } sapi_globals_struct; BEGIN_EXTERN_C() #ifdef ZTS # define SG(v) TSRMG(sapi_globals_id, sapi_globals_struct *, v) SAPI_API extern int sapi_globals_id; #else # define SG(v) (sapi_globals.v) extern SAPI_API sapi_globals_struct sapi_globals; #endif SAPI_API void sapi_startup(sapi_module_struct *sf); SAPI_API void sapi_shutdown(void); SAPI_API void sapi_activate(TSRMLS_D); SAPI_API void sapi_deactivate(TSRMLS_D); SAPI_API void sapi_initialize_empty_request(TSRMLS_D); END_EXTERN_C() /* * This is the preferred and maintained API for * operating on HTTP headers. */ /* * Always specify a sapi_header_line this way: * * sapi_header_line ctr = {0}; */ typedef struct { char *line; /* If you allocated this, you need to free it yourself */ uint line_len; long response_code; /* long due to zend_parse_parameters compatibility */ } sapi_header_line; typedef enum { /* Parameter: */ SAPI_HEADER_REPLACE, /* sapi_header_line* */ SAPI_HEADER_ADD, /* sapi_header_line* */ SAPI_HEADER_DELETE, /* sapi_header_line* */ SAPI_HEADER_DELETE_ALL, /* void */ SAPI_HEADER_SET_STATUS /* int */ } sapi_header_op_enum; BEGIN_EXTERN_C() SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC); /* Deprecated functions. Use sapi_header_op instead. */ SAPI_API int sapi_add_header_ex(char *header_line, uint header_line_len, zend_bool duplicate, zend_bool replace TSRMLS_DC); #define sapi_add_header(a, b, c) sapi_add_header_ex((a),(b),(c),1 TSRMLS_CC) SAPI_API int sapi_send_headers(TSRMLS_D); SAPI_API void sapi_free_header(sapi_header_struct *sapi_header); SAPI_API void sapi_handle_post(void *arg TSRMLS_DC); SAPI_API int sapi_register_post_entries(sapi_post_entry *post_entry TSRMLS_DC); SAPI_API int sapi_register_post_entry(sapi_post_entry *post_entry TSRMLS_DC); SAPI_API void sapi_unregister_post_entry(sapi_post_entry *post_entry TSRMLS_DC); SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(TSRMLS_D)); SAPI_API int sapi_register_treat_data(void (*treat_data)(int arg, char *str, zval *destArray TSRMLS_DC)); SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, char *var, char **val, unsigned int val_len, unsigned int *new_val_len TSRMLS_DC), unsigned int (*input_filter_init)(TSRMLS_D)); SAPI_API int sapi_flush(TSRMLS_D); SAPI_API struct stat *sapi_get_stat(TSRMLS_D); SAPI_API char *sapi_getenv(char *name, size_t name_len TSRMLS_DC); SAPI_API char *sapi_get_default_content_type(TSRMLS_D); SAPI_API void sapi_get_default_content_type_header(sapi_header_struct *default_header TSRMLS_DC); SAPI_API size_t sapi_apply_default_charset(char **mimetype, size_t len TSRMLS_DC); SAPI_API void sapi_activate_headers_only(TSRMLS_D); SAPI_API int sapi_get_fd(int *fd TSRMLS_DC); SAPI_API int sapi_force_http_10(TSRMLS_D); SAPI_API int sapi_get_target_uid(uid_t * TSRMLS_DC); SAPI_API int sapi_get_target_gid(gid_t * TSRMLS_DC); SAPI_API time_t sapi_get_request_time(TSRMLS_D); SAPI_API void sapi_terminate_process(TSRMLS_D); END_EXTERN_C() struct _sapi_module_struct { char *name; char *pretty_name; int (*startup)(struct _sapi_module_struct *sapi_module); int (*shutdown)(struct _sapi_module_struct *sapi_module); int (*activate)(TSRMLS_D); int (*deactivate)(TSRMLS_D); int (*ub_write)(const char *str, unsigned int str_length TSRMLS_DC); void (*flush)(void *server_context); struct stat *(*get_stat)(TSRMLS_D); char *(*getenv)(char *name, size_t name_len TSRMLS_DC); void (*sapi_error)(int type, const char *error_msg, ...); int (*header_handler)(sapi_header_struct *sapi_header, sapi_header_op_enum op, sapi_headers_struct *sapi_headers TSRMLS_DC); int (*send_headers)(sapi_headers_struct *sapi_headers TSRMLS_DC); void (*send_header)(sapi_header_struct *sapi_header, void *server_context TSRMLS_DC); int (*read_post)(char *buffer, uint count_bytes TSRMLS_DC); char *(*read_cookies)(TSRMLS_D); void (*register_server_variables)(zval *track_vars_array TSRMLS_DC); void (*log_message)(char *message); time_t (*get_request_time)(TSRMLS_D); void (*terminate_process)(TSRMLS_D); char *php_ini_path_override; void (*block_interruptions)(void); void (*unblock_interruptions)(void); void (*default_post_reader)(TSRMLS_D); void (*treat_data)(int arg, char *str, zval *destArray TSRMLS_DC); char *executable_location; int php_ini_ignore; int (*get_fd)(int *fd TSRMLS_DC); int (*force_http_10)(TSRMLS_D); int (*get_target_uid)(uid_t * TSRMLS_DC); int (*get_target_gid)(gid_t * TSRMLS_DC); unsigned int (*input_filter)(int arg, char *var, char **val, unsigned int val_len, unsigned int *new_val_len TSRMLS_DC); void (*ini_defaults)(HashTable *configuration_hash); int phpinfo_as_text; char *ini_entries; const zend_function_entry *additional_functions; unsigned int (*input_filter_init)(TSRMLS_D); }; struct _sapi_post_entry { char *content_type; uint content_type_len; void (*post_reader)(TSRMLS_D); void (*post_handler)(char *content_type_dup, void *arg TSRMLS_DC); }; /* header_handler() constants */ #define SAPI_HEADER_ADD (1<<0) #define SAPI_HEADER_SENT_SUCCESSFULLY 1 #define SAPI_HEADER_DO_SEND 2 #define SAPI_HEADER_SEND_FAILED 3 #define SAPI_DEFAULT_MIMETYPE "text/html" #define SAPI_DEFAULT_CHARSET "" #define SAPI_PHP_VERSION_HEADER "X-Powered-By: PHP/" PHP_VERSION #define SAPI_POST_READER_FUNC(post_reader) void post_reader(TSRMLS_D) #define SAPI_POST_HANDLER_FUNC(post_handler) void post_handler(char *content_type_dup, void *arg TSRMLS_DC) #define SAPI_TREAT_DATA_FUNC(treat_data) void treat_data(int arg, char *str, zval* destArray TSRMLS_DC) #define SAPI_INPUT_FILTER_FUNC(input_filter) unsigned int input_filter(int arg, char *var, char **val, unsigned int val_len, unsigned int *new_val_len TSRMLS_DC) BEGIN_EXTERN_C() SAPI_API SAPI_POST_READER_FUNC(sapi_read_standard_form_data); SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader); SAPI_API SAPI_TREAT_DATA_FUNC(php_default_treat_data); SAPI_API SAPI_INPUT_FILTER_FUNC(php_default_input_filter); END_EXTERN_C() #define STANDARD_SAPI_MODULE_PROPERTIES #endif /* SAPI_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: */ 07070100180de0000081a40000000000000000000000014dc0f413000010e3000000b600010002ffffffffffffffff0000002e00000000root/usr/local/include/php/main/php_globals.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: php_globals.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef PHP_GLOBALS_H #define PHP_GLOBALS_H #include "zend_globals.h" typedef struct _php_core_globals php_core_globals; #ifdef ZTS # define PG(v) TSRMG(core_globals_id, php_core_globals *, v) extern PHPAPI int core_globals_id; #else # define PG(v) (core_globals.v) extern ZEND_API struct _php_core_globals core_globals; #endif /* Error display modes */ #define PHP_DISPLAY_ERRORS_STDOUT 1 #define PHP_DISPLAY_ERRORS_STDERR 2 /* Track vars */ #define TRACK_VARS_POST 0 #define TRACK_VARS_GET 1 #define TRACK_VARS_COOKIE 2 #define TRACK_VARS_SERVER 3 #define TRACK_VARS_ENV 4 #define TRACK_VARS_FILES 5 #define TRACK_VARS_REQUEST 6 struct _php_tick_function_entry; typedef struct _arg_separators { char *output; char *input; } arg_separators; struct _php_core_globals { zend_bool magic_quotes_gpc; zend_bool magic_quotes_runtime; zend_bool magic_quotes_sybase; zend_bool safe_mode; zend_bool allow_call_time_pass_reference; zend_bool implicit_flush; long output_buffering; char *safe_mode_include_dir; zend_bool safe_mode_gid; zend_bool sql_safe_mode; zend_bool enable_dl; char *output_handler; char *unserialize_callback_func; long serialize_precision; char *safe_mode_exec_dir; long memory_limit; long max_input_time; zend_bool track_errors; zend_bool display_errors; zend_bool display_startup_errors; zend_bool log_errors; long log_errors_max_len; zend_bool ignore_repeated_errors; zend_bool ignore_repeated_source; zend_bool report_memleaks; char *error_log; char *doc_root; char *user_dir; char *include_path; char *open_basedir; char *extension_dir; char *upload_tmp_dir; long upload_max_filesize; char *error_append_string; char *error_prepend_string; char *auto_prepend_file; char *auto_append_file; arg_separators arg_separator; char *variables_order; HashTable rfc1867_protected_variables; short connection_status; short ignore_user_abort; unsigned char header_is_being_sent; zend_llist tick_functions; zval *http_globals[6]; zend_bool expose_php; zend_bool register_globals; zend_bool register_long_arrays; zend_bool register_argc_argv; zend_bool auto_globals_jit; zend_bool y2k_compliance; char *docref_root; char *docref_ext; zend_bool html_errors; zend_bool xmlrpc_errors; long xmlrpc_error_number; zend_bool activated_auto_globals[8]; zend_bool modules_activated; zend_bool file_uploads; zend_bool during_request_startup; zend_bool allow_url_fopen; zend_bool always_populate_raw_post_data; zend_bool report_zend_debug; int last_error_type; char *last_error_message; char *last_error_file; int last_error_lineno; char *disable_functions; char *disable_classes; zend_bool allow_url_include; zend_bool exit_on_timeout; #ifdef PHP_WIN32 zend_bool com_initialized; #endif long max_input_nesting_level; zend_bool in_user_include; char *user_ini_filename; long user_ini_cache_ttl; char *request_order; zend_bool mail_x_header; char *mail_log; zend_bool in_error_log; }; #endif /* PHP_GLOBALS_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: */ 07070100180de3000081a40000000000000000000000014dc0f41300000acd000000b600010002ffffffffffffffff0000002b00000000root/usr/local/include/php/main/php_main.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: php_main.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef PHP_MAIN_H #define PHP_MAIN_H #include "zend_globals.h" #include "php_globals.h" #include "SAPI.h" BEGIN_EXTERN_C() PHPAPI int php_request_startup(TSRMLS_D); PHPAPI void php_request_shutdown(void *dummy); PHPAPI void php_request_shutdown_for_exec(void *dummy); PHPAPI int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_modules, uint num_additional_modules); PHPAPI void php_module_shutdown(TSRMLS_D); PHPAPI void php_module_shutdown_for_exec(void); PHPAPI int php_module_shutdown_wrapper(sapi_module_struct *sapi_globals); PHPAPI int php_request_startup_for_hook(TSRMLS_D); PHPAPI int php_register_extensions(zend_module_entry **ptr, int count TSRMLS_DC); PHPAPI int php_execute_script(zend_file_handle *primary_file TSRMLS_DC); PHPAPI int php_execute_simple_script(zend_file_handle *primary_file, zval **ret TSRMLS_DC); PHPAPI int php_handle_special_queries(TSRMLS_D); PHPAPI int php_lint_script(zend_file_handle *file TSRMLS_DC); PHPAPI void php_handle_aborted_connection(void); PHPAPI int php_handle_auth_data(const char *auth TSRMLS_DC); PHPAPI void php_html_puts(const char *str, uint siz TSRMLS_DC); PHPAPI int php_stream_open_for_zend_ex(const char *filename, zend_file_handle *handle, int mode TSRMLS_DC); extern void php_call_shutdown_functions(TSRMLS_D); extern void php_free_shutdown_functions(TSRMLS_D); /* environment module */ extern int php_init_environ(void); extern int php_shutdown_environ(void); END_EXTERN_C() #endif 07070100180dd6000081a40000000000000000000000014dc0f41300001394000000b600010002ffffffffffffffff0000002d00000000root/usr/local/include/php/main/build-defs.h/* -*- C -*- +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2007 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Stig Sæther Bakken | +----------------------------------------------------------------------+ */ /* $Id: build-defs.h.in 292156 2009-12-15 11:17:47Z jani $ */ #define CONFIGURE_COMMAND " './configure' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache.httpd.2.2.16/bin/apxs' '--x-includes=/usr/local/include' '--x-libraries=/usr/local/lib' '--with-libxml-dir=/usr/local' '--with-openssl=/usr/local' '--with-kerberos=/usr/local' '--with-pcre-regex=/usr/local' '--with-zlib=/usr/local' '--with-zlib-dir=/usr/local' '--with-bz2=/usr/local' '--with-curl=/usr/local' '--with-curlwrappers' '--with-gdbm=/usr/local' '--with-db4=/usr/local' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-xpm-dir=/usr/local' '--with-freetype-dir=/usr/local' '--with-gettext=/usr/local' '--with-iconv' '--with-iconv-dir=/usr/local' '--with-ldap=/usr/local' '--with-mcrypt=/usr/local' '--with-mysql=/usr/local/mysql' '--with-readline=/usr/local' '--with-xsl=/usr/local' '--enable-soap' '--enable-sockets' '--enable-zip'" #define PHP_ADA_INCLUDE "" #define PHP_ADA_LFLAGS "" #define PHP_ADA_LIBS "" #define PHP_APACHE_INCLUDE "" #define PHP_APACHE_TARGET "" #define PHP_FHTTPD_INCLUDE "" #define PHP_FHTTPD_LIB "" #define PHP_FHTTPD_TARGET "" #define PHP_CFLAGS "$(CFLAGS_CLEAN) " #define PHP_DBASE_LIB "" #define PHP_BUILD_DEBUG "" #define PHP_GDBM_INCLUDE "" #define PHP_IBASE_INCLUDE "" #define PHP_IBASE_LFLAGS "" #define PHP_IBASE_LIBS "" #define PHP_IFX_INCLUDE "" #define PHP_IFX_LFLAGS "" #define PHP_IFX_LIBS "" #define PHP_INSTALL_IT "$(mkinstalldirs) '$(INSTALL_ROOT)/usr/local/apache.httpd.2.2.16/modules' && $(mkinstalldirs) '$(INSTALL_ROOT)/usr/local/apache.httpd.2.2.16/conf' && /usr/local/apache.httpd.2.2.16/bin/apxs -S LIBEXECDIR='$(INSTALL_ROOT)/usr/local/apache.httpd.2.2.16/modules' -S SYSCONFDIR='$(INSTALL_ROOT)/usr/local/apache.httpd.2.2.16/conf' -i -a -n php5 libphp5.la" #define PHP_IODBC_INCLUDE "" #define PHP_IODBC_LFLAGS "" #define PHP_IODBC_LIBS "" #define PHP_MSQL_INCLUDE "" #define PHP_MSQL_LFLAGS "" #define PHP_MSQL_LIBS "" #define PHP_MYSQL_INCLUDE "-I/usr/local/mysql/include" #define PHP_MYSQL_LIBS "-L/usr/local/mysql/lib -lmysqlclient " #define PHP_MYSQL_TYPE "external" #define PHP_ODBC_INCLUDE "" #define PHP_ODBC_LFLAGS "" #define PHP_ODBC_LIBS "" #define PHP_ODBC_TYPE "" #define PHP_OCI8_SHARED_LIBADD "" #define PHP_OCI8_DIR "" #define PHP_OCI8_ORACLE_VERSION "" #define PHP_ORACLE_SHARED_LIBADD "@ORACLE_SHARED_LIBADD@" #define PHP_ORACLE_DIR "@ORACLE_DIR@" #define PHP_ORACLE_VERSION "@ORACLE_VERSION@" #define PHP_PGSQL_INCLUDE "" #define PHP_PGSQL_LFLAGS "" #define PHP_PGSQL_LIBS "" #define PHP_PROG_SENDMAIL "/usr/sbin/sendmail" #define PHP_SOLID_INCLUDE "" #define PHP_SOLID_LIBS "" #define PHP_EMPRESS_INCLUDE "" #define PHP_EMPRESS_LIBS "" #define PHP_SYBASE_INCLUDE "" #define PHP_SYBASE_LFLAGS "" #define PHP_SYBASE_LIBS "" #define PHP_DBM_TYPE "" #define PHP_DBM_LIB "" #define PHP_LDAP_LFLAGS "" #define PHP_LDAP_INCLUDE "" #define PHP_LDAP_LIBS "" #define PHP_BIRDSTEP_INCLUDE "" #define PHP_BIRDSTEP_LIBS "" #define PEAR_INSTALLDIR "/usr/local/lib/php" #define PHP_INCLUDE_PATH ".:/usr/local/lib/php" #define PHP_EXTENSION_DIR "/usr/local/lib/php/extensions/no-debug-non-zts-20090626" #define PHP_PREFIX "/usr/local" #define PHP_BINDIR "/usr/local/bin" #define PHP_SBINDIR "/usr/local/sbin" #define PHP_LIBDIR "/usr/local/lib/php" #define PHP_DATADIR "/usr/local/share/php" #define PHP_SYSCONFDIR "/usr/local/etc" #define PHP_LOCALSTATEDIR "/usr/local/var" #define PHP_CONFIG_FILE_PATH "/usr/local/lib" #define PHP_CONFIG_FILE_SCAN_DIR "" #define PHP_SHLIB_SUFFIX "so" 07070100180de5000081a40000000000000000000000014dc0f413000024fd000000b600010002ffffffffffffffff0000002e00000000root/usr/local/include/php/main/php_network.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Stig Venaas | +----------------------------------------------------------------------+ */ /* $Id: php_network.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef _PHP_NETWORK_H #define _PHP_NETWORK_H #ifdef PHP_WIN32 # include "win32/inet.h" #else # undef closesocket # define closesocket close #endif #ifndef HAVE_SHUTDOWN #undef shutdown #define shutdown(s,n) /* nothing */ #endif #ifdef PHP_WIN32 # ifdef EWOULDBLOCK # undef EWOULDBLOCK # endif # ifdef EINPROGRESS # undef EINPROGRESS # endif # define EWOULDBLOCK WSAEWOULDBLOCK # define EINPROGRESS WSAEWOULDBLOCK # define fsync _commit # define ftruncate(a, b) chsize(a, b) #endif /* defined(PHP_WIN32) */ #ifndef EWOULDBLOCK # define EWOULDBLOCK EAGAIN #endif #ifdef PHP_WIN32 #define php_socket_errno() WSAGetLastError() #else #define php_socket_errno() errno #endif /* like strerror, but caller must efree the returned string, * unless buf is not NULL. * Also works sensibly for win32 */ BEGIN_EXTERN_C() PHPAPI char *php_socket_strerror(long err, char *buf, size_t bufsize); END_EXTERN_C() #ifdef HAVE_NETINET_IN_H # include #endif #ifdef HAVE_SYS_SOCKET_H #include #endif /* These are here, rather than with the win32 counterparts above, * since defines them. */ #ifndef SHUT_RD # define SHUT_RD 0 # define SHUT_WR 1 # define SHUT_RDWR 2 #endif #ifdef HAVE_SYS_TIME_H #include #endif #ifdef HAVE_STDDEF_H #include #endif #ifdef PHP_WIN32 typedef SOCKET php_socket_t; #else typedef int php_socket_t; #endif #ifdef PHP_WIN32 # define SOCK_ERR INVALID_SOCKET # define SOCK_CONN_ERR SOCKET_ERROR # define SOCK_RECV_ERR SOCKET_ERROR #else # define SOCK_ERR -1 # define SOCK_CONN_ERR -1 # define SOCK_RECV_ERR -1 #endif /* uncomment this to debug poll(2) emulation on systems that have poll(2) */ /* #define PHP_USE_POLL_2_EMULATION 1 */ #if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL) # include typedef struct pollfd php_pollfd; #else typedef struct _php_pollfd { php_socket_t fd; short events; short revents; } php_pollfd; PHPAPI int php_poll2(php_pollfd *ufds, unsigned int nfds, int timeout); #ifndef POLLIN # define POLLIN 0x0001 /* There is data to read */ # define POLLPRI 0x0002 /* There is urgent data to read */ # define POLLOUT 0x0004 /* Writing now will not block */ # define POLLERR 0x0008 /* Error condition */ # define POLLHUP 0x0010 /* Hung up */ # define POLLNVAL 0x0020 /* Invalid request: fd not open */ #endif # ifndef PHP_USE_POLL_2_EMULATION # define PHP_USE_POLL_2_EMULATION 1 # endif #endif #define PHP_POLLREADABLE (POLLIN|POLLERR|POLLHUP) #ifndef PHP_USE_POLL_2_EMULATION # define php_poll2(ufds, nfds, timeout) poll(ufds, nfds, timeout) #endif /* timeval-to-timeout (for poll(2)) */ static inline int php_tvtoto(struct timeval *timeouttv) { if (timeouttv) { return (timeouttv->tv_sec * 1000) + (timeouttv->tv_usec / 1000); } return -1; } /* hybrid select(2)/poll(2) for a single descriptor. * timeouttv follows same rules as select(2), but is reduced to millisecond accuracy. * Returns 0 on timeout, -1 on error, or the event mask (ala poll(2)). */ static inline int php_pollfd_for(php_socket_t fd, int events, struct timeval *timeouttv) { php_pollfd p; int n; p.fd = fd; p.events = events; p.revents = 0; n = php_poll2(&p, 1, php_tvtoto(timeouttv)); if (n > 0) { return p.revents; } return n; } static inline int php_pollfd_for_ms(php_socket_t fd, int events, int timeout) { php_pollfd p; int n; p.fd = fd; p.events = events; p.revents = 0; n = php_poll2(&p, 1, timeout); if (n > 0) { return p.revents; } return n; } /* emit warning and suggestion for unsafe select(2) usage */ PHPAPI void _php_emit_fd_setsize_warning(int max_fd); #ifdef PHP_WIN32 /* it is safe to FD_SET too many fd's under win32; the macro will simply ignore * descriptors that go beyond the default FD_SETSIZE */ # define PHP_SAFE_FD_SET(fd, set) FD_SET(fd, set) # define PHP_SAFE_FD_ISSET(fd, set) FD_ISSET(fd, set) # define PHP_SAFE_MAX_FD(m, n) do { if (n + 1 >= FD_SETSIZE) { _php_emit_fd_setsize_warning(n); }} while(0) #else # define PHP_SAFE_FD_SET(fd, set) do { if (fd < FD_SETSIZE) FD_SET(fd, set); } while(0) # define PHP_SAFE_FD_ISSET(fd, set) ((fd < FD_SETSIZE) && FD_ISSET(fd, set)) # define PHP_SAFE_MAX_FD(m, n) do { if (m >= FD_SETSIZE) { _php_emit_fd_setsize_warning(m); m = FD_SETSIZE - 1; }} while(0) #endif #define PHP_SOCK_CHUNK_SIZE 8192 #ifdef HAVE_SOCKADDR_STORAGE typedef struct sockaddr_storage php_sockaddr_storage; #else typedef struct { #ifdef HAVE_SOCKADDR_SA_LEN unsigned char ss_len; unsigned char ss_family; #else unsigned short ss_family; #endif char info[126]; } php_sockaddr_storage; #endif BEGIN_EXTERN_C() PHPAPI php_socket_t php_network_connect_socket_to_host(const char *host, unsigned short port, int socktype, int asynchronous, struct timeval *timeout, char **error_string, int *error_code, char *bindto, unsigned short bindport TSRMLS_DC); PHPAPI int php_network_connect_socket(php_socket_t sockfd, const struct sockaddr *addr, socklen_t addrlen, int asynchronous, struct timeval *timeout, char **error_string, int *error_code); #define php_connect_nonb(sock, addr, addrlen, timeout) \ php_network_connect_socket((sock), (addr), (addrlen), 0, (timeout), NULL, NULL) PHPAPI php_socket_t php_network_bind_socket_to_local_addr(const char *host, unsigned port, int socktype, char **error_string, int *error_code TSRMLS_DC); PHPAPI php_socket_t php_network_accept_incoming(php_socket_t srvsock, char **textaddr, long *textaddrlen, struct sockaddr **addr, socklen_t *addrlen, struct timeval *timeout, char **error_string, int *error_code TSRMLS_DC); PHPAPI int php_network_get_sock_name(php_socket_t sock, char **textaddr, long *textaddrlen, struct sockaddr **addr, socklen_t *addrlen TSRMLS_DC); PHPAPI int php_network_get_peer_name(php_socket_t sock, char **textaddr, long *textaddrlen, struct sockaddr **addr, socklen_t *addrlen TSRMLS_DC); PHPAPI void php_any_addr(int family, php_sockaddr_storage *addr, unsigned short port); PHPAPI int php_sockaddr_size(php_sockaddr_storage *addr); END_EXTERN_C() struct _php_netstream_data_t { php_socket_t socket; char is_blocked; struct timeval timeout; char timeout_event; size_t ownsize; }; typedef struct _php_netstream_data_t php_netstream_data_t; PHPAPI extern php_stream_ops php_stream_socket_ops; extern php_stream_ops php_stream_generic_socket_ops; #define PHP_STREAM_IS_SOCKET (&php_stream_socket_ops) BEGIN_EXTERN_C() PHPAPI php_stream *_php_stream_sock_open_from_socket(php_socket_t socket, const char *persistent_id STREAMS_DC TSRMLS_DC ); /* open a connection to a host using php_hostconnect and return a stream */ PHPAPI php_stream *_php_stream_sock_open_host(const char *host, unsigned short port, int socktype, struct timeval *timeout, const char *persistent_id STREAMS_DC TSRMLS_DC); PHPAPI void php_network_populate_name_from_sockaddr( /* input address */ struct sockaddr *sa, socklen_t sl, /* output readable address */ char **textaddr, long *textaddrlen, /* output address */ struct sockaddr **addr, socklen_t *addrlen TSRMLS_DC); PHPAPI int php_network_parse_network_address_with_port(const char *addr, long addrlen, struct sockaddr *sa, socklen_t *sl TSRMLS_DC); END_EXTERN_C() #define php_stream_sock_open_from_socket(socket, persistent) _php_stream_sock_open_from_socket((socket), (persistent) STREAMS_CC TSRMLS_CC) #define php_stream_sock_open_host(host, port, socktype, timeout, persistent) _php_stream_sock_open_host((host), (port), (socktype), (timeout), (persistent) STREAMS_CC TSRMLS_CC) /* {{{ memory debug */ #define php_stream_sock_open_from_socket_rel(socket, persistent) _php_stream_sock_open_from_socket((socket), (persistent) STREAMS_REL_CC TSRMLS_CC) #define php_stream_sock_open_host_rel(host, port, socktype, timeout, persistent) _php_stream_sock_open_host((host), (port), (socktype), (timeout), (persistent) STREAMS_REL_CC TSRMLS_CC) #define php_stream_sock_open_unix_rel(path, pathlen, persistent, timeval) _php_stream_sock_open_unix((path), (pathlen), (persistent), (timeval) STREAMS_REL_CC TSRMLS_CC) /* }}} */ #endif /* _PHP_NETWORK_H */ /* * Local variables: * tab-width: 8 * c-basic-offset: 8 * End: */ 07070100180de4000081a40000000000000000000000014dc0f41300000d3b000000b600010002ffffffffffffffff0000003500000000root/usr/local/include/php/main/php_memory_streams.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Marcus Boerger | +----------------------------------------------------------------------+ */ /* $Id: php_memory_streams.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef PHP_MEMORY_STREAM_H #define PHP_MEMORY_STREAM_H #include "php_streams.h" #define PHP_STREAM_MAX_MEM 2 * 1024 * 1024 #define TEMP_STREAM_DEFAULT 0 #define TEMP_STREAM_READONLY 1 #define TEMP_STREAM_TAKE_BUFFER 2 #define php_stream_memory_create(mode) _php_stream_memory_create((mode) STREAMS_CC TSRMLS_CC) #define php_stream_memory_create_rel(mode) _php_stream_memory_create((mode) STREAMS_REL_CC TSRMLS_CC) #define php_stream_memory_open(mode, buf, length) _php_stream_memory_open((mode), (buf), (length) STREAMS_CC TSRMLS_CC) #define php_stream_memory_get_buffer(stream, length) _php_stream_memory_get_buffer((stream), (length) STREAMS_CC TSRMLS_CC) #define php_stream_temp_new() php_stream_temp_create(TEMP_STREAM_DEFAULT, PHP_STREAM_MAX_MEM) #define php_stream_temp_create(mode, max_memory_usage) _php_stream_temp_create((mode), (max_memory_usage) STREAMS_CC TSRMLS_CC) #define php_stream_temp_create_rel(mode, max_memory_usage) _php_stream_temp_create((mode), (max_memory_usage) STREAMS_REL_CC TSRMLS_CC) #define php_stream_temp_open(mode, max_memory_usage, buf, length) _php_stream_temp_open((mode), (max_memory_usage), (buf), (length) STREAMS_CC TSRMLS_CC) BEGIN_EXTERN_C() PHPAPI php_stream *_php_stream_memory_create(int mode STREAMS_DC TSRMLS_DC); PHPAPI php_stream *_php_stream_memory_open(int mode, char *buf, size_t length STREAMS_DC TSRMLS_DC); PHPAPI char *_php_stream_memory_get_buffer(php_stream *stream, size_t *length STREAMS_DC TSRMLS_DC); PHPAPI php_stream *_php_stream_temp_create(int mode, size_t max_memory_usage STREAMS_DC TSRMLS_DC); PHPAPI php_stream *_php_stream_temp_open(int mode, size_t max_memory_usage, char *buf, size_t length STREAMS_DC TSRMLS_DC); END_EXTERN_C() extern PHPAPI php_stream_ops php_stream_memory_ops; extern PHPAPI php_stream_ops php_stream_temp_ops; extern PHPAPI php_stream_ops php_stream_rfc2397_ops; extern PHPAPI php_stream_wrapper php_stream_rfc2397_wrapper; #define PHP_STREAM_IS_MEMORY &php_stream_memory_ops #define PHP_STREAM_IS_TEMP &php_stream_temp_ops #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: sw=4 ts=4 fdm=marker * vim<600: sw=4 ts=4 */ 07070100180dea000081a40000000000000000000000014dc0f41300007238000000b600010002ffffffffffffffff0000002e00000000root/usr/local/include/php/main/php_streams.h/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Wez Furlong (wez@thebrainroom.com) | +----------------------------------------------------------------------+ */ /* $Id: php_streams.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef PHP_STREAMS_H #define PHP_STREAMS_H #ifdef HAVE_SYS_TIME_H #include #endif #include #include BEGIN_EXTERN_C() PHPAPI int php_file_le_stream(void); PHPAPI int php_file_le_pstream(void); PHPAPI int php_file_le_stream_filter(void); END_EXTERN_C() /* {{{ Streams memory debugging stuff */ #if ZEND_DEBUG /* these have more of a dependency on the definitions of the zend macros than * I would prefer, but doing it this way saves loads of idefs :-/ */ # define STREAMS_D int __php_stream_call_depth ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC # define STREAMS_C 0 ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC # define STREAMS_REL_C __php_stream_call_depth + 1 ZEND_FILE_LINE_CC, \ __php_stream_call_depth ? __zend_orig_filename : __zend_filename, \ __php_stream_call_depth ? __zend_orig_lineno : __zend_lineno # define STREAMS_DC , STREAMS_D # define STREAMS_CC , STREAMS_C # define STREAMS_REL_CC , STREAMS_REL_C #else # define STREAMS_D # define STREAMS_C # define STREAMS_REL_C # define STREAMS_DC # define STREAMS_CC # define STREAMS_REL_CC #endif /* these functions relay the file/line number information. They are depth aware, so they will pass * the ultimate ancestor, which is useful, because there can be several layers of calls */ #define php_stream_alloc_rel(ops, thisptr, persistent, mode) _php_stream_alloc((ops), (thisptr), (persistent), (mode) STREAMS_REL_CC TSRMLS_CC) #define php_stream_copy_to_mem_rel(src, buf, maxlen, persistent) _php_stream_copy_to_mem((src), (buf), (maxlen), (persistent) STREAMS_REL_CC TSRMLS_CC) #define php_stream_fopen_rel(filename, mode, opened, options) _php_stream_fopen((filename), (mode), (opened), (options) STREAMS_REL_CC TSRMLS_CC) #define php_stream_fopen_with_path_rel(filename, mode, path, opened, options) _php_stream_fopen_with_path((filename), (mode), (path), (opened), (options) STREAMS_REL_CC TSRMLS_CC) #define php_stream_fopen_from_fd_rel(fd, mode, persistent_id) _php_stream_fopen_from_fd((fd), (mode), (persistent_id) STREAMS_REL_CC TSRMLS_CC) #define php_stream_fopen_from_file_rel(file, mode) _php_stream_fopen_from_file((file), (mode) STREAMS_REL_CC TSRMLS_CC) #define php_stream_fopen_from_pipe_rel(file, mode) _php_stream_fopen_from_pipe((file), (mode) STREAMS_REL_CC TSRMLS_CC) #define php_stream_fopen_tmpfile_rel() _php_stream_fopen_tmpfile(0 STREAMS_REL_CC TSRMLS_CC) #define php_stream_fopen_temporary_file_rel(dir, pfx, opened_path) _php_stream_fopen_temporary_file((dir), (pfx), (opened_path) STREAMS_REL_CC TSRMLS_CC) #define php_stream_open_wrapper_rel(path, mode, options, opened) _php_stream_open_wrapper_ex((path), (mode), (options), (opened), NULL STREAMS_REL_CC TSRMLS_CC) #define php_stream_open_wrapper_ex_rel(path, mode, options, opened, context) _php_stream_open_wrapper_ex((path), (mode), (options), (opened), (context) STREAMS_REL_CC TSRMLS_CC) #define php_stream_make_seekable_rel(origstream, newstream, flags) _php_stream_make_seekable((origstream), (newstream), (flags) STREAMS_REL_CC TSRMLS_CC) /* }}} */ /* The contents of the php_stream_ops and php_stream should only be accessed * using the functions/macros in this header. * If you need to get at something that doesn't have an API, * drop me a line and we can sort out a way to do * it properly. * * The only exceptions to this rule are that stream implementations can use * the php_stream->abstract pointer to hold their context, and streams * opened via stream_open_wrappers can use the zval ptr in * php_stream->wrapperdata to hold meta data for php scripts to * retrieve using file_get_wrapper_data(). */ typedef struct _php_stream php_stream; typedef struct _php_stream_wrapper php_stream_wrapper; typedef struct _php_stream_context php_stream_context; typedef struct _php_stream_filter php_stream_filter; #include "streams/php_stream_context.h" #include "streams/php_stream_filter_api.h" typedef struct _php_stream_statbuf { struct stat sb; /* regular info */ /* extended info to go here some day: content-type etc. etc. */ } php_stream_statbuf; typedef struct _php_stream_dirent { char d_name[MAXPATHLEN]; } php_stream_dirent; /* operations on streams that are file-handles */ typedef struct _php_stream_ops { /* stdio like functions - these are mandatory! */ size_t (*write)(php_stream *stream, const char *buf, size_t count TSRMLS_DC); size_t (*read)(php_stream *stream, char *buf, size_t count TSRMLS_DC); int (*close)(php_stream *stream, int close_handle TSRMLS_DC); int (*flush)(php_stream *stream TSRMLS_DC); const char *label; /* label for this ops structure */ /* these are optional */ int (*seek)(php_stream *stream, off_t offset, int whence, off_t *newoffset TSRMLS_DC); int (*cast)(php_stream *stream, int castas, void **ret TSRMLS_DC); int (*stat)(php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC); int (*set_option)(php_stream *stream, int option, int value, void *ptrparam TSRMLS_DC); } php_stream_ops; typedef struct _php_stream_wrapper_ops { /* open/create a wrapped stream */ php_stream *(*stream_opener)(php_stream_wrapper *wrapper, char *filename, char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC); /* close/destroy a wrapped stream */ int (*stream_closer)(php_stream_wrapper *wrapper, php_stream *stream TSRMLS_DC); /* stat a wrapped stream */ int (*stream_stat)(php_stream_wrapper *wrapper, php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC); /* stat a URL */ int (*url_stat)(php_stream_wrapper *wrapper, char *url, int flags, php_stream_statbuf *ssb, php_stream_context *context TSRMLS_DC); /* open a "directory" stream */ php_stream *(*dir_opener)(php_stream_wrapper *wrapper, char *filename, char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC); const char *label; /* delete a file */ int (*unlink)(php_stream_wrapper *wrapper, char *url, int options, php_stream_context *context TSRMLS_DC); /* rename a file */ int (*rename)(php_stream_wrapper *wrapper, char *url_from, char *url_to, int options, php_stream_context *context TSRMLS_DC); /* Create/Remove directory */ int (*stream_mkdir)(php_stream_wrapper *wrapper, char *url, int mode, int options, php_stream_context *context TSRMLS_DC); int (*stream_rmdir)(php_stream_wrapper *wrapper, char *url, int options, php_stream_context *context TSRMLS_DC); } php_stream_wrapper_ops; struct _php_stream_wrapper { php_stream_wrapper_ops *wops; /* operations the wrapper can perform */ void *abstract; /* context for the wrapper */ int is_url; /* so that PG(allow_url_fopen) can be respected */ /* support for wrappers to return (multiple) error messages to the stream opener */ int err_count; char **err_stack; }; #define PHP_STREAM_FLAG_NO_SEEK 1 #define PHP_STREAM_FLAG_NO_BUFFER 2 #define PHP_STREAM_FLAG_EOL_UNIX 0 /* also includes DOS */ #define PHP_STREAM_FLAG_DETECT_EOL 4 #define PHP_STREAM_FLAG_EOL_MAC 8 /* set this when the stream might represent "interactive" data. * When set, the read buffer will avoid certain operations that * might otherwise cause the read to block for much longer than * is strictly required. */ #define PHP_STREAM_FLAG_AVOID_BLOCKING 16 #define PHP_STREAM_FLAG_NO_CLOSE 32 #define PHP_STREAM_FLAG_IS_DIR 64 #define PHP_STREAM_FLAG_NO_FCLOSE 128 struct _php_stream { php_stream_ops *ops; void *abstract; /* convenience pointer for abstraction */ php_stream_filter_chain readfilters, writefilters; php_stream_wrapper *wrapper; /* which wrapper was used to open the stream */ void *wrapperthis; /* convenience pointer for a instance of a wrapper */ zval *wrapperdata; /* fgetwrapperdata retrieves this */ int fgetss_state; /* for fgetss to handle multiline tags */ int is_persistent; char mode[16]; /* "rwb" etc. ala stdio */ int rsrc_id; /* used for auto-cleanup */ int in_free; /* to prevent recursion during free */ /* so we know how to clean it up correctly. This should be set to * PHP_STREAM_FCLOSE_XXX as appropriate */ int fclose_stdiocast; FILE *stdiocast; /* cache this, otherwise we might leak! */ #if ZEND_DEBUG int __exposed; /* non-zero if exposed as a zval somewhere */ #endif char *orig_path; php_stream_context *context; int flags; /* PHP_STREAM_FLAG_XXX */ /* buffer */ off_t position; /* of underlying stream */ unsigned char *readbuf; size_t readbuflen; off_t readpos; off_t writepos; /* how much data to read when filling buffer */ size_t chunk_size; int eof; #if ZEND_DEBUG char *open_filename; uint open_lineno; #endif }; /* php_stream */ /* state definitions when closing down; these are private to streams.c */ #define PHP_STREAM_FCLOSE_NONE 0 #define PHP_STREAM_FCLOSE_FDOPEN 1 #define PHP_STREAM_FCLOSE_FOPENCOOKIE 2 /* allocate a new stream for a particular ops */ BEGIN_EXTERN_C() PHPAPI php_stream *_php_stream_alloc(php_stream_ops *ops, void *abstract, const char *persistent_id, const char *mode STREAMS_DC TSRMLS_DC); END_EXTERN_C() #define php_stream_alloc(ops, thisptr, persistent_id, mode) _php_stream_alloc((ops), (thisptr), (persistent_id), (mode) STREAMS_CC TSRMLS_CC) #define php_stream_get_resource_id(stream) (stream)->rsrc_id #if ZEND_DEBUG /* use this to tell the stream that it is OK if we don't explicitly close it */ # define php_stream_auto_cleanup(stream) { (stream)->__exposed++; } /* use this to assign the stream to a zval and tell the stream that is * has been exported to the engine; it will expect to be closed automatically * when the resources are auto-destructed */ # define php_stream_to_zval(stream, zval) { ZVAL_RESOURCE(zval, (stream)->rsrc_id); (stream)->__exposed++; } #else # define php_stream_auto_cleanup(stream) /* nothing */ # define php_stream_to_zval(stream, zval) { ZVAL_RESOURCE(zval, (stream)->rsrc_id); } #endif #define php_stream_from_zval(xstr, ppzval) ZEND_FETCH_RESOURCE2((xstr), php_stream *, (ppzval), -1, "stream", php_file_le_stream(), php_file_le_pstream()) #define php_stream_from_zval_no_verify(xstr, ppzval) (xstr) = (php_stream*)zend_fetch_resource((ppzval) TSRMLS_CC, -1, "stream", NULL, 2, php_file_le_stream(), php_file_le_pstream()) BEGIN_EXTERN_C() PHPAPI int php_stream_from_persistent_id(const char *persistent_id, php_stream **stream TSRMLS_DC); #define PHP_STREAM_PERSISTENT_SUCCESS 0 /* id exists */ #define PHP_STREAM_PERSISTENT_FAILURE 1 /* id exists but is not a stream! */ #define PHP_STREAM_PERSISTENT_NOT_EXIST 2 /* id does not exist */ #define PHP_STREAM_FREE_CALL_DTOR 1 /* call ops->close */ #define PHP_STREAM_FREE_RELEASE_STREAM 2 /* pefree(stream) */ #define PHP_STREAM_FREE_PRESERVE_HANDLE 4 /* tell ops->close to not close it's underlying handle */ #define PHP_STREAM_FREE_RSRC_DTOR 8 /* called from the resource list dtor */ #define PHP_STREAM_FREE_PERSISTENT 16 /* manually freeing a persistent connection */ #define PHP_STREAM_FREE_CLOSE (PHP_STREAM_FREE_CALL_DTOR | PHP_STREAM_FREE_RELEASE_STREAM) #define PHP_STREAM_FREE_CLOSE_CASTED (PHP_STREAM_FREE_CLOSE | PHP_STREAM_FREE_PRESERVE_HANDLE) #define PHP_STREAM_FREE_CLOSE_PERSISTENT (PHP_STREAM_FREE_CLOSE | PHP_STREAM_FREE_PERSISTENT) PHPAPI int _php_stream_free(php_stream *stream, int close_options TSRMLS_DC); #define php_stream_free(stream, close_options) _php_stream_free((stream), (close_options) TSRMLS_CC) #define php_stream_close(stream) _php_stream_free((stream), PHP_STREAM_FREE_CLOSE TSRMLS_CC) #define php_stream_pclose(stream) _php_stream_free((stream), PHP_STREAM_FREE_CLOSE_PERSISTENT TSRMLS_CC) PHPAPI int _php_stream_seek(php_stream *stream, off_t offset, int whence TSRMLS_DC); #define php_stream_rewind(stream) _php_stream_seek((stream), 0L, SEEK_SET TSRMLS_CC) #define php_stream_seek(stream, offset, whence) _php_stream_seek((stream), (offset), (whence) TSRMLS_CC) PHPAPI off_t _php_stream_tell(php_stream *stream TSRMLS_DC); #define php_stream_tell(stream) _php_stream_tell((stream) TSRMLS_CC) PHPAPI size_t _php_stream_read(php_stream *stream, char *buf, size_t count TSRMLS_DC); #define php_stream_read(stream, buf, count) _php_stream_read((stream), (buf), (count) TSRMLS_CC) PHPAPI size_t _php_stream_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC); #define php_stream_write_string(stream, str) _php_stream_write(stream, str, strlen(str) TSRMLS_CC) #define php_stream_write(stream, buf, count) _php_stream_write(stream, (buf), (count) TSRMLS_CC) #ifdef ZTS PHPAPI size_t _php_stream_printf(php_stream *stream TSRMLS_DC, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4); #else PHPAPI size_t _php_stream_printf(php_stream *stream TSRMLS_DC, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3); #endif /* php_stream_printf macro & function require TSRMLS_CC */ #define php_stream_printf _php_stream_printf PHPAPI int _php_stream_eof(php_stream *stream TSRMLS_DC); #define php_stream_eof(stream) _php_stream_eof((stream) TSRMLS_CC) PHPAPI int _php_stream_getc(php_stream *stream TSRMLS_DC); #define php_stream_getc(stream) _php_stream_getc((stream) TSRMLS_CC) PHPAPI int _php_stream_putc(php_stream *stream, int c TSRMLS_DC); #define php_stream_putc(stream, c) _php_stream_putc((stream), (c) TSRMLS_CC) PHPAPI int _php_stream_flush(php_stream *stream, int closing TSRMLS_DC); #define php_stream_flush(stream) _php_stream_flush((stream), 0 TSRMLS_CC) PHPAPI char *_php_stream_get_line(php_stream *stream, char *buf, size_t maxlen, size_t *returned_len TSRMLS_DC); #define php_stream_gets(stream, buf, maxlen) _php_stream_get_line((stream), (buf), (maxlen), NULL TSRMLS_CC) #define php_stream_get_line(stream, buf, maxlen, retlen) _php_stream_get_line((stream), (buf), (maxlen), (retlen) TSRMLS_CC) PHPAPI char *php_stream_get_record(php_stream *stream, size_t maxlen, size_t *returned_len, char *delim, size_t delim_len TSRMLS_DC); /* CAREFUL! this is equivalent to puts NOT fputs! */ PHPAPI int _php_stream_puts(php_stream *stream, char *buf TSRMLS_DC); #define php_stream_puts(stream, buf) _php_stream_puts((stream), (buf) TSRMLS_CC) PHPAPI int _php_stream_stat(php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC); #define php_stream_stat(stream, ssb) _php_stream_stat((stream), (ssb) TSRMLS_CC) PHPAPI int _php_stream_stat_path(char *path, int flags, php_stream_statbuf *ssb, php_stream_context *context TSRMLS_DC); #define php_stream_stat_path(path, ssb) _php_stream_stat_path((path), 0, (ssb), NULL TSRMLS_CC) #define php_stream_stat_path_ex(path, flags, ssb, context) _php_stream_stat_path((path), (flags), (ssb), (context) TSRMLS_CC) PHPAPI int _php_stream_mkdir(char *path, int mode, int options, php_stream_context *context TSRMLS_DC); #define php_stream_mkdir(path, mode, options, context) _php_stream_mkdir(path, mode, options, context TSRMLS_CC) PHPAPI int _php_stream_rmdir(char *path, int options, php_stream_context *context TSRMLS_DC); #define php_stream_rmdir(path, options, context) _php_stream_rmdir(path, options, context TSRMLS_CC) PHPAPI php_stream *_php_stream_opendir(char *path, int options, php_stream_context *context STREAMS_DC TSRMLS_DC); #define php_stream_opendir(path, options, context) _php_stream_opendir((path), (options), (context) STREAMS_CC TSRMLS_CC) PHPAPI php_stream_dirent *_php_stream_readdir(php_stream *dirstream, php_stream_dirent *ent TSRMLS_DC); #define php_stream_readdir(dirstream, dirent) _php_stream_readdir((dirstream), (dirent) TSRMLS_CC) #define php_stream_closedir(dirstream) php_stream_close((dirstream)) #define php_stream_rewinddir(dirstream) php_stream_rewind((dirstream)) PHPAPI int php_stream_dirent_alphasort(const char **a, const char **b); PHPAPI int php_stream_dirent_alphasortr(const char **a, const char **b); PHPAPI int _php_stream_scandir(char *dirname, char **namelist[], int flags, php_stream_context *context, int (*compare) (const char **a, const char **b) TSRMLS_DC); #define php_stream_scandir(dirname, namelist, context, compare) _php_stream_scandir((dirname), (namelist), 0, (context), (compare) TSRMLS_CC) PHPAPI int _php_stream_set_option(php_stream *stream, int option, int value, void *ptrparam TSRMLS_DC); #define php_stream_set_option(stream, option, value, ptrvalue) _php_stream_set_option((stream), (option), (value), (ptrvalue) TSRMLS_CC) #define php_stream_set_chunk_size(stream, size) _php_stream_set_option((stream), PHP_STREAM_OPTION_SET_CHUNK_SIZE, (size), NULL TSRMLS_CC) END_EXTERN_C() /* Flags for mkdir method in wrapper ops */ #define PHP_STREAM_MKDIR_RECURSIVE 1 /* define REPORT ERRORS 8 (below) */ /* Flags for rmdir method in wrapper ops */ /* define REPORT_ERRORS 8 (below) */ /* Flags for url_stat method in wrapper ops */ #define PHP_STREAM_URL_STAT_LINK 1 #define PHP_STREAM_URL_STAT_QUIET 2 /* change the blocking mode of stream: value == 1 => blocking, value == 0 => non-blocking. */ #define PHP_STREAM_OPTION_BLOCKING 1 /* change the buffering mode of stream. value is a PHP_STREAM_BUFFER_XXXX value, ptrparam is a ptr to a size_t holding * the required buffer size */ #define PHP_STREAM_OPTION_READ_BUFFER 2 #define PHP_STREAM_OPTION_WRITE_BUFFER 3 #define PHP_STREAM_BUFFER_NONE 0 /* unbuffered */ #define PHP_STREAM_BUFFER_LINE 1 /* line buffered */ #define PHP_STREAM_BUFFER_FULL 2 /* fully buffered */ /* set the timeout duration for reads on the stream. ptrparam is a pointer to a struct timeval * */ #define PHP_STREAM_OPTION_READ_TIMEOUT 4 #define PHP_STREAM_OPTION_SET_CHUNK_SIZE 5 /* set or release lock on a stream */ #define PHP_STREAM_OPTION_LOCKING 6 /* whether or not locking is supported */ #define PHP_STREAM_LOCK_SUPPORTED 1 #define php_stream_supports_lock(stream) _php_stream_set_option((stream), PHP_STREAM_OPTION_LOCKING, 0, (void *) PHP_STREAM_LOCK_SUPPORTED TSRMLS_CC) == 0 ? 1 : 0 #define php_stream_lock(stream, mode) _php_stream_set_option((stream), PHP_STREAM_OPTION_LOCKING, (mode), (void *) NULL TSRMLS_CC) /* option code used by the php_stream_xport_XXX api */ #define PHP_STREAM_OPTION_XPORT_API 7 /* see php_stream_transport.h */ #define PHP_STREAM_OPTION_CRYPTO_API 8 /* see php_stream_transport.h */ #define PHP_STREAM_OPTION_MMAP_API 9 /* see php_stream_mmap.h */ #define PHP_STREAM_OPTION_TRUNCATE_API 10 #define PHP_STREAM_TRUNCATE_SUPPORTED 0 #define PHP_STREAM_TRUNCATE_SET_SIZE 1 /* ptrparam is a pointer to a size_t */ #define php_stream_truncate_supported(stream) (_php_stream_set_option((stream), PHP_STREAM_OPTION_TRUNCATE_API, PHP_STREAM_TRUNCATE_SUPPORTED, NULL TSRMLS_CC) == PHP_STREAM_OPTION_RETURN_OK ? 1 : 0) BEGIN_EXTERN_C() PHPAPI int _php_stream_truncate_set_size(php_stream *stream, size_t newsize TSRMLS_DC); #define php_stream_truncate_set_size(stream, size) _php_stream_truncate_set_size((stream), (size) TSRMLS_CC) END_EXTERN_C() #define PHP_STREAM_OPTION_META_DATA_API 11 /* ptrparam is a zval* to which to add meta data information */ #define php_stream_populate_meta_data(stream, zv) (_php_stream_set_option((stream), PHP_STREAM_OPTION_META_DATA_API, 0, zv TSRMLS_CC) == PHP_STREAM_OPTION_RETURN_OK ? 1 : 0) /* Check if the stream is still "live"; for sockets/pipes this means the socket * is still connected; for files, this does not really have meaning */ #define PHP_STREAM_OPTION_CHECK_LIVENESS 12 /* no parameters */ #define PHP_STREAM_OPTION_RETURN_OK 0 /* option set OK */ #define PHP_STREAM_OPTION_RETURN_ERR -1 /* problem setting option */ #define PHP_STREAM_OPTION_RETURN_NOTIMPL -2 /* underlying stream does not implement; streams can handle it instead */ /* copy up to maxlen bytes from src to dest. If maxlen is PHP_STREAM_COPY_ALL, * copy until eof(src). */ #define PHP_STREAM_COPY_ALL ((size_t)-1) BEGIN_EXTERN_C() ZEND_ATTRIBUTE_DEPRECATED PHPAPI size_t _php_stream_copy_to_stream(php_stream *src, php_stream *dest, size_t maxlen STREAMS_DC TSRMLS_DC); #define php_stream_copy_to_stream(src, dest, maxlen) _php_stream_copy_to_stream((src), (dest), (maxlen) STREAMS_CC TSRMLS_CC) PHPAPI size_t _php_stream_copy_to_stream_ex(php_stream *src, php_stream *dest, size_t maxlen, size_t *len STREAMS_DC TSRMLS_DC); #define php_stream_copy_to_stream_ex(src, dest, maxlen, len) _php_stream_copy_to_stream_ex((src), (dest), (maxlen), (len) STREAMS_CC TSRMLS_CC) /* read all data from stream and put into a buffer. Caller must free buffer * when done. */ PHPAPI size_t _php_stream_copy_to_mem(php_stream *src, char **buf, size_t maxlen, int persistent STREAMS_DC TSRMLS_DC); #define php_stream_copy_to_mem(src, buf, maxlen, persistent) _php_stream_copy_to_mem((src), (buf), (maxlen), (persistent) STREAMS_CC TSRMLS_CC) /* output all data from a stream */ PHPAPI size_t _php_stream_passthru(php_stream * src STREAMS_DC TSRMLS_DC); #define php_stream_passthru(stream) _php_stream_passthru((stream) STREAMS_CC TSRMLS_CC) END_EXTERN_C() #include "streams/php_stream_transport.h" #include "streams/php_stream_plain_wrapper.h" #include "streams/php_stream_glob_wrapper.h" #include "streams/php_stream_userspace.h" #include "streams/php_stream_mmap.h" /* coerce the stream into some other form */ /* cast as a stdio FILE * */ #define PHP_STREAM_AS_STDIO 0 /* cast as a POSIX fd or socketd */ #define PHP_STREAM_AS_FD 1 /* cast as a socketd */ #define PHP_STREAM_AS_SOCKETD 2 /* cast as fd/socket for select purposes */ #define PHP_STREAM_AS_FD_FOR_SELECT 3 /* try really, really hard to make sure the cast happens (avoid using this flag if possible) */ #define PHP_STREAM_CAST_TRY_HARD 0x80000000 #define PHP_STREAM_CAST_RELEASE 0x40000000 /* stream becomes invalid on success */ #define PHP_STREAM_CAST_INTERNAL 0x20000000 /* stream cast for internal use */ #define PHP_STREAM_CAST_MASK (PHP_STREAM_CAST_TRY_HARD | PHP_STREAM_CAST_RELEASE | PHP_STREAM_CAST_INTERNAL) BEGIN_EXTERN_C() PHPAPI int _php_stream_cast(php_stream *stream, int castas, void **ret, int show_err TSRMLS_DC); END_EXTERN_C() /* use this to check if a stream can be cast into another form */ #define php_stream_can_cast(stream, as) _php_stream_cast((stream), (as), NULL, 0 TSRMLS_CC) #define php_stream_cast(stream, as, ret, show_err) _php_stream_cast((stream), (as), (ret), (show_err) TSRMLS_CC) /* use this to check if a stream is of a particular type: * PHPAPI int php_stream_is(php_stream *stream, php_stream_ops *ops); */ #define php_stream_is(stream, anops) ((stream)->ops == anops) #define PHP_STREAM_IS_STDIO &php_stream_stdio_ops #define php_stream_is_persistent(stream) (stream)->is_persistent /* Wrappers support */ #define IGNORE_PATH 0x00000000 #define USE_PATH 0x00000001 #define IGNORE_URL 0x00000002 #define ENFORCE_SAFE_MODE 0x00000004 #define REPORT_ERRORS 0x00000008 /* If you don't need to write to the stream, but really need to * be able to seek, use this flag in your options. */ #define STREAM_MUST_SEEK 0x00000010 /* If you are going to end up casting the stream into a FILE* or * a socket, pass this flag and the streams/wrappers will not use * buffering mechanisms while reading the headers, so that HTTP * wrapped streams will work consistently. * If you omit this flag, streams will use buffering and should end * up working more optimally. * */ #define STREAM_WILL_CAST 0x00000020 /* this flag applies to php_stream_locate_url_wrapper */ #define STREAM_LOCATE_WRAPPERS_ONLY 0x00000040 /* this flag is only used by include/require functions */ #define STREAM_OPEN_FOR_INCLUDE 0x00000080 /* this flag tells streams to ONLY open urls */ #define STREAM_USE_URL 0x00000100 /* this flag is used when only the headers from HTTP request are to be fetched */ #define STREAM_ONLY_GET_HEADERS 0x00000200 /* don't apply open_basedir checks */ #define STREAM_DISABLE_OPEN_BASEDIR 0x00000400 /* get (or create) a persistent version of the stream */ #define STREAM_OPEN_PERSISTENT 0x00000800 /* use glob stream for directory open in plain files stream */ #define STREAM_USE_GLOB_DIR_OPEN 0x00001000 /* don't check allow_url_fopen and allow_url_include */ #define STREAM_DISABLE_URL_PROTECTION 0x00002000 /* assume the path passed in exists and is fully expanded, avoiding syscalls */ #define STREAM_ASSUME_REALPATH 0x00004000 /* Antique - no longer has meaning */ #define IGNORE_URL_WIN 0 int php_init_stream_wrappers(int module_number TSRMLS_DC); int php_shutdown_stream_wrappers(int module_number TSRMLS_DC); void php_shutdown_stream_hashes(TSRMLS_D); PHP_RSHUTDOWN_FUNCTION(streams); BEGIN_EXTERN_C() PHPAPI int php_register_url_stream_wrapper(char *protocol, php_stream_wrapper *wrapper TSRMLS_DC); PHPAPI int php_unregister_url_stream_wrapper(char *protocol TSRMLS_DC); PHPAPI int php_register_url_stream_wrapper_volatile(char *protocol, php_stream_wrapper *wrapper TSRMLS_DC); PHPAPI int php_unregister_url_stream_wrapper_volatile(char *protocol TSRMLS_DC); PHPAPI php_stream *_php_stream_open_wrapper_ex(char *path, char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC); PHPAPI php_stream_wrapper *php_stream_locate_url_wrapper(const char *path, char **path_for_open, int options TSRMLS_DC); PHPAPI char *php_stream_locate_eol(php_stream *stream, char *buf, size_t buf_len TSRMLS_DC); #define php_stream_open_wrapper(path, mode, options, opened) _php_stream_open_wrapper_ex((path), (mode), (options), (opened), NULL STREAMS_CC TSRMLS_CC) #define php_stream_open_wrapper_ex(path, mode, options, opened, context) _php_stream_open_wrapper_ex((path), (mode), (options), (opened), (context) STREAMS_CC TSRMLS_CC) #define php_stream_get_from_zval(stream, zstream, mode, options, opened, context) \ if (Z_TYPE_PP((zstream)) == IS_RESOURCE) { \ php_stream_from_zval((stream), (zstream)); \ } else (stream) = Z_TYPE_PP((zstream)) == IS_STRING ? \ php_stream_open_wrapper_ex(Z_STRVAL_PP((zstream)), (mode), (options), (opened), (context)) : NULL /* pushes an error message onto the stack for a wrapper instance */ #ifdef ZTS PHPAPI void php_stream_wrapper_log_error(php_stream_wrapper *wrapper, int options TSRMLS_DC, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 4, 5); #else PHPAPI void php_stream_wrapper_log_error(php_stream_wrapper *wrapper, int options TSRMLS_DC, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4); #endif #define PHP_STREAM_UNCHANGED 0 /* orig stream was seekable anyway */ #define PHP_STREAM_RELEASED 1 /* newstream should be used; origstream is no longer valid */ #define PHP_STREAM_FAILED 2 /* an error occurred while attempting conversion */ #define PHP_STREAM_CRITICAL 3 /* an error occurred; origstream is in an unknown state; you should close origstream */ #define PHP_STREAM_NO_PREFERENCE 0 #define PHP_STREAM_PREFER_STDIO 1 #define PHP_STREAM_FORCE_CONVERSION 2 /* DO NOT call this on streams that are referenced by resources! */ PHPAPI int _php_stream_make_seekable(php_stream *origstream, php_stream **newstream, int flags STREAMS_DC TSRMLS_DC); #define php_stream_make_seekable(origstream, newstream, flags) _php_stream_make_seekable((origstream), (newstream), (flags) STREAMS_CC TSRMLS_CC) /* Give other modules access to the url_stream_wrappers_hash and stream_filters_hash */ PHPAPI HashTable *_php_stream_get_url_stream_wrappers_hash(TSRMLS_D); #define php_stream_get_url_stream_wrappers_hash() _php_stream_get_url_stream_wrappers_hash(TSRMLS_C) PHPAPI HashTable *php_stream_get_url_stream_wrappers_hash_global(void); PHPAPI HashTable *_php_get_stream_filters_hash(TSRMLS_D); #define php_get_stream_filters_hash() _php_get_stream_filters_hash(TSRMLS_C) PHPAPI HashTable *php_get_stream_filters_hash_global(void); extern php_stream_wrapper_ops *php_stream_user_wrapper_ops; END_EXTERN_C() #endif /* Definitions for user streams */ #define PHP_STREAM_IS_URL 1 /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: sw=4 ts=4 fdm=marker * vim<600: sw=4 ts=4 */ 07070100180cfa000041ed0000000000000000000000024dc2232a00000000000000b600010002ffffffffffffffff0000002000000000root/usr/local/include/php/Zend07070100180d08000081a40000000000000000000000014dc0f41200000897000000b600010002ffffffffffffffff0000002e00000000root/usr/local/include/php/Zend/zend_errors.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_errors.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_ERRORS_H #define ZEND_ERRORS_H #define E_ERROR (1<<0L) #define E_WARNING (1<<1L) #define E_PARSE (1<<2L) #define E_NOTICE (1<<3L) #define E_CORE_ERROR (1<<4L) #define E_CORE_WARNING (1<<5L) #define E_COMPILE_ERROR (1<<6L) #define E_COMPILE_WARNING (1<<7L) #define E_USER_ERROR (1<<8L) #define E_USER_WARNING (1<<9L) #define E_USER_NOTICE (1<<10L) #define E_STRICT (1<<11L) #define E_RECOVERABLE_ERROR (1<<12L) #define E_DEPRECATED (1<<13L) #define E_USER_DEPRECATED (1<<14L) #define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_RECOVERABLE_ERROR | E_DEPRECATED | E_USER_DEPRECATED) #define E_CORE (E_CORE_ERROR | E_CORE_WARNING) #endif /* ZEND_ERRORS_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d25000081a40000000000000000000000014dc0f41200001136000000b600010002ffffffffffffffff0000003300000000root/usr/local/include/php/Zend/zend_objects_API.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_objects_API.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_OBJECTS_API_H #define ZEND_OBJECTS_API_H #include "zend.h" typedef void (*zend_objects_store_dtor_t)(void *object, zend_object_handle handle TSRMLS_DC); typedef void (*zend_objects_free_object_storage_t)(void *object TSRMLS_DC); typedef void (*zend_objects_store_clone_t)(void *object, void **object_clone TSRMLS_DC); typedef struct _zend_object_store_bucket { zend_bool destructor_called; zend_bool valid; union _store_bucket { struct _store_object { void *object; zend_objects_store_dtor_t dtor; zend_objects_free_object_storage_t free_storage; zend_objects_store_clone_t clone; const zend_object_handlers *handlers; zend_uint refcount; gc_root_buffer *buffered; } obj; struct { int next; } free_list; } bucket; } zend_object_store_bucket; typedef struct _zend_objects_store { zend_object_store_bucket *object_buckets; zend_uint top; zend_uint size; int free_list_head; } zend_objects_store; /* Global store handling functions */ BEGIN_EXTERN_C() ZEND_API void zend_objects_store_init(zend_objects_store *objects, zend_uint init_size); ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects TSRMLS_DC); ZEND_API void zend_objects_store_mark_destructed(zend_objects_store *objects TSRMLS_DC); ZEND_API void zend_objects_store_destroy(zend_objects_store *objects); /* Store API functions */ ZEND_API zend_object_handle zend_objects_store_put(void *object, zend_objects_store_dtor_t dtor, zend_objects_free_object_storage_t storage, zend_objects_store_clone_t clone TSRMLS_DC); ZEND_API void zend_objects_store_add_ref(zval *object TSRMLS_DC); ZEND_API void zend_objects_store_del_ref(zval *object TSRMLS_DC); ZEND_API void zend_objects_store_add_ref_by_handle(zend_object_handle handle TSRMLS_DC); ZEND_API void zend_objects_store_del_ref_by_handle_ex(zend_object_handle handle, const zend_object_handlers *handlers TSRMLS_DC); static inline void zend_objects_store_del_ref_by_handle(zend_object_handle handle TSRMLS_DC) { zend_objects_store_del_ref_by_handle_ex(handle, NULL TSRMLS_CC); } ZEND_API zend_uint zend_objects_store_get_refcount(zval *object TSRMLS_DC); ZEND_API zend_object_value zend_objects_store_clone_obj(zval *object TSRMLS_DC); ZEND_API void *zend_object_store_get_object(const zval *object TSRMLS_DC); ZEND_API void *zend_object_store_get_object_by_handle(zend_object_handle handle TSRMLS_DC); /* See comment in zend_objects_API.c before you use this */ ZEND_API void zend_object_store_set_object(zval *zobject, void *object TSRMLS_DC); ZEND_API void zend_object_store_ctor_failed(zval *zobject TSRMLS_DC); ZEND_API void zend_objects_store_free_object_storage(zend_objects_store *objects TSRMLS_DC); #define ZEND_OBJECTS_STORE_HANDLERS zend_objects_store_add_ref, zend_objects_store_del_ref, zend_objects_store_clone_obj ZEND_API zval *zend_object_create_proxy(zval *object, zval *member TSRMLS_DC); ZEND_API zend_object_handlers *zend_get_std_object_handlers(void); END_EXTERN_C() #endif /* ZEND_OBJECTS_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d1b000081a40000000000000000000000014dc0f41200001e61000000b600010002ffffffffffffffff0000003700000000root/usr/local/include/php/Zend/zend_language_parser.h/* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton interface for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { T_REQUIRE_ONCE = 258, T_REQUIRE = 259, T_EVAL = 260, T_INCLUDE_ONCE = 261, T_INCLUDE = 262, T_LOGICAL_OR = 263, T_LOGICAL_XOR = 264, T_LOGICAL_AND = 265, T_PRINT = 266, T_SR_EQUAL = 267, T_SL_EQUAL = 268, T_XOR_EQUAL = 269, T_OR_EQUAL = 270, T_AND_EQUAL = 271, T_MOD_EQUAL = 272, T_CONCAT_EQUAL = 273, T_DIV_EQUAL = 274, T_MUL_EQUAL = 275, T_MINUS_EQUAL = 276, T_PLUS_EQUAL = 277, T_BOOLEAN_OR = 278, T_BOOLEAN_AND = 279, T_IS_NOT_IDENTICAL = 280, T_IS_IDENTICAL = 281, T_IS_NOT_EQUAL = 282, T_IS_EQUAL = 283, T_IS_GREATER_OR_EQUAL = 284, T_IS_SMALLER_OR_EQUAL = 285, T_SR = 286, T_SL = 287, T_INSTANCEOF = 288, T_UNSET_CAST = 289, T_BOOL_CAST = 290, T_OBJECT_CAST = 291, T_ARRAY_CAST = 292, T_STRING_CAST = 293, T_DOUBLE_CAST = 294, T_INT_CAST = 295, T_DEC = 296, T_INC = 297, T_CLONE = 298, T_NEW = 299, T_EXIT = 300, T_IF = 301, T_ELSEIF = 302, T_ELSE = 303, T_ENDIF = 304, T_LNUMBER = 305, T_DNUMBER = 306, T_STRING = 307, T_STRING_VARNAME = 308, T_VARIABLE = 309, T_NUM_STRING = 310, T_INLINE_HTML = 311, T_CHARACTER = 312, T_BAD_CHARACTER = 313, T_ENCAPSED_AND_WHITESPACE = 314, T_CONSTANT_ENCAPSED_STRING = 315, T_ECHO = 316, T_DO = 317, T_WHILE = 318, T_ENDWHILE = 319, T_FOR = 320, T_ENDFOR = 321, T_FOREACH = 322, T_ENDFOREACH = 323, T_DECLARE = 324, T_ENDDECLARE = 325, T_AS = 326, T_SWITCH = 327, T_ENDSWITCH = 328, T_CASE = 329, T_DEFAULT = 330, T_BREAK = 331, T_CONTINUE = 332, T_GOTO = 333, T_FUNCTION = 334, T_CONST = 335, T_RETURN = 336, T_TRY = 337, T_CATCH = 338, T_THROW = 339, T_USE = 340, T_GLOBAL = 341, T_PUBLIC = 342, T_PROTECTED = 343, T_PRIVATE = 344, T_FINAL = 345, T_ABSTRACT = 346, T_STATIC = 347, T_VAR = 348, T_UNSET = 349, T_ISSET = 350, T_EMPTY = 351, T_HALT_COMPILER = 352, T_CLASS = 353, T_INTERFACE = 354, T_EXTENDS = 355, T_IMPLEMENTS = 356, T_OBJECT_OPERATOR = 357, T_DOUBLE_ARROW = 358, T_LIST = 359, T_ARRAY = 360, T_CLASS_C = 361, T_METHOD_C = 362, T_FUNC_C = 363, T_LINE = 364, T_FILE = 365, T_COMMENT = 366, T_DOC_COMMENT = 367, T_OPEN_TAG = 368, T_OPEN_TAG_WITH_ECHO = 369, T_CLOSE_TAG = 370, T_WHITESPACE = 371, T_START_HEREDOC = 372, T_END_HEREDOC = 373, T_DOLLAR_OPEN_CURLY_BRACES = 374, T_CURLY_OPEN = 375, T_PAAMAYIM_NEKUDOTAYIM = 376, T_NAMESPACE = 377, T_NS_C = 378, T_DIR = 379, T_NS_SEPARATOR = 380 }; #endif /* Tokens. */ #define T_REQUIRE_ONCE 258 #define T_REQUIRE 259 #define T_EVAL 260 #define T_INCLUDE_ONCE 261 #define T_INCLUDE 262 #define T_LOGICAL_OR 263 #define T_LOGICAL_XOR 264 #define T_LOGICAL_AND 265 #define T_PRINT 266 #define T_SR_EQUAL 267 #define T_SL_EQUAL 268 #define T_XOR_EQUAL 269 #define T_OR_EQUAL 270 #define T_AND_EQUAL 271 #define T_MOD_EQUAL 272 #define T_CONCAT_EQUAL 273 #define T_DIV_EQUAL 274 #define T_MUL_EQUAL 275 #define T_MINUS_EQUAL 276 #define T_PLUS_EQUAL 277 #define T_BOOLEAN_OR 278 #define T_BOOLEAN_AND 279 #define T_IS_NOT_IDENTICAL 280 #define T_IS_IDENTICAL 281 #define T_IS_NOT_EQUAL 282 #define T_IS_EQUAL 283 #define T_IS_GREATER_OR_EQUAL 284 #define T_IS_SMALLER_OR_EQUAL 285 #define T_SR 286 #define T_SL 287 #define T_INSTANCEOF 288 #define T_UNSET_CAST 289 #define T_BOOL_CAST 290 #define T_OBJECT_CAST 291 #define T_ARRAY_CAST 292 #define T_STRING_CAST 293 #define T_DOUBLE_CAST 294 #define T_INT_CAST 295 #define T_DEC 296 #define T_INC 297 #define T_CLONE 298 #define T_NEW 299 #define T_EXIT 300 #define T_IF 301 #define T_ELSEIF 302 #define T_ELSE 303 #define T_ENDIF 304 #define T_LNUMBER 305 #define T_DNUMBER 306 #define T_STRING 307 #define T_STRING_VARNAME 308 #define T_VARIABLE 309 #define T_NUM_STRING 310 #define T_INLINE_HTML 311 #define T_CHARACTER 312 #define T_BAD_CHARACTER 313 #define T_ENCAPSED_AND_WHITESPACE 314 #define T_CONSTANT_ENCAPSED_STRING 315 #define T_ECHO 316 #define T_DO 317 #define T_WHILE 318 #define T_ENDWHILE 319 #define T_FOR 320 #define T_ENDFOR 321 #define T_FOREACH 322 #define T_ENDFOREACH 323 #define T_DECLARE 324 #define T_ENDDECLARE 325 #define T_AS 326 #define T_SWITCH 327 #define T_ENDSWITCH 328 #define T_CASE 329 #define T_DEFAULT 330 #define T_BREAK 331 #define T_CONTINUE 332 #define T_GOTO 333 #define T_FUNCTION 334 #define T_CONST 335 #define T_RETURN 336 #define T_TRY 337 #define T_CATCH 338 #define T_THROW 339 #define T_USE 340 #define T_GLOBAL 341 #define T_PUBLIC 342 #define T_PROTECTED 343 #define T_PRIVATE 344 #define T_FINAL 345 #define T_ABSTRACT 346 #define T_STATIC 347 #define T_VAR 348 #define T_UNSET 349 #define T_ISSET 350 #define T_EMPTY 351 #define T_HALT_COMPILER 352 #define T_CLASS 353 #define T_INTERFACE 354 #define T_EXTENDS 355 #define T_IMPLEMENTS 356 #define T_OBJECT_OPERATOR 357 #define T_DOUBLE_ARROW 358 #define T_LIST 359 #define T_ARRAY 360 #define T_CLASS_C 361 #define T_METHOD_C 362 #define T_FUNC_C 363 #define T_LINE 364 #define T_FILE 365 #define T_COMMENT 366 #define T_DOC_COMMENT 367 #define T_OPEN_TAG 368 #define T_OPEN_TAG_WITH_ECHO 369 #define T_CLOSE_TAG 370 #define T_WHITESPACE 371 #define T_START_HEREDOC 372 #define T_END_HEREDOC 373 #define T_DOLLAR_OPEN_CURLY_BRACES 374 #define T_CURLY_OPEN 375 #define T_PAAMAYIM_NEKUDOTAYIM 376 #define T_NAMESPACE 377 #define T_NS_C 378 #define T_DIR 379 #define T_NS_SEPARATOR 380 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif 07070100180d0e000081a40000000000000000000000014dc0f41200001d1d000000b600010002ffffffffffffffff0000002a00000000root/usr/local/include/php/Zend/zend_gc.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: David Wang | | Dmitry Stogov | +----------------------------------------------------------------------+ */ /* $Id: zend_gc.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_GC_H #define ZEND_GC_H #ifndef GC_BENCH # define GC_BENCH 0 #endif #if GC_BENCH # define GC_BENCH_INC(counter) GC_G(counter)++ # define GC_BENCH_DEC(counter) GC_G(counter)-- # define GC_BENCH_PEAK(peak, counter) do { \ if (GC_G(counter) > GC_G(peak)) { \ GC_G(peak) = GC_G(counter); \ } \ } while (0) #else # define GC_BENCH_INC(counter) # define GC_BENCH_DEC(counter) # define GC_BENCH_PEAK(peak, counter) #endif #define GC_COLOR 0x03 #define GC_BLACK 0x00 #define GC_WHITE 0x01 #define GC_GREY 0x02 #define GC_PURPLE 0x03 #define GC_ADDRESS(v) \ ((gc_root_buffer*)(((zend_uintptr_t)(v)) & ~GC_COLOR)) #define GC_SET_ADDRESS(v, a) \ (v) = ((gc_root_buffer*)((((zend_uintptr_t)(v)) & GC_COLOR) | ((zend_uintptr_t)(a)))) #define GC_GET_COLOR(v) \ (((zend_uintptr_t)(v)) & GC_COLOR) #define GC_SET_COLOR(v, c) \ (v) = ((gc_root_buffer*)((((zend_uintptr_t)(v)) & ~GC_COLOR) | (c))) #define GC_SET_BLACK(v) \ (v) = ((gc_root_buffer*)(((zend_uintptr_t)(v)) & ~GC_COLOR)) #define GC_SET_PURPLE(v) \ (v) = ((gc_root_buffer*)(((zend_uintptr_t)(v)) | GC_PURPLE)) #define GC_ZVAL_INIT(z) \ ((zval_gc_info*)(z))->u.buffered = NULL #define GC_ZVAL_ADDRESS(v) \ GC_ADDRESS(((zval_gc_info*)(v))->u.buffered) #define GC_ZVAL_SET_ADDRESS(v, a) \ GC_SET_ADDRESS(((zval_gc_info*)(v))->u.buffered, (a)) #define GC_ZVAL_GET_COLOR(v) \ GC_GET_COLOR(((zval_gc_info*)(v))->u.buffered) #define GC_ZVAL_SET_COLOR(v, c) \ GC_SET_COLOR(((zval_gc_info*)(v))->u.buffered, (c)) #define GC_ZVAL_SET_BLACK(v) \ GC_SET_BLACK(((zval_gc_info*)(v))->u.buffered) #define GC_ZVAL_SET_PURPLE(v) \ GC_SET_PURPLE(((zval_gc_info*)(v))->u.buffered) #define GC_OBJ_INIT(z) \ (z)->buffered = NULL typedef struct _gc_root_buffer { struct _gc_root_buffer *prev; /* double-linked list */ struct _gc_root_buffer *next; zend_object_handle handle; /* must be 0 for zval */ union { zval *pz; zend_object_handlers *handlers; } u; } gc_root_buffer; typedef struct _zval_gc_info { zval z; union { gc_root_buffer *buffered; struct _zval_gc_info *next; } u; } zval_gc_info; typedef struct _zend_gc_globals { zend_bool gc_enabled; zend_bool gc_active; gc_root_buffer *buf; /* preallocated arrays of buffers */ gc_root_buffer roots; /* list of possible roots of cycles */ gc_root_buffer *unused; /* list of unused buffers */ gc_root_buffer *first_unused; /* pointer to first unused buffer */ gc_root_buffer *last_unused; /* pointer to last unused buffer */ zval_gc_info *zval_to_free; /* temporaryt list of zvals to free */ zval_gc_info *free_list; zval_gc_info *next_to_free; zend_uint gc_runs; zend_uint collected; #if GC_BENCH zend_uint root_buf_length; zend_uint root_buf_peak; zend_uint zval_possible_root; zend_uint zobj_possible_root; zend_uint zval_buffered; zend_uint zobj_buffered; zend_uint zval_remove_from_buffer; zend_uint zobj_remove_from_buffer; zend_uint zval_marked_grey; zend_uint zobj_marked_grey; #endif } zend_gc_globals; #ifdef ZTS BEGIN_EXTERN_C() ZEND_API extern int gc_globals_id; END_EXTERN_C() #define GC_G(v) TSRMG(gc_globals_id, zend_gc_globals *, v) #else #define GC_G(v) (gc_globals.v) extern ZEND_API zend_gc_globals gc_globals; #endif BEGIN_EXTERN_C() ZEND_API int gc_collect_cycles(TSRMLS_D); ZEND_API void gc_zval_possible_root(zval *zv TSRMLS_DC); ZEND_API void gc_zobj_possible_root(zval *zv TSRMLS_DC); ZEND_API void gc_remove_zval_from_buffer(zval *zv TSRMLS_DC); ZEND_API void gc_globals_ctor(TSRMLS_D); ZEND_API void gc_globals_dtor(TSRMLS_D); ZEND_API void gc_init(TSRMLS_D); ZEND_API void gc_reset(TSRMLS_D); END_EXTERN_C() #define GC_ZVAL_CHECK_POSSIBLE_ROOT(z) \ gc_zval_check_possible_root((z) TSRMLS_CC) #define GC_REMOVE_FROM_BUFFER(current) \ gc_remove_from_buffer((current) TSRMLS_CC) #define GC_REMOVE_ZVAL_FROM_BUFFER(z) \ if (GC_ADDRESS(((zval_gc_info*)z)->u.buffered)) { \ gc_remove_zval_from_buffer(z TSRMLS_CC); \ } #define GC_ZOBJ_CHECK_POSSIBLE_ROOT(zobject) \ do { \ if (EXPECTED(EG(objects_store).object_buckets != NULL) && \ EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(zobject)].valid) { \ gc_zobj_possible_root(zobject TSRMLS_CC); \ } \ } while (0) #define GC_REMOVE_ZOBJ_FROM_BUFFER(obj) \ do { \ if (GC_ADDRESS((obj)->buffered) && !GC_G(gc_active)) { \ GC_BENCH_INC(zobj_remove_from_buffer); \ GC_REMOVE_FROM_BUFFER(GC_ADDRESS((obj)->buffered)); \ (obj)->buffered = NULL; \ } \ } while (0) static zend_always_inline void gc_zval_check_possible_root(zval *z TSRMLS_DC) { if (z->type == IS_ARRAY || z->type == IS_OBJECT) { gc_zval_possible_root(z TSRMLS_CC); } } static zend_always_inline void gc_remove_from_buffer(gc_root_buffer *root TSRMLS_DC) { root->next->prev = root->prev; root->prev->next = root->next; root->prev = GC_G(unused); GC_G(unused) = root; GC_BENCH_DEC(root_buf_length); } #define ALLOC_PERMANENT_ZVAL(z) \ do { \ (z) = (zval*)malloc(sizeof(zval_gc_info)); \ GC_ZVAL_INIT(z); \ } while (0) /* The following macroses override macroses from zend_alloc.h */ #undef ALLOC_ZVAL #define ALLOC_ZVAL(z) \ do { \ (z) = (zval*)emalloc(sizeof(zval_gc_info)); \ GC_ZVAL_INIT(z); \ } while (0) #undef FREE_ZVAL #define FREE_ZVAL(z) \ do { \ GC_REMOVE_ZVAL_FROM_BUFFER(z); \ efree(z); \ } while (0) #undef ALLOC_ZVAL_REL #define ALLOC_ZVAL_REL(z) \ do { \ (z) = (zval*)emalloc_rel(sizeof(zval_gc_info)); \ GC_ZVAL_INIT(z); \ } while (0) #undef FREE_ZVAL_REL #define FREE_ZVAL_REL(z) \ do { \ GC_REMOVE_ZVAL_FROM_BUFFER(z); \ efree_rel(z); \ } while (0) #define FREE_ZVAL_EX(z) \ efree(z) #define FREE_ZVAL_REL_EX(z) \ efree_rel(z) #endif /* ZEND_GC_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d03000081a40000000000000000000000014dc0f4120000006b000000b600010002ffffffffffffffff0000002e00000000root/usr/local/include/php/Zend/zend_config.h#include <../main/php_config.h> #if defined(APACHE) && defined(PHP_API_VERSION) #undef HAVE_DLFCN_H #endif 07070100180d2a000081a40000000000000000000000014dc0f4120000077e000000b600010002ffffffffffffffff0000003800000000root/usr/local/include/php/Zend/zend_static_allocator.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | +----------------------------------------------------------------------+ */ /* $Id: zend_static_allocator.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_STATIC_ALLOCATOR_H #define ZEND_STATIC_ALLOCATOR_H #define ALLOCATOR_BLOCK_SIZE 400000 /* Temporary */ typedef unsigned int zend_uint; #define emalloc(s) malloc(s) #define efree(p) free(p) typedef struct _Block { char *bp; char *pos; char *end; } Block; typedef struct _StaticAllocator { Block *Blocks; zend_uint num_blocks; zend_uint current_block; } StaticAllocator; void static_allocator_init(StaticAllocator *sa); char *static_allocator_allocate(StaticAllocator *sa, zend_uint size); void static_allocator_destroy(StaticAllocator *sa); #endif /* ZEND_STATIC_ALLOCATOR_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d0c000081a40000000000000000000000014dc0f41200001050000000b600010002ffffffffffffffff0000003200000000root/usr/local/include/php/Zend/zend_fast_cache.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_fast_cache.h 306939 2011-01-01 02:19:59Z felipe $ */ #if 0 #ifndef ZEND_FAST_CACHE_H #define ZEND_FAST_CACHE_H #ifndef ZEND_ENABLE_FAST_CACHE # if ZEND_DEBUG # define ZEND_ENABLE_FAST_CACHE 0 # else # define ZEND_ENABLE_FAST_CACHE 0 # endif #endif typedef struct _zend_fast_cache_list_entry { struct _zend_fast_cache_list_entry *next; } zend_fast_cache_list_entry; #define MAX_FAST_CACHE_TYPES 4 #define ZVAL_CACHE_LIST 0 #define HASHTABLE_CACHE_LIST 1 #if ZEND_ENABLE_FAST_CACHE #include "zend_globals.h" #include "zend_globals_macros.h" #include "zend_alloc.h" #if ZEND_DEBUG # define RECORD_ZVAL_CACHE_HIT(fc_type) AG(fast_cache_stats)[fc_type][1]++; # define RECORD_ZVAL_CACHE_MISS(fc_type) AG(fast_cache_stats)[fc_type][0]++; #else # define RECORD_ZVAL_CACHE_HIT(fc_type) # define RECORD_ZVAL_CACHE_MISS(fc_type) #endif #define ZEND_FAST_ALLOC(p, type, fc_type) \ { \ TSRMLS_FETCH(); \ \ if (((p) = (type *) AG(fast_cache_list_head)[fc_type])) { \ AG(fast_cache_list_head)[fc_type] = ((zend_fast_cache_list_entry *) AG(fast_cache_list_head)[fc_type])->next; \ RECORD_ZVAL_CACHE_HIT(fc_type); \ } else { \ (p) = (type *) emalloc(sizeof(type)); \ RECORD_ZVAL_CACHE_MISS(fc_type); \ } \ } #define ZEND_FAST_FREE(p, fc_type) \ { \ TSRMLS_FETCH(); \ \ ((zend_fast_cache_list_entry *) (p))->next = (zend_fast_cache_list_entry *) AG(fast_cache_list_head)[fc_type]; \ AG(fast_cache_list_head)[fc_type] = (zend_fast_cache_list_entry *) (p); \ } #define ZEND_FAST_ALLOC_REL(p, type, fc_type) \ ZEND_FAST_ALLOC(p, type, fc_type) #define ZEND_FAST_FREE_REL(p, fc_type) \ ZEND_FAST_FREE(p, fc_type) #else /* !ZEND_ENABLE_FAST_CACHE */ #define ZEND_FAST_ALLOC(p, type, fc_type) \ (p) = (type *) emalloc(sizeof(type)) #define ZEND_FAST_FREE(p, fc_type) \ efree(p) #define ZEND_FAST_ALLOC_REL(p, type, fc_type) \ (p) = (type *) emalloc_rel(sizeof(type)) #define ZEND_FAST_FREE_REL(p, fc_type) \ efree_rel(p) #endif /* ZEND_ENABLE_FAST_CACHE */ /* fast cache for zval's */ #define ALLOC_ZVAL(z) \ ZEND_FAST_ALLOC(z, zval, ZVAL_CACHE_LIST) #define FREE_ZVAL(z) \ ZEND_FAST_FREE(z, ZVAL_CACHE_LIST) #define ALLOC_ZVAL_REL(z) \ ZEND_FAST_ALLOC_REL(z, zval, ZVAL_CACHE_LIST) #define FREE_ZVAL_REL(z) \ ZEND_FAST_FREE_REL(z, ZVAL_CACHE_LIST) /* fast cache for HashTables */ #define ALLOC_HASHTABLE(ht) \ ZEND_FAST_ALLOC(ht, HashTable, HASHTABLE_CACHE_LIST) #define FREE_HASHTABLE(ht) \ ZEND_FAST_FREE(ht, HASHTABLE_CACHE_LIST) #define ALLOC_HASHTABLE_REL(ht) \ ZEND_FAST_ALLOC_REL(ht, HashTable, HASHTABLE_CACHE_LIST) #define FREE_HASHTABLE_REL(ht) \ ZEND_FAST_FREE_REL(ht, HASHTABLE_CACHE_LIST) #endif /* ZEND_FAST_CACHE_H */ #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180cff000081a40000000000000000000000014dc0f4120000065b000000b600010002ffffffffffffffff0000002d00000000root/usr/local/include/php/Zend/zend_build.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Stanislav Malyshev | +----------------------------------------------------------------------+ */ #ifndef ZEND_BUILD_H #define ZEND_BUILD_H #define ZEND_TOSTR_(x) #x #define ZEND_TOSTR(x) ZEND_TOSTR_(x) #ifdef ZTS #define ZEND_BUILD_TS ",TS" #else #define ZEND_BUILD_TS ",NTS" #endif #if ZEND_DEBUG #define ZEND_BUILD_DEBUG ",debug" #else #define ZEND_BUILD_DEBUG #endif #if defined(ZEND_WIN32) && defined(PHP_COMPILER_ID) #define ZEND_BUILD_SYSTEM "," PHP_COMPILER_ID #else #define ZEND_BUILD_SYSTEM #endif /* for private applications */ #define ZEND_BUILD_EXTRA #endif 07070100180d18000081a40000000000000000000000014dc0f41200001024000000b600010002ffffffffffffffff0000003200000000root/usr/local/include/php/Zend/zend_interfaces.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Marcus Boerger | +----------------------------------------------------------------------+ */ /* $Id: zend_interfaces.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_INTERFACES_H #define ZEND_INTERFACES_H #include "zend.h" #include "zend_API.h" BEGIN_EXTERN_C() extern ZEND_API zend_class_entry *zend_ce_traversable; extern ZEND_API zend_class_entry *zend_ce_aggregate; extern ZEND_API zend_class_entry *zend_ce_iterator; extern ZEND_API zend_class_entry *zend_ce_arrayaccess; extern ZEND_API zend_class_entry *zend_ce_serializable; typedef struct _zend_user_iterator { zend_object_iterator it; zend_class_entry *ce; zval *value; } zend_user_iterator; ZEND_API zval* zend_call_method(zval **object_pp, zend_class_entry *obj_ce, zend_function **fn_proxy, char *function_name, int function_name_len, zval **retval_ptr_ptr, int param_count, zval* arg1, zval* arg2 TSRMLS_DC); #define zend_call_method_with_0_params(obj, obj_ce, fn_proxy, function_name, retval) \ zend_call_method(obj, obj_ce, fn_proxy, function_name, sizeof(function_name)-1, retval, 0, NULL, NULL TSRMLS_CC) #define zend_call_method_with_1_params(obj, obj_ce, fn_proxy, function_name, retval, arg1) \ zend_call_method(obj, obj_ce, fn_proxy, function_name, sizeof(function_name)-1, retval, 1, arg1, NULL TSRMLS_CC) #define zend_call_method_with_2_params(obj, obj_ce, fn_proxy, function_name, retval, arg1, arg2) \ zend_call_method(obj, obj_ce, fn_proxy, function_name, sizeof(function_name)-1, retval, 2, arg1, arg2 TSRMLS_CC) ZEND_API void zend_user_it_rewind(zend_object_iterator *_iter TSRMLS_DC); ZEND_API int zend_user_it_valid(zend_object_iterator *_iter TSRMLS_DC); ZEND_API int zend_user_it_get_current_key(zend_object_iterator *_iter, char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC); ZEND_API void zend_user_it_get_current_data(zend_object_iterator *_iter, zval ***data TSRMLS_DC); ZEND_API void zend_user_it_move_forward(zend_object_iterator *_iter TSRMLS_DC); ZEND_API void zend_user_it_invalidate_current(zend_object_iterator *_iter TSRMLS_DC); ZEND_API zval *zend_user_it_new_iterator(zend_class_entry *ce, zval *object TSRMLS_DC); ZEND_API zend_object_iterator *zend_user_it_get_new_iterator(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC); ZEND_API void zend_register_interfaces(TSRMLS_D); ZEND_API int zend_user_serialize(zval *object, unsigned char **buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC); ZEND_API int zend_user_unserialize(zval **object, zend_class_entry *ce, const unsigned char *buf, zend_uint buf_len, zend_unserialize_data *data TSRMLS_DC); ZEND_API int zend_class_serialize_deny(zval *object, unsigned char **buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC); ZEND_API int zend_class_unserialize_deny(zval **object, zend_class_entry *ce, const unsigned char *buf, zend_uint buf_len, zend_unserialize_data *data TSRMLS_DC); END_EXTERN_C() #endif /* ZEND_INTERFACES_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d12000081a40000000000000000000000014dc0f412000009df000000b600010002ffffffffffffffff0000003100000000root/usr/local/include/php/Zend/zend_highlight.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_highlight.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_HIGHLIGHT_H #define ZEND_HIGHLIGHT_H #define HL_COMMENT_COLOR "#FF8000" /* orange */ #define HL_DEFAULT_COLOR "#0000BB" /* blue */ #define HL_HTML_COLOR "#000000" /* black */ #define HL_STRING_COLOR "#DD0000" /* red */ #define HL_BG_COLOR "#FFFFFF" /* white */ #define HL_KEYWORD_COLOR "#007700" /* green */ typedef struct _zend_syntax_highlighter_ini { char *highlight_html; char *highlight_comment; char *highlight_default; char *highlight_string; char *highlight_keyword; } zend_syntax_highlighter_ini; BEGIN_EXTERN_C() ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini TSRMLS_DC); ZEND_API void zend_strip(TSRMLS_D); ZEND_API int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini TSRMLS_DC); ZEND_API int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini, char *str_name TSRMLS_DC); ZEND_API void zend_html_putc(char c); ZEND_API void zend_html_puts(const char *s, uint len TSRMLS_DC); END_EXTERN_C() extern zend_syntax_highlighter_ini syntax_highlighter_ini; #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d01000081a40000000000000000000000014dc0f4120000073a000000b600010002ffffffffffffffff0000003000000000root/usr/local/include/php/Zend/zend_closures.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Christian Seiler | | Dmitry Stogov | +----------------------------------------------------------------------+ */ /* $Id: zend_closures.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_CLOSURES_H #define ZEND_CLOSURES_H BEGIN_EXTERN_C() #define ZEND_INVOKE_FUNC_NAME "__invoke" void zend_register_closure_ce(TSRMLS_D); extern ZEND_API zend_class_entry *zend_ce_closure; ZEND_API void zend_create_closure(zval *res, zend_function *op_array TSRMLS_DC); ZEND_API zend_function *zend_get_closure_invoke_method(zval *obj TSRMLS_DC); ZEND_API const zend_function *zend_get_closure_method_def(zval *obj TSRMLS_DC); END_EXTERN_C() #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d00000081a40000000000000000000000014dc0f41200000691000000b600010002ffffffffffffffff0000003900000000root/usr/local/include/php/Zend/zend_builtin_functions.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_builtin_functions.h 309106 2011-03-11 03:52:39Z sebastian $ */ #ifndef ZEND_BUILTIN_FUNCTIONS_H #define ZEND_BUILTIN_FUNCTIONS_H int zend_startup_builtin_functions(TSRMLS_D); BEGIN_EXTERN_C() ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int options TSRMLS_DC); END_EXTERN_C() #endif /* ZEND_BUILTIN_FUNCTIONS_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d1f000081a40000000000000000000000014dc0f41200000fbb000000b600010002ffffffffffffffff0000002d00000000root/usr/local/include/php/Zend/zend_llist.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_llist.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_LLIST_H #define ZEND_LLIST_H typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; char data[1]; /* Needs to always be last in the struct */ } zend_llist_element; typedef void (*llist_dtor_func_t)(void *); typedef int (*llist_compare_func_t)(const zend_llist_element **, const zend_llist_element ** TSRMLS_DC); typedef void (*llist_apply_with_args_func_t)(void *data, int num_args, va_list args TSRMLS_DC); typedef void (*llist_apply_with_arg_func_t)(void *data, void *arg TSRMLS_DC); typedef void (*llist_apply_func_t)(void * TSRMLS_DC); typedef struct _zend_llist { zend_llist_element *head; zend_llist_element *tail; size_t count; size_t size; llist_dtor_func_t dtor; unsigned char persistent; zend_llist_element *traverse_ptr; } zend_llist; typedef zend_llist_element* zend_llist_position; BEGIN_EXTERN_C() ZEND_API void zend_llist_init(zend_llist *l, size_t size, llist_dtor_func_t dtor, unsigned char persistent); ZEND_API void zend_llist_add_element(zend_llist *l, void *element); ZEND_API void zend_llist_prepend_element(zend_llist *l, void *element); ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare)(void *element1, void *element2)); ZEND_API void zend_llist_destroy(zend_llist *l); ZEND_API void zend_llist_clean(zend_llist *l); ZEND_API void *zend_llist_remove_tail(zend_llist *l); ZEND_API void zend_llist_copy(zend_llist *dst, zend_llist *src); ZEND_API void zend_llist_apply(zend_llist *l, llist_apply_func_t func TSRMLS_DC); ZEND_API void zend_llist_apply_with_del(zend_llist *l, int (*func)(void *data)); ZEND_API void zend_llist_apply_with_argument(zend_llist *l, llist_apply_with_arg_func_t func, void *arg TSRMLS_DC); ZEND_API void zend_llist_apply_with_arguments(zend_llist *l, llist_apply_with_args_func_t func TSRMLS_DC, int num_args, ...); ZEND_API int zend_llist_count(zend_llist *l); ZEND_API void zend_llist_sort(zend_llist *l, llist_compare_func_t comp_func TSRMLS_DC); /* traversal */ ZEND_API void *zend_llist_get_first_ex(zend_llist *l, zend_llist_position *pos); ZEND_API void *zend_llist_get_last_ex(zend_llist *l, zend_llist_position *pos); ZEND_API void *zend_llist_get_next_ex(zend_llist *l, zend_llist_position *pos); ZEND_API void *zend_llist_get_prev_ex(zend_llist *l, zend_llist_position *pos); #define zend_llist_get_first(l) zend_llist_get_first_ex(l, NULL) #define zend_llist_get_last(l) zend_llist_get_last_ex(l, NULL) #define zend_llist_get_next(l) zend_llist_get_next_ex(l, NULL) #define zend_llist_get_prev(l) zend_llist_get_prev_ex(l, NULL) END_EXTERN_C() #endif /* ZEND_LLIST_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d13000081a40000000000000000000000014dc0f412000005f1000000b600010002ffffffffffffffff0000002e00000000root/usr/local/include/php/Zend/zend_indent.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_indent.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_INDENT_H #define ZEND_INDENT_H BEGIN_EXTERN_C() ZEND_API void zend_indent(void); END_EXTERN_C() #endif /* ZEND_INDENT_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d1a000081a40000000000000000000000014dc0f41200000ea3000000b600010002ffffffffffffffff0000003100000000root/usr/local/include/php/Zend/zend_iterators.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Wez Furlong | | Marcus Boerger | +----------------------------------------------------------------------+ */ /* $Id: zend_iterators.h 306939 2011-01-01 02:19:59Z felipe $ */ /* These iterators were designed to operate within the foreach() * structures provided by the engine, but could be extended for use * with other iterative engine opcodes. * These methods have similar semantics to the zend_hash API functions * with similar names. * */ typedef struct _zend_object_iterator zend_object_iterator; typedef struct _zend_object_iterator_funcs { /* release all resources associated with this iterator instance */ void (*dtor)(zend_object_iterator *iter TSRMLS_DC); /* check for end of iteration (FAILURE or SUCCESS if data is valid) */ int (*valid)(zend_object_iterator *iter TSRMLS_DC); /* fetch the item data for the current element */ void (*get_current_data)(zend_object_iterator *iter, zval ***data TSRMLS_DC); /* fetch the key for the current element (return HASH_KEY_IS_STRING or HASH_KEY_IS_LONG) (optional, may be NULL) */ int (*get_current_key)(zend_object_iterator *iter, char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC); /* step forwards to next element */ void (*move_forward)(zend_object_iterator *iter TSRMLS_DC); /* rewind to start of data (optional, may be NULL) */ void (*rewind)(zend_object_iterator *iter TSRMLS_DC); /* invalidate current value/key (optional, may be NULL) */ void (*invalidate_current)(zend_object_iterator *iter TSRMLS_DC); } zend_object_iterator_funcs; struct _zend_object_iterator { void *data; zend_object_iterator_funcs *funcs; ulong index; /* private to fe_reset/fe_fetch opcodes */ }; typedef struct _zend_class_iterator_funcs { zend_object_iterator_funcs *funcs; union _zend_function *zf_new_iterator; union _zend_function *zf_valid; union _zend_function *zf_current; union _zend_function *zf_key; union _zend_function *zf_next; union _zend_function *zf_rewind; } zend_class_iterator_funcs; enum zend_object_iterator_kind { ZEND_ITER_INVALID, ZEND_ITER_PLAIN_ARRAY, ZEND_ITER_PLAIN_OBJECT, ZEND_ITER_OBJECT }; BEGIN_EXTERN_C() /* given a zval, returns stuff that can be used to iterate it. */ ZEND_API enum zend_object_iterator_kind zend_iterator_unwrap(zval *array_ptr, zend_object_iterator **iter TSRMLS_DC); /* given an iterator, wrap it up as a zval for use by the engine opcodes */ ZEND_API zval *zend_iterator_wrap(zend_object_iterator *iter TSRMLS_DC); ZEND_API void zend_register_iterator_wrapper(TSRMLS_D); END_EXTERN_C() /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d2d000081a40000000000000000000000014dc0f41200001ba5000000b600010002ffffffffffffffff0000002f00000000root/usr/local/include/php/Zend/zend_ts_hash.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Harald Radi | +----------------------------------------------------------------------+ */ /* $Id: zend_ts_hash.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_TS_HASH_H #define ZEND_TS_HASH_H #include "zend.h" typedef struct _zend_ts_hashtable { HashTable hash; zend_uint reader; #ifdef ZTS MUTEX_T mx_reader; MUTEX_T mx_writer; #endif } TsHashTable; BEGIN_EXTERN_C() #define TS_HASH(table) (&(table->hash)) /* startup/shutdown */ ZEND_API int _zend_ts_hash_init(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC); ZEND_API int _zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC); ZEND_API void zend_ts_hash_destroy(TsHashTable *ht); ZEND_API void zend_ts_hash_clean(TsHashTable *ht); #define zend_ts_hash_init(ht, nSize, pHashFunction, pDestructor, persistent) \ _zend_ts_hash_init(ht, nSize, pHashFunction, pDestructor, persistent ZEND_FILE_LINE_CC) #define zend_ts_hash_init_ex(ht, nSize, pHashFunction, pDestructor, persistent, bApplyProtection) \ _zend_ts_hash_init_ex(ht, nSize, pHashFunction, pDestructor, persistent, bApplyProtection ZEND_FILE_LINE_CC) /* additions/updates/changes */ ZEND_API int _zend_ts_hash_add_or_update(TsHashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC); #define zend_ts_hash_update(ht, arKey, nKeyLength, pData, nDataSize, pDest) \ _zend_ts_hash_add_or_update(ht, arKey, nKeyLength, pData, nDataSize, pDest, HASH_UPDATE ZEND_FILE_LINE_CC) #define zend_ts_hash_add(ht, arKey, nKeyLength, pData, nDataSize, pDest) \ _zend_ts_hash_add_or_update(ht, arKey, nKeyLength, pData, nDataSize, pDest, HASH_ADD ZEND_FILE_LINE_CC) ZEND_API int _zend_ts_hash_quick_add_or_update(TsHashTable *ht, char *arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC); #define zend_ts_hash_quick_update(ht, arKey, nKeyLength, h, pData, nDataSize, pDest) \ _zend_ts_hash_quick_add_or_update(ht, arKey, nKeyLength, h, pData, nDataSize, pDest, HASH_UPDATE ZEND_FILE_LINE_CC) #define zend_ts_hash_quick_add(ht, arKey, nKeyLength, h, pData, nDataSize, pDest) \ _zend_ts_hash_quick_add_or_update(ht, arKey, nKeyLength, h, pData, nDataSize, pDest, HASH_ADD ZEND_FILE_LINE_CC) ZEND_API int _zend_ts_hash_index_update_or_next_insert(TsHashTable *ht, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC); #define zend_ts_hash_index_update(ht, h, pData, nDataSize, pDest) \ _zend_ts_hash_index_update_or_next_insert(ht, h, pData, nDataSize, pDest, HASH_UPDATE ZEND_FILE_LINE_CC) #define zend_ts_hash_next_index_insert(ht, pData, nDataSize, pDest) \ _zend_ts_hash_index_update_or_next_insert(ht, 0, pData, nDataSize, pDest, HASH_NEXT_INSERT ZEND_FILE_LINE_CC) ZEND_API int zend_ts_hash_add_empty_element(TsHashTable *ht, char *arKey, uint nKeyLength); ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht); ZEND_API void zend_ts_hash_apply(TsHashTable *ht, apply_func_t apply_func TSRMLS_DC); ZEND_API void zend_ts_hash_apply_with_argument(TsHashTable *ht, apply_func_arg_t apply_func, void * TSRMLS_DC); ZEND_API void zend_ts_hash_apply_with_arguments(TsHashTable *ht TSRMLS_DC, apply_func_args_t apply_func, int, ...); ZEND_API void zend_ts_hash_reverse_apply(TsHashTable *ht, apply_func_t apply_func TSRMLS_DC); /* Deletes */ ZEND_API int zend_ts_hash_del_key_or_index(TsHashTable *ht, char *arKey, uint nKeyLength, ulong h, int flag); #define zend_ts_hash_del(ht, arKey, nKeyLength) \ zend_ts_hash_del_key_or_index(ht, arKey, nKeyLength, 0, HASH_DEL_KEY) #define zend_ts_hash_index_del(ht, h) \ zend_ts_hash_del_key_or_index(ht, NULL, 0, h, HASH_DEL_INDEX) ZEND_API ulong zend_ts_get_hash_value(TsHashTable *ht, char *arKey, uint nKeyLength); /* Data retreival */ ZEND_API int zend_ts_hash_find(TsHashTable *ht, char *arKey, uint nKeyLength, void **pData); ZEND_API int zend_ts_hash_quick_find(TsHashTable *ht, char *arKey, uint nKeyLength, ulong h, void **pData); ZEND_API int zend_ts_hash_index_find(TsHashTable *ht, ulong h, void **pData); /* Misc */ ZEND_API int zend_ts_hash_exists(TsHashTable *ht, char *arKey, uint nKeyLength); ZEND_API int zend_ts_hash_index_exists(TsHashTable *ht, ulong h); /* Copying, merging and sorting */ ZEND_API void zend_ts_hash_copy(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size); ZEND_API void zend_ts_hash_copy_to_hash(HashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size); ZEND_API void zend_ts_hash_merge(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size, int overwrite); ZEND_API void zend_ts_hash_merge_ex(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, uint size, merge_checker_func_t pMergeSource, void *pParam); ZEND_API int zend_ts_hash_sort(TsHashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber TSRMLS_DC); ZEND_API int zend_ts_hash_compare(TsHashTable *ht1, TsHashTable *ht2, compare_func_t compar, zend_bool ordered TSRMLS_DC); ZEND_API int zend_ts_hash_minmax(TsHashTable *ht, compare_func_t compar, int flag, void **pData TSRMLS_DC); ZEND_API int zend_ts_hash_num_elements(TsHashTable *ht); ZEND_API int zend_ts_hash_rehash(TsHashTable *ht); ZEND_API ulong zend_ts_hash_func(char *arKey, uint nKeyLength); #if ZEND_DEBUG /* debug */ void zend_ts_hash_display_pListTail(TsHashTable *ht); void zend_ts_hash_display(TsHashTable *ht); #endif END_EXTERN_C() #define ZEND_TS_INIT_SYMTABLE(ht) \ ZEND_TS_INIT_SYMTABLE_EX(ht, 2, 0) #define ZEND_TS_INIT_SYMTABLE_EX(ht, n, persistent) \ zend_ts_hash_init(ht, n, NULL, ZVAL_PTR_DTOR, persistent) #endif /* ZEND_HASH_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d22000081a40000000000000000000000014dc0f41200000a02000000b600010002ffffffffffffffff0000003000000000root/usr/local/include/php/Zend/zend_multiply.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Sascha Schumann | | Ard Biesheuvel | +----------------------------------------------------------------------+ */ /* $Id: zend_multiply.h 306939 2011-01-01 02:19:59Z felipe $ */ #if defined(__i386__) && defined(__GNUC__) #define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do { \ long __tmpvar; \ __asm__ ("imul %3,%0\n" \ "adc $0,%1" \ : "=r"(__tmpvar),"=r"(usedval) \ : "0"(a), "r"(b), "1"(0)); \ if (usedval) (dval) = (double) (a) * (double) (b); \ else (lval) = __tmpvar; \ } while (0) #elif SIZEOF_LONG == 4 && defined(HAVE_ZEND_LONG64) #define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do { \ zend_long64 __result = (zend_long64) (a) * (zend_long64) (b); \ if (__result > LONG_MAX || __result < LONG_MIN) { \ (dval) = (double) __result; \ (usedval) = 1; \ } else { \ (lval) = (long) __result; \ (usedval) = 0; \ } \ } while (0) #else #define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do { \ long __lres = (a) * (b); \ long double __dres = (long double)(a) * (long double)(b); \ long double __delta = (long double) __lres - __dres; \ if ( ((usedval) = (( __dres + __delta ) != __dres))) { \ (dval) = __dres; \ } else { \ (lval) = __lres; \ } \ } while (0) #endif 07070100180d24000081a40000000000000000000000014dc0f412000008db000000b600010002ffffffffffffffff0000002f00000000root/usr/local/include/php/Zend/zend_objects.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_objects.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_OBJECTS_H #define ZEND_OBJECTS_H #include "zend.h" BEGIN_EXTERN_C() ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce TSRMLS_DC); ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC); ZEND_API zend_object_value zend_objects_new(zend_object **object, zend_class_entry *class_type TSRMLS_DC); ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handle handle TSRMLS_DC); ZEND_API zend_object *zend_objects_get_address(const zval *object TSRMLS_DC); ZEND_API void zend_objects_clone_members(zend_object *new_object, zend_object_value new_obj_val, zend_object *old_object, zend_object_handle handle TSRMLS_DC); ZEND_API zend_object_value zend_objects_clone_obj(zval *object TSRMLS_DC); ZEND_API void zend_objects_free_object_storage(zend_object *object TSRMLS_DC); END_EXTERN_C() #endif /* ZEND_OBJECTS_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d09000081a40000000000000000000000014dc0f41200000c04000000b600010002ffffffffffffffff0000003200000000root/usr/local/include/php/Zend/zend_exceptions.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Marcus Boerger | | Sterling Hughes | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_exceptions.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_EXCEPTIONS_H #define ZEND_EXCEPTIONS_H BEGIN_EXTERN_C() ZEND_API void zend_exception_set_previous(zval *exception, zval *add_previous TSRMLS_DC); ZEND_API void zend_exception_save(TSRMLS_D); ZEND_API void zend_exception_restore(TSRMLS_D); void zend_throw_exception_internal(zval *exception TSRMLS_DC); void zend_register_default_exception(TSRMLS_D); ZEND_API zend_class_entry *zend_exception_get_default(TSRMLS_D); ZEND_API zend_class_entry *zend_get_error_exception(TSRMLS_D); ZEND_API void zend_register_default_classes(TSRMLS_D); /* exception_ce NULL or zend_exception_get_default() or a derived class * message NULL or the message of the exception */ ZEND_API zval * zend_throw_exception(zend_class_entry *exception_ce, char *message, long code TSRMLS_DC); ZEND_API zval * zend_throw_exception_ex(zend_class_entry *exception_ce, long code TSRMLS_DC, char *format, ...); ZEND_API void zend_throw_exception_object(zval *exception TSRMLS_DC); ZEND_API void zend_clear_exception(TSRMLS_D); ZEND_API zval * zend_throw_error_exception(zend_class_entry *exception_ce, char *message, long code, int severity TSRMLS_DC); extern ZEND_API void (*zend_throw_exception_hook)(zval *ex TSRMLS_DC); /* show an exception using zend_error(severity,...), severity should be E_ERROR */ ZEND_API void zend_exception_error(zval *exception, int severity TSRMLS_DC); /* do not export, in php it's available thru spprintf directly */ int zend_spprintf(char **message, int max_len, char *format, ...); END_EXTERN_C() #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d2e000081a40000000000000000000000014dc0f41200000940000000b600010002ffffffffffffffff0000002d00000000root/usr/local/include/php/Zend/zend_types.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_types.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_TYPES_H #define ZEND_TYPES_H typedef unsigned char zend_bool; typedef unsigned char zend_uchar; typedef unsigned int zend_uint; typedef unsigned long zend_ulong; typedef unsigned short zend_ushort; #define HAVE_ZEND_LONG64 #ifdef ZEND_WIN32 typedef __int64 zend_long64; typedef unsigned __int64 zend_ulong64; #elif SIZEOF_LONG_LONG_INT == 8 typedef long long int zend_long64; typedef unsigned long long int zend_ulong64; #elif SIZEOF_LONG_LONG == 8 typedef long long zend_long64; typedef unsigned long long zend_ulong64; #else # undef HAVE_ZEND_LONG64 #endif #ifdef _WIN64 typedef __int64 zend_intptr_t; typedef unsigned __int64 zend_uintptr_t; #else typedef long zend_intptr_t; typedef unsigned long zend_uintptr_t; #endif typedef unsigned int zend_object_handle; typedef struct _zend_object_handlers zend_object_handlers; typedef struct _zend_object_value { zend_object_handle handle; zend_object_handlers *handlers; } zend_object_value; #endif /* ZEND_TYPES_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d07000081a40000000000000000000000014dc0f412000007ac000000b600010002ffffffffffffffff0000003500000000root/usr/local/include/php/Zend/zend_dynamic_array.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_dynamic_array.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_DYNAMIC_ARRAY_H #define ZEND_DYNAMIC_ARRAY_H typedef struct _dynamic_array { char *array; unsigned int element_size; unsigned int last_used; unsigned int allocated; } dynamic_array; BEGIN_EXTERN_C() ZEND_API int zend_dynamic_array_init(dynamic_array *da, unsigned int element_size, unsigned int size); ZEND_API void *zend_dynamic_array_push(dynamic_array *da); ZEND_API void *zend_dynamic_array_pop(dynamic_array *da); ZEND_API void *zend_dynamic_array_get_element(dynamic_array *da, unsigned int index); END_EXTERN_C() #endif /* ZEND_DYNAMIC_ARRAY_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d2f000081a40000000000000000000000014dc0f41200000ff8000000b600010002ffffffffffffffff0000003100000000root/usr/local/include/php/Zend/zend_variables.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_variables.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_VARIABLES_H #define ZEND_VARIABLES_H BEGIN_EXTERN_C() ZEND_API void _zval_dtor_func(zval *zvalue ZEND_FILE_LINE_DC); static inline void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC) { if (zvalue->type <= IS_BOOL) { return; } _zval_dtor_func(zvalue ZEND_FILE_LINE_RELAY_CC); } ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC); static inline void _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC) { if (zvalue->type <= IS_BOOL) { return; } _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC); } ZEND_API int zend_print_variable(zval *var); ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC); ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC); ZEND_API void _zval_internal_ptr_dtor(zval **zvalue ZEND_FILE_LINE_DC); ZEND_API void _zval_dtor_wrapper(zval *zvalue); #define zval_copy_ctor(zvalue) _zval_copy_ctor((zvalue) ZEND_FILE_LINE_CC) #define zval_dtor(zvalue) _zval_dtor((zvalue) ZEND_FILE_LINE_CC) #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC) #define zval_internal_dtor(zvalue) _zval_internal_dtor((zvalue) ZEND_FILE_LINE_CC) #define zval_internal_ptr_dtor(zvalue) _zval_internal_ptr_dtor((zvalue) ZEND_FILE_LINE_CC) #define zval_dtor_wrapper _zval_dtor_wrapper #if ZEND_DEBUG ZEND_API void _zval_copy_ctor_wrapper(zval *zvalue); ZEND_API void _zval_ptr_dtor_wrapper(zval **zval_ptr); ZEND_API void _zval_internal_dtor_wrapper(zval *zvalue); ZEND_API void _zval_internal_ptr_dtor_wrapper(zval **zvalue); #define zval_copy_ctor_wrapper _zval_copy_ctor_wrapper #define zval_ptr_dtor_wrapper _zval_ptr_dtor_wrapper #define zval_internal_dtor_wrapper _zval_internal_dtor_wrapper #define zval_internal_ptr_dtor_wrapper _zval_internal_ptr_dtor_wrapper #else #define zval_copy_ctor_wrapper _zval_copy_ctor_func #define zval_ptr_dtor_wrapper _zval_ptr_dtor #define zval_internal_dtor_wrapper _zval_internal_dtor #define zval_internal_ptr_dtor_wrapper _zval_internal_ptr_dtor #endif ZEND_API void zval_add_ref(zval **p); ZEND_API void zval_property_ctor(zval **); #ifdef ZTS # define zval_shared_property_ctor zval_property_ctor #else # define zval_shared_property_ctor zval_add_ref #endif #define zval_copy_property_ctor(ce) ((copy_ctor_func_t) (((ce)->type == ZEND_INTERNAL_CLASS) ? zval_shared_property_ctor : zval_add_ref)) END_EXTERN_C() #define ZVAL_DESTRUCTOR (void (*)(void *)) zval_dtor_wrapper #define ZVAL_PTR_DTOR (void (*)(void *)) zval_ptr_dtor_wrapper #define ZVAL_INTERNAL_DTOR (void (*)(void *)) zval_internal_dtor_wrapper #define ZVAL_INTERNAL_PTR_DTOR (void (*)(void *)) zval_internal_ptr_dtor_wrapper #define ZVAL_COPY_CTOR (void (*)(void *)) zval_copy_ctor_wrapper #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180cfe000081a40000000000000000000000014dc0f412000030e0000000b600010002ffffffffffffffff0000002d00000000root/usr/local/include/php/Zend/zend_alloc.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_alloc.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_ALLOC_H #define ZEND_ALLOC_H #include #include "../TSRM/TSRM.h" #include "zend.h" #ifndef ZEND_MM_ALIGNMENT # define ZEND_MM_ALIGNMENT 8 # define ZEND_MM_ALIGNMENT_LOG2 3 #elif ZEND_MM_ALIGNMENT < 4 # undef ZEND_MM_ALIGNMENT # undef ZEND_MM_ALIGNMENT_LOG2 # define ZEND_MM_ALIGNMENT 4 # define ZEND_MM_ALIGNMENT_LOG2 2 #endif #define ZEND_MM_ALIGNMENT_MASK ~(ZEND_MM_ALIGNMENT-1) #define ZEND_MM_ALIGNED_SIZE(size) (((size) + ZEND_MM_ALIGNMENT - 1) & ZEND_MM_ALIGNMENT_MASK) typedef struct _zend_leak_info { void *addr; size_t size; char *filename; uint lineno; char *orig_filename; uint orig_lineno; } zend_leak_info; BEGIN_EXTERN_C() ZEND_API char *zend_strndup(const char *s, unsigned int length) ZEND_ATTRIBUTE_MALLOC; ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC; ZEND_API void *_safe_emalloc(size_t nmemb, size_t size, size_t offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC; ZEND_API void *_safe_malloc(size_t nmemb, size_t size, size_t offset) ZEND_ATTRIBUTE_MALLOC; ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC); ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC; ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC); ZEND_API void *_safe_erealloc(void *ptr, size_t nmemb, size_t size, size_t offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC); ZEND_API void *_safe_realloc(void *ptr, size_t nmemb, size_t size, size_t offset); ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC; ZEND_API char *_estrndup(const char *s, unsigned int length ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC; ZEND_API size_t _zend_mem_block_size(void *ptr TSRMLS_DC ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC); /* Standard wrapper macros */ #define emalloc(size) _emalloc((size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) #define safe_emalloc(nmemb, size, offset) _safe_emalloc((nmemb), (size), (offset) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) #define efree(ptr) _efree((ptr) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) #define ecalloc(nmemb, size) _ecalloc((nmemb), (size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) #define erealloc(ptr, size) _erealloc((ptr), (size), 0 ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) #define safe_erealloc(ptr, nmemb, size, offset) _safe_erealloc((ptr), (nmemb), (size), (offset) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) #define erealloc_recoverable(ptr, size) _erealloc((ptr), (size), 1 ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) #define estrdup(s) _estrdup((s) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) #define estrndup(s, length) _estrndup((s), (length) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) #define zend_mem_block_size(ptr) _zend_mem_block_size((ptr) TSRMLS_CC ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) /* Relay wrapper macros */ #define emalloc_rel(size) _emalloc((size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC) #define safe_emalloc_rel(nmemb, size, offset) _safe_emalloc((nmemb), (size), (offset) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC) #define efree_rel(ptr) _efree((ptr) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC) #define ecalloc_rel(nmemb, size) _ecalloc((nmemb), (size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC) #define erealloc_rel(ptr, size) _erealloc((ptr), (size), 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC) #define erealloc_recoverable_rel(ptr, size) _erealloc((ptr), (size), 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC) #define safe_erealloc_rel(ptr, nmemb, size, offset) _safe_erealloc((ptr), (nmemb), (size), (offset) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC) #define estrdup_rel(s) _estrdup((s) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC) #define estrndup_rel(s, length) _estrndup((s), (length) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC) #define zend_mem_block_size_rel(ptr) _zend_mem_block_size((ptr) TSRMLS_CC ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC) inline static void * __zend_malloc(size_t len) { void *tmp = malloc(len); if (tmp) { return tmp; } fprintf(stderr, "Out of memory\n"); exit(1); } inline static void * __zend_calloc(size_t nmemb, size_t len) { void *tmp = _safe_malloc(nmemb, len, 0); memset(tmp, 0, nmemb * len); return tmp; } inline static void * __zend_realloc(void *p, size_t len) { p = realloc(p, len); if (p) { return p; } fprintf(stderr, "Out of memory\n"); exit(1); } /* Selective persistent/non persistent allocation macros */ #define pemalloc(size, persistent) ((persistent)?__zend_malloc(size):emalloc(size)) #define safe_pemalloc(nmemb, size, offset, persistent) ((persistent)?_safe_malloc(nmemb, size, offset):safe_emalloc(nmemb, size, offset)) #define pefree(ptr, persistent) ((persistent)?free(ptr):efree(ptr)) #define pecalloc(nmemb, size, persistent) ((persistent)?__zend_calloc((nmemb), (size)):ecalloc((nmemb), (size))) #define perealloc(ptr, size, persistent) ((persistent)?__zend_realloc((ptr), (size)):erealloc((ptr), (size))) #define safe_perealloc(ptr, nmemb, size, offset, persistent) ((persistent)?_safe_realloc((ptr), (nmemb), (size), (offset)):safe_erealloc((ptr), (nmemb), (size), (offset))) #define perealloc_recoverable(ptr, size, persistent) ((persistent)?__zend_realloc((ptr), (size)):erealloc_recoverable((ptr), (size))) #define pestrdup(s, persistent) ((persistent)?strdup(s):estrdup(s)) #define pestrndup(s, length, persistent) ((persistent)?zend_strndup((s),(length)):estrndup((s),(length))) #define pemalloc_rel(size, persistent) ((persistent)?__zend_malloc(size):emalloc_rel(size)) #define pefree_rel(ptr, persistent) ((persistent)?free(ptr):efree_rel(ptr)) #define pecalloc_rel(nmemb, size, persistent) ((persistent)?__zend_calloc((nmemb), (size)):ecalloc_rel((nmemb), (size))) #define perealloc_rel(ptr, size, persistent) ((persistent)?__zend_realloc((ptr), (size)):erealloc_rel((ptr), (size))) #define perealloc_recoverable_rel(ptr, size, persistent) ((persistent)?__zend_realloc((ptr), (size)):erealloc_recoverable_rel((ptr), (size))) #define pestrdup_rel(s, persistent) ((persistent)?strdup(s):estrdup_rel(s)) #define safe_estrdup(ptr) ((ptr)?(estrdup(ptr)):STR_EMPTY_ALLOC()) #define safe_estrndup(ptr, len) ((ptr)?(estrndup((ptr), (len))):STR_EMPTY_ALLOC()) ZEND_API int zend_set_memory_limit(size_t memory_limit); ZEND_API void start_memory_manager(TSRMLS_D); ZEND_API void shutdown_memory_manager(int silent, int full_shutdown TSRMLS_DC); ZEND_API int is_zend_mm(TSRMLS_D); #if ZEND_DEBUG ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC); ZEND_API void _full_mem_check(int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC); void zend_debug_alloc_output(char *format, ...); #define mem_block_check(ptr, silent) _mem_block_check(ptr, silent ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) #define full_mem_check(silent) _full_mem_check(silent ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) #else #define mem_block_check(type, ptr, silent) #define full_mem_check(silent) #endif ZEND_API size_t zend_memory_usage(int real_usage TSRMLS_DC); ZEND_API size_t zend_memory_peak_usage(int real_usage TSRMLS_DC); END_EXTERN_C() /* Macroses for zend_fast_cache.h compatibility */ #define ZEND_FAST_ALLOC(p, type, fc_type) \ (p) = (type *) emalloc(sizeof(type)) #define ZEND_FAST_FREE(p, fc_type) \ efree(p) #define ZEND_FAST_ALLOC_REL(p, type, fc_type) \ (p) = (type *) emalloc_rel(sizeof(type)) #define ZEND_FAST_FREE_REL(p, fc_type) \ efree_rel(p) /* fast cache for zval's */ #define ALLOC_ZVAL(z) \ ZEND_FAST_ALLOC(z, zval, ZVAL_CACHE_LIST) #define FREE_ZVAL(z) \ ZEND_FAST_FREE(z, ZVAL_CACHE_LIST) #define ALLOC_ZVAL_REL(z) \ ZEND_FAST_ALLOC_REL(z, zval, ZVAL_CACHE_LIST) #define FREE_ZVAL_REL(z) \ ZEND_FAST_FREE_REL(z, ZVAL_CACHE_LIST) /* fast cache for HashTables */ #define ALLOC_HASHTABLE(ht) \ ZEND_FAST_ALLOC(ht, HashTable, HASHTABLE_CACHE_LIST) #define FREE_HASHTABLE(ht) \ ZEND_FAST_FREE(ht, HASHTABLE_CACHE_LIST) #define ALLOC_HASHTABLE_REL(ht) \ ZEND_FAST_ALLOC_REL(ht, HashTable, HASHTABLE_CACHE_LIST) #define FREE_HASHTABLE_REL(ht) \ ZEND_FAST_FREE_REL(ht, HASHTABLE_CACHE_LIST) /* Heap functions */ typedef struct _zend_mm_heap zend_mm_heap; ZEND_API zend_mm_heap *zend_mm_startup(void); ZEND_API void zend_mm_shutdown(zend_mm_heap *heap, int full_shutdown, int silent TSRMLS_DC); ZEND_API void *_zend_mm_alloc(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC; ZEND_API void _zend_mm_free(zend_mm_heap *heap, void *p ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC); ZEND_API void *_zend_mm_realloc(zend_mm_heap *heap, void *p, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC); ZEND_API size_t _zend_mm_block_size(zend_mm_heap *heap, void *p ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC); #define zend_mm_alloc(heap, size) _zend_mm_alloc((heap), (size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) #define zend_mm_free(heap, p) _zend_mm_free((heap), (p) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) #define zend_mm_realloc(heap, p, size) _zend_mm_realloc((heap), (p), (size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) #define zend_mm_block_size(heap, p) _zend_mm_block_size((heap), (p) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) #define zend_mm_alloc_rel(heap, size) _zend_mm_alloc((heap), (size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC) #define zend_mm_free_rel(heap, p) _zend_mm_free((heap), (p) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC) #define zend_mm_realloc_rel(heap, p, size) _zend_mm_realloc((heap), (p), (size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC) #define zend_mm_block_size_rel(heap, p) _zend_mm_block_size((heap), (p) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) /* Heaps with user defined storage */ typedef struct _zend_mm_storage zend_mm_storage; typedef struct _zend_mm_segment { size_t size; struct _zend_mm_segment *next_segment; } zend_mm_segment; typedef struct _zend_mm_mem_handlers { const char *name; zend_mm_storage* (*init)(void *params); void (*dtor)(zend_mm_storage *storage); void (*compact)(zend_mm_storage *storage); zend_mm_segment* (*_alloc)(zend_mm_storage *storage, size_t size); zend_mm_segment* (*_realloc)(zend_mm_storage *storage, zend_mm_segment *ptr, size_t size); void (*_free)(zend_mm_storage *storage, zend_mm_segment *ptr); } zend_mm_mem_handlers; struct _zend_mm_storage { const zend_mm_mem_handlers *handlers; void *data; }; ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_mem_handlers *handlers, size_t block_size, size_t reserve_size, int internal, void *params); ZEND_API zend_mm_heap *zend_mm_set_heap(zend_mm_heap *new_heap TSRMLS_DC); ZEND_API zend_mm_storage *zend_mm_get_storage(zend_mm_heap *heap); ZEND_API void zend_mm_set_custom_handlers(zend_mm_heap *heap, void* (*_malloc)(size_t), void (*_free)(void*), void* (*_realloc)(void*, size_t)); #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d19000081a40000000000000000000000014dc0f412000006a7000000b600010002ffffffffffffffff0000003400000000root/usr/local/include/php/Zend/zend_istdiostream.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_istdiostream.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef _ZEND_STDIOSTREAM #define _ZEND_STDIOSTREAM #if defined(ZTS) && !defined(HAVE_CLASS_ISTDIOSTREAM) class istdiostream : public istream { private: stdiobuf _file; public: istdiostream (FILE* __f) : istream(), _file(__f) { init(&_file); } stdiobuf* rdbuf()/* const */ { return &_file; } }; #endif #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180cfd000081a40000000000000000000000014dc0f41200009706000000b600010002ffffffffffffffff0000002b00000000root/usr/local/include/php/Zend/zend_API.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | | Andrei Zmievski | +----------------------------------------------------------------------+ */ /* $Id: zend_API.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_API_H #define ZEND_API_H #include "zend_modules.h" #include "zend_list.h" #include "zend_operators.h" #include "zend_variables.h" #include "zend_execute.h" BEGIN_EXTERN_C() typedef struct _zend_function_entry { const char *fname; void (*handler)(INTERNAL_FUNCTION_PARAMETERS); const struct _zend_arg_info *arg_info; zend_uint num_args; zend_uint flags; } zend_function_entry; typedef struct _zend_fcall_info { size_t size; HashTable *function_table; zval *function_name; HashTable *symbol_table; zval **retval_ptr_ptr; zend_uint param_count; zval ***params; zval *object_ptr; zend_bool no_separation; } zend_fcall_info; typedef struct _zend_fcall_info_cache { zend_bool initialized; zend_function *function_handler; zend_class_entry *calling_scope; zend_class_entry *called_scope; zval *object_ptr; } zend_fcall_info_cache; #define ZEND_NS_NAME(ns, name) ns"\\"name #define ZEND_FN(name) zif_##name #define ZEND_MN(name) zim_##name #define ZEND_NAMED_FUNCTION(name) void name(INTERNAL_FUNCTION_PARAMETERS) #define ZEND_FUNCTION(name) ZEND_NAMED_FUNCTION(ZEND_FN(name)) #define ZEND_METHOD(classname, name) ZEND_NAMED_FUNCTION(ZEND_MN(classname##_##name)) #define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (zend_uint) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags }, #define ZEND_RAW_FENTRY(zend_name, name, arg_info, flags) { zend_name, name, arg_info, (zend_uint) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags }, #define ZEND_RAW_NAMED_FE(zend_name, name, arg_info) ZEND_RAW_FENTRY(#zend_name, name, arg_info, 0) #define ZEND_NAMED_FE(zend_name, name, arg_info) ZEND_FENTRY(zend_name, name, arg_info, 0) #define ZEND_FE(name, arg_info) ZEND_FENTRY(name, ZEND_FN(name), arg_info, 0) #define ZEND_DEP_FE(name, arg_info) ZEND_FENTRY(name, ZEND_FN(name), arg_info, ZEND_ACC_DEPRECATED) #define ZEND_FALIAS(name, alias, arg_info) ZEND_FENTRY(name, ZEND_FN(alias), arg_info, 0) #define ZEND_DEP_FALIAS(name, alias, arg_info) ZEND_FENTRY(name, ZEND_FN(alias), arg_info, ZEND_ACC_DEPRECATED) #define ZEND_NAMED_ME(zend_name, name, arg_info, flags) ZEND_FENTRY(zend_name, name, arg_info, flags) #define ZEND_ME(classname, name, arg_info, flags) ZEND_FENTRY(name, ZEND_MN(classname##_##name), arg_info, flags) #define ZEND_ABSTRACT_ME(classname, name, arg_info) ZEND_FENTRY(name, NULL, arg_info, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT) #define ZEND_MALIAS(classname, name, alias, arg_info, flags) \ ZEND_FENTRY(name, ZEND_MN(classname##_##alias), arg_info, flags) #define ZEND_ME_MAPPING(name, func_name, arg_types, flags) ZEND_NAMED_ME(name, ZEND_FN(func_name), arg_types, flags) #define ZEND_NS_FENTRY(ns, zend_name, name, arg_info, flags) ZEND_RAW_FENTRY(ZEND_NS_NAME(ns, #zend_name), name, arg_info, flags) #define ZEND_NS_RAW_FENTRY(ns, zend_name, name, arg_info, flags) ZEND_RAW_FENTRY(ZEND_NS_NAME(ns, zend_name), name, arg_info, flags) #define ZEND_NS_RAW_NAMED_FE(ns, zend_name, name, arg_info) ZEND_NS_RAW_FENTRY(ns, #zend_name, name, arg_info, 0) #define ZEND_NS_NAMED_FE(ns, zend_name, name, arg_info) ZEND_NS_FENTRY(ns, #zend_name, name, arg_info, 0) #define ZEND_NS_FE(ns, name, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(name), arg_info, 0) #define ZEND_NS_DEP_FE(ns, name, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(name), arg_info, ZEND_ACC_DEPRECATED) #define ZEND_NS_FALIAS(ns, name, alias, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(alias), arg_info, 0) #define ZEND_NS_DEP_FALIAS(ns, name, alias, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(alias), arg_info, ZEND_ACC_DEPRECATED) #define ZEND_ARG_INFO(pass_by_ref, name) { #name, sizeof(#name)-1, NULL, 0, 0, 0, pass_by_ref, 0, 0 }, #define ZEND_ARG_PASS_INFO(pass_by_ref) { NULL, 0, NULL, 0, 0, 0, pass_by_ref, 0, 0 }, #define ZEND_ARG_OBJ_INFO(pass_by_ref, name, classname, allow_null) { #name, sizeof(#name)-1, #classname, sizeof(#classname)-1, 0, allow_null, pass_by_ref, 0, 0 }, #define ZEND_ARG_ARRAY_INFO(pass_by_ref, name, allow_null) { #name, sizeof(#name)-1, NULL, 0, 1, allow_null, pass_by_ref, 0, 0 }, #define ZEND_BEGIN_ARG_INFO_EX(name, pass_rest_by_reference, return_reference, required_num_args) \ static const zend_arg_info name[] = { \ { NULL, 0, NULL, 0, 0, 0, pass_rest_by_reference, return_reference, required_num_args }, #define ZEND_BEGIN_ARG_INFO(name, pass_rest_by_reference) \ ZEND_BEGIN_ARG_INFO_EX(name, pass_rest_by_reference, ZEND_RETURN_VALUE, -1) #define ZEND_END_ARG_INFO() }; /* Name macros */ #define ZEND_MODULE_STARTUP_N(module) zm_startup_##module #define ZEND_MODULE_SHUTDOWN_N(module) zm_shutdown_##module #define ZEND_MODULE_ACTIVATE_N(module) zm_activate_##module #define ZEND_MODULE_DEACTIVATE_N(module) zm_deactivate_##module #define ZEND_MODULE_POST_ZEND_DEACTIVATE_N(module) zm_post_zend_deactivate_##module #define ZEND_MODULE_INFO_N(module) zm_info_##module #define ZEND_MODULE_GLOBALS_CTOR_N(module) zm_globals_ctor_##module #define ZEND_MODULE_GLOBALS_DTOR_N(module) zm_globals_dtor_##module /* Declaration macros */ #define ZEND_MODULE_STARTUP_D(module) int ZEND_MODULE_STARTUP_N(module)(INIT_FUNC_ARGS) #define ZEND_MODULE_SHUTDOWN_D(module) int ZEND_MODULE_SHUTDOWN_N(module)(SHUTDOWN_FUNC_ARGS) #define ZEND_MODULE_ACTIVATE_D(module) int ZEND_MODULE_ACTIVATE_N(module)(INIT_FUNC_ARGS) #define ZEND_MODULE_DEACTIVATE_D(module) int ZEND_MODULE_DEACTIVATE_N(module)(SHUTDOWN_FUNC_ARGS) #define ZEND_MODULE_POST_ZEND_DEACTIVATE_D(module) int ZEND_MODULE_POST_ZEND_DEACTIVATE_N(module)(void) #define ZEND_MODULE_INFO_D(module) void ZEND_MODULE_INFO_N(module)(ZEND_MODULE_INFO_FUNC_ARGS) #define ZEND_MODULE_GLOBALS_CTOR_D(module) void ZEND_MODULE_GLOBALS_CTOR_N(module)(zend_##module##_globals *module##_globals TSRMLS_DC) #define ZEND_MODULE_GLOBALS_DTOR_D(module) void ZEND_MODULE_GLOBALS_DTOR_N(module)(zend_##module##_globals *module##_globals TSRMLS_DC) #define ZEND_GET_MODULE(name) \ BEGIN_EXTERN_C()\ ZEND_DLEXPORT zend_module_entry *get_module(void) { return &name##_module_entry; }\ END_EXTERN_C() #define ZEND_BEGIN_MODULE_GLOBALS(module_name) \ typedef struct _zend_##module_name##_globals { #define ZEND_END_MODULE_GLOBALS(module_name) \ } zend_##module_name##_globals; #ifdef ZTS #define ZEND_DECLARE_MODULE_GLOBALS(module_name) \ ts_rsrc_id module_name##_globals_id; #define ZEND_EXTERN_MODULE_GLOBALS(module_name) \ extern ts_rsrc_id module_name##_globals_id; #define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor) \ ts_allocate_id(&module_name##_globals_id, sizeof(zend_##module_name##_globals), (ts_allocate_ctor) globals_ctor, (ts_allocate_dtor) globals_dtor); #else #define ZEND_DECLARE_MODULE_GLOBALS(module_name) \ zend_##module_name##_globals module_name##_globals; #define ZEND_EXTERN_MODULE_GLOBALS(module_name) \ extern zend_##module_name##_globals module_name##_globals; #define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor) \ globals_ctor(&module_name##_globals); #endif #define INIT_CLASS_ENTRY(class_container, class_name, functions) \ INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, NULL, NULL, NULL) #define INIT_CLASS_ENTRY_EX(class_container, class_name, class_name_len, functions) \ INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, class_name_len, functions, NULL, NULL, NULL, NULL, NULL) #define INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, class_name_len, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset) \ { \ int _len = class_name_len; \ class_container.name = zend_strndup(class_name, _len); \ class_container.name_length = _len; \ class_container.builtin_functions = functions; \ class_container.constructor = NULL; \ class_container.destructor = NULL; \ class_container.clone = NULL; \ class_container.serialize = NULL; \ class_container.unserialize = NULL; \ class_container.create_object = NULL; \ class_container.interface_gets_implemented = NULL; \ class_container.get_static_method = NULL; \ class_container.__call = handle_fcall; \ class_container.__callstatic = NULL; \ class_container.__tostring = NULL; \ class_container.__get = handle_propget; \ class_container.__set = handle_propset; \ class_container.__unset = handle_propunset; \ class_container.__isset = handle_propisset; \ class_container.serialize_func = NULL; \ class_container.unserialize_func = NULL; \ class_container.serialize = NULL; \ class_container.unserialize = NULL; \ class_container.parent = NULL; \ class_container.num_interfaces = 0; \ class_container.interfaces = NULL; \ class_container.get_iterator = NULL; \ class_container.iterator_funcs.funcs = NULL; \ class_container.module = NULL; \ } #define INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, handle_fcall, handle_propget, handle_propset) \ INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, sizeof(class_name)-1, functions, handle_fcall, handle_propget, handle_propset, NULL, NULL) #define INIT_NS_CLASS_ENTRY(class_container, ns, class_name, functions) \ INIT_CLASS_ENTRY(class_container, ZEND_NS_NAME(ns, class_name), functions) #define INIT_OVERLOADED_NS_CLASS_ENTRY_EX(class_container, ns, class_name, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset) \ INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, ZEND_NS_NAME(ns, class_name), sizeof(ZEND_NS_NAME(ns, class_name))-1, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset) #define INIT_OVERLOADED_NS_CLASS_ENTRY(class_container, ns, class_name, functions, handle_fcall, handle_propget, handle_propset) \ INIT_OVERLOADED_CLASS_ENTRY(class_container, ZEND_NS_NAME(ns, class_name), functions, handle_fcall, handle_propget, handle_propset) #ifdef ZTS # define CE_STATIC_MEMBERS(ce) (((ce)->type==ZEND_USER_CLASS)?(ce)->static_members:CG(static_members)[(zend_intptr_t)(ce)->static_members]) #else # define CE_STATIC_MEMBERS(ce) ((ce)->static_members) #endif #define ZEND_FCI_INITIALIZED(fci) ((fci).size != 0) int zend_next_free_module(void); BEGIN_EXTERN_C() ZEND_API int zend_get_parameters(int ht, int param_count, ...); ZEND_API int _zend_get_parameters_array(int ht, int param_count, zval **argument_array TSRMLS_DC); ZEND_API ZEND_ATTRIBUTE_DEPRECATED int zend_get_parameters_ex(int param_count, ...); ZEND_API int _zend_get_parameters_array_ex(int param_count, zval ***argument_array TSRMLS_DC); /* internal function to efficiently copy parameters when executing __call() */ ZEND_API int zend_copy_parameters_array(int param_count, zval *argument_array TSRMLS_DC); #define zend_get_parameters_array(ht, param_count, argument_array) \ _zend_get_parameters_array(ht, param_count, argument_array TSRMLS_CC) #define zend_get_parameters_array_ex(param_count, argument_array) \ _zend_get_parameters_array_ex(param_count, argument_array TSRMLS_CC) #define zend_parse_parameters_none() \ zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") /* Parameter parsing API -- andrei */ #define ZEND_PARSE_PARAMS_QUIET 1<<1 ZEND_API int zend_parse_parameters(int num_args TSRMLS_DC, char *type_spec, ...); ZEND_API int zend_parse_parameters_ex(int flags, int num_args TSRMLS_DC, char *type_spec, ...); ZEND_API char *zend_zval_type_name(const zval *arg); ZEND_API int zend_parse_method_parameters(int num_args TSRMLS_DC, zval *this_ptr, char *type_spec, ...); ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args TSRMLS_DC, zval *this_ptr, char *type_spec, ...); /* End of parameter parsing API -- andrei */ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_function_entry *functions, HashTable *function_table, int type TSRMLS_DC); ZEND_API void zend_unregister_functions(const zend_function_entry *functions, int count, HashTable *function_table TSRMLS_DC); ZEND_API int zend_startup_module(zend_module_entry *module_entry); ZEND_API zend_module_entry* zend_register_internal_module(zend_module_entry *module_entry TSRMLS_DC); ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module TSRMLS_DC); ZEND_API int zend_startup_module_ex(zend_module_entry *module TSRMLS_DC); ZEND_API int zend_startup_modules(TSRMLS_D); ZEND_API void zend_check_magic_method_implementation(const zend_class_entry *ce, const zend_function *fptr, int error_type TSRMLS_DC); ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *class_entry TSRMLS_DC); ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name TSRMLS_DC); ZEND_API zend_class_entry *zend_register_internal_interface(zend_class_entry *orig_class_entry TSRMLS_DC); ZEND_API void zend_class_implements(zend_class_entry *class_entry TSRMLS_DC, int num_interfaces, ...); ZEND_API int zend_register_class_alias_ex(const char *name, int name_len, zend_class_entry *ce TSRMLS_DC); #define zend_register_class_alias(name, ce) \ zend_register_class_alias_ex(name, sizeof(name)-1, ce TSRMLS_DC) #define zend_register_ns_class_alias(ns, name, ce) \ zend_register_class_alias_ex(ZEND_NS_NAME(ns, name), sizeof(ZEND_NS_NAME(ns, name))-1, ce TSRMLS_DC) ZEND_API int zend_disable_function(char *function_name, uint function_name_length TSRMLS_DC); ZEND_API int zend_disable_class(char *class_name, uint class_name_length TSRMLS_DC); ZEND_API void zend_wrong_param_count(TSRMLS_D); #define IS_CALLABLE_CHECK_SYNTAX_ONLY (1<<0) #define IS_CALLABLE_CHECK_NO_ACCESS (1<<1) #define IS_CALLABLE_CHECK_IS_STATIC (1<<2) #define IS_CALLABLE_CHECK_SILENT (1<<3) #define IS_CALLABLE_STRICT (IS_CALLABLE_CHECK_IS_STATIC) ZEND_API zend_bool zend_is_callable_ex(zval *callable, zval *object_ptr, uint check_flags, char **callable_name, int *callable_name_len, zend_fcall_info_cache *fcc, char **error TSRMLS_DC); ZEND_API zend_bool zend_is_callable(zval *callable, uint check_flags, char **callable_name TSRMLS_DC); ZEND_API zend_bool zend_make_callable(zval *callable, char **callable_name TSRMLS_DC); ZEND_API const char *zend_get_module_version(const char *module_name); ZEND_API int zend_get_module_started(const char *module_name); ZEND_API int zend_declare_property(zend_class_entry *ce, char *name, int name_length, zval *property, int access_type TSRMLS_DC); ZEND_API int zend_declare_property_ex(zend_class_entry *ce, const char *name, int name_length, zval *property, int access_type, char *doc_comment, int doc_comment_len TSRMLS_DC); ZEND_API int zend_declare_property_null(zend_class_entry *ce, char *name, int name_length, int access_type TSRMLS_DC); ZEND_API int zend_declare_property_bool(zend_class_entry *ce, char *name, int name_length, long value, int access_type TSRMLS_DC); ZEND_API int zend_declare_property_long(zend_class_entry *ce, char *name, int name_length, long value, int access_type TSRMLS_DC); ZEND_API int zend_declare_property_double(zend_class_entry *ce, char *name, int name_length, double value, int access_type TSRMLS_DC); ZEND_API int zend_declare_property_string(zend_class_entry *ce, char *name, int name_length, char *value, int access_type TSRMLS_DC); ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, char *name, int name_length, char *value, int value_len, int access_type TSRMLS_DC); ZEND_API int zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value TSRMLS_DC); ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, const char *name, size_t name_length TSRMLS_DC); ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, const char *name, size_t name_length, long value TSRMLS_DC); ZEND_API int zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_bool value TSRMLS_DC); ZEND_API int zend_declare_class_constant_double(zend_class_entry *ce, const char *name, size_t name_length, double value TSRMLS_DC); ZEND_API int zend_declare_class_constant_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_length TSRMLS_DC); ZEND_API int zend_declare_class_constant_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value TSRMLS_DC); ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC); ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, char *name, int name_length, zval *value TSRMLS_DC); ZEND_API void zend_update_property_null(zend_class_entry *scope, zval *object, char *name, int name_length TSRMLS_DC); ZEND_API void zend_update_property_bool(zend_class_entry *scope, zval *object, char *name, int name_length, long value TSRMLS_DC); ZEND_API void zend_update_property_long(zend_class_entry *scope, zval *object, char *name, int name_length, long value TSRMLS_DC); ZEND_API void zend_update_property_double(zend_class_entry *scope, zval *object, char *name, int name_length, double value TSRMLS_DC); ZEND_API void zend_update_property_string(zend_class_entry *scope, zval *object, char *name, int name_length, const char *value TSRMLS_DC); ZEND_API void zend_update_property_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, const char *value, int value_length TSRMLS_DC); ZEND_API int zend_update_static_property(zend_class_entry *scope, char *name, int name_length, zval *value TSRMLS_DC); ZEND_API int zend_update_static_property_null(zend_class_entry *scope, char *name, int name_length TSRMLS_DC); ZEND_API int zend_update_static_property_bool(zend_class_entry *scope, char *name, int name_length, long value TSRMLS_DC); ZEND_API int zend_update_static_property_long(zend_class_entry *scope, char *name, int name_length, long value TSRMLS_DC); ZEND_API int zend_update_static_property_double(zend_class_entry *scope, char *name, int name_length, double value TSRMLS_DC); ZEND_API int zend_update_static_property_string(zend_class_entry *scope, char *name, int name_length, const char *value TSRMLS_DC); ZEND_API int zend_update_static_property_stringl(zend_class_entry *scope, char *name, int name_length, const char *value, int value_length TSRMLS_DC); ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, char *name, int name_length, zend_bool silent TSRMLS_DC); ZEND_API zval *zend_read_static_property(zend_class_entry *scope, char *name, int name_length, zend_bool silent TSRMLS_DC); ZEND_API zend_class_entry *zend_get_class_entry(const zval *zobject TSRMLS_DC); ZEND_API int zend_get_object_classname(const zval *object, char **class_name, zend_uint *class_name_len TSRMLS_DC); ZEND_API char *zend_get_type_by_const(int type); #define getThis() (this_ptr) #define WRONG_PARAM_COUNT ZEND_WRONG_PARAM_COUNT() #define WRONG_PARAM_COUNT_WITH_RETVAL(ret) ZEND_WRONG_PARAM_COUNT_WITH_RETVAL(ret) #define ARG_COUNT(dummy) (ht) #define ZEND_NUM_ARGS() (ht) #define ZEND_WRONG_PARAM_COUNT() { zend_wrong_param_count(TSRMLS_C); return; } #define ZEND_WRONG_PARAM_COUNT_WITH_RETVAL(ret) { zend_wrong_param_count(TSRMLS_C); return ret; } #ifndef ZEND_WIN32 #define DLEXPORT #endif #define array_init(arg) _array_init((arg), 0 ZEND_FILE_LINE_CC) #define array_init_size(arg, size) _array_init((arg), (size) ZEND_FILE_LINE_CC) #define object_init(arg) _object_init((arg) ZEND_FILE_LINE_CC TSRMLS_CC) #define object_init_ex(arg, ce) _object_init_ex((arg), (ce) ZEND_FILE_LINE_CC TSRMLS_CC) #define object_and_properties_init(arg, ce, properties) _object_and_properties_init((arg), (ce), (properties) ZEND_FILE_LINE_CC TSRMLS_CC) ZEND_API int _array_init(zval *arg, uint size ZEND_FILE_LINE_DC); ZEND_API int _object_init(zval *arg ZEND_FILE_LINE_DC TSRMLS_DC); ZEND_API int _object_init_ex(zval *arg, zend_class_entry *ce ZEND_FILE_LINE_DC TSRMLS_DC); ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *ce, HashTable *properties ZEND_FILE_LINE_DC TSRMLS_DC); ZEND_API void zend_merge_properties(zval *obj, HashTable *properties, int destroy_ht TSRMLS_DC); /* no longer supported */ ZEND_API int add_assoc_function(zval *arg, const char *key, void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS)); ZEND_API int add_assoc_long_ex(zval *arg, const char *key, uint key_len, long n); ZEND_API int add_assoc_null_ex(zval *arg, const char *key, uint key_len); ZEND_API int add_assoc_bool_ex(zval *arg, const char *key, uint key_len, int b); ZEND_API int add_assoc_resource_ex(zval *arg, const char *key, uint key_len, int r); ZEND_API int add_assoc_double_ex(zval *arg, const char *key, uint key_len, double d); ZEND_API int add_assoc_string_ex(zval *arg, const char *key, uint key_len, char *str, int duplicate); ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, uint key_len, char *str, uint length, int duplicate); ZEND_API int add_assoc_zval_ex(zval *arg, const char *key, uint key_len, zval *value); #define add_assoc_long(__arg, __key, __n) add_assoc_long_ex(__arg, __key, strlen(__key)+1, __n) #define add_assoc_null(__arg, __key) add_assoc_null_ex(__arg, __key, strlen(__key) + 1) #define add_assoc_bool(__arg, __key, __b) add_assoc_bool_ex(__arg, __key, strlen(__key)+1, __b) #define add_assoc_resource(__arg, __key, __r) add_assoc_resource_ex(__arg, __key, strlen(__key)+1, __r) #define add_assoc_double(__arg, __key, __d) add_assoc_double_ex(__arg, __key, strlen(__key)+1, __d) #define add_assoc_string(__arg, __key, __str, __duplicate) add_assoc_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate) #define add_assoc_stringl(__arg, __key, __str, __length, __duplicate) add_assoc_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate) #define add_assoc_zval(__arg, __key, __value) add_assoc_zval_ex(__arg, __key, strlen(__key)+1, __value) /* unset() functions are only suported for legacy modules and null() functions should be used */ #define add_assoc_unset(__arg, __key) add_assoc_null_ex(__arg, __key, strlen(__key) + 1) #define add_index_unset(__arg, __key) add_index_null(__arg, __key) #define add_next_index_unset(__arg) add_next_index_null(__arg) #define add_property_unset(__arg, __key) add_property_null(__arg, __key) ZEND_API int add_index_long(zval *arg, ulong idx, long n); ZEND_API int add_index_null(zval *arg, ulong idx); ZEND_API int add_index_bool(zval *arg, ulong idx, int b); ZEND_API int add_index_resource(zval *arg, ulong idx, int r); ZEND_API int add_index_double(zval *arg, ulong idx, double d); ZEND_API int add_index_string(zval *arg, ulong idx, const char *str, int duplicate); ZEND_API int add_index_stringl(zval *arg, ulong idx, const char *str, uint length, int duplicate); ZEND_API int add_index_zval(zval *arg, ulong index, zval *value); ZEND_API int add_next_index_long(zval *arg, long n); ZEND_API int add_next_index_null(zval *arg); ZEND_API int add_next_index_bool(zval *arg, int b); ZEND_API int add_next_index_resource(zval *arg, int r); ZEND_API int add_next_index_double(zval *arg, double d); ZEND_API int add_next_index_string(zval *arg, const char *str, int duplicate); ZEND_API int add_next_index_stringl(zval *arg, const char *str, uint length, int duplicate); ZEND_API int add_next_index_zval(zval *arg, zval *value); ZEND_API int add_get_assoc_string_ex(zval *arg, const char *key, uint key_len, const char *str, void **dest, int duplicate); ZEND_API int add_get_assoc_stringl_ex(zval *arg, const char *key, uint key_len, const char *str, uint length, void **dest, int duplicate); #define add_get_assoc_string(__arg, __key, __str, __dest, __duplicate) add_get_assoc_string_ex(__arg, __key, strlen(__key)+1, __str, __dest, __duplicate) #define add_get_assoc_stringl(__arg, __key, __str, __length, __dest, __duplicate) add_get_assoc_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __dest, __duplicate) ZEND_API int add_get_index_long(zval *arg, ulong idx, long l, void **dest); ZEND_API int add_get_index_double(zval *arg, ulong idx, double d, void **dest); ZEND_API int add_get_index_string(zval *arg, ulong idx, const char *str, void **dest, int duplicate); ZEND_API int add_get_index_stringl(zval *arg, ulong idx, const char *str, uint length, void **dest, int duplicate); ZEND_API int add_property_long_ex(zval *arg, const char *key, uint key_len, long l TSRMLS_DC); ZEND_API int add_property_null_ex(zval *arg, const char *key, uint key_len TSRMLS_DC); ZEND_API int add_property_bool_ex(zval *arg, const char *key, uint key_len, int b TSRMLS_DC); ZEND_API int add_property_resource_ex(zval *arg, const char *key, uint key_len, long r TSRMLS_DC); ZEND_API int add_property_double_ex(zval *arg, const char *key, uint key_len, double d TSRMLS_DC); ZEND_API int add_property_string_ex(zval *arg, const char *key, uint key_len, char *str, int duplicate TSRMLS_DC); ZEND_API int add_property_stringl_ex(zval *arg, const char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC); ZEND_API int add_property_zval_ex(zval *arg, const char *key, uint key_len, zval *value TSRMLS_DC); #define add_property_long(__arg, __key, __n) add_property_long_ex(__arg, __key, strlen(__key)+1, __n TSRMLS_CC) #define add_property_null(__arg, __key) add_property_null_ex(__arg, __key, strlen(__key) + 1 TSRMLS_CC) #define add_property_bool(__arg, __key, __b) add_property_bool_ex(__arg, __key, strlen(__key)+1, __b TSRMLS_CC) #define add_property_resource(__arg, __key, __r) add_property_resource_ex(__arg, __key, strlen(__key)+1, __r TSRMLS_CC) #define add_property_double(__arg, __key, __d) add_property_double_ex(__arg, __key, strlen(__key)+1, __d TSRMLS_CC) #define add_property_string(__arg, __key, __str, __duplicate) add_property_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate TSRMLS_CC) #define add_property_stringl(__arg, __key, __str, __length, __duplicate) add_property_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate TSRMLS_CC) #define add_property_zval(__arg, __key, __value) add_property_zval_ex(__arg, __key, strlen(__key)+1, __value TSRMLS_CC) ZEND_API int call_user_function(HashTable *function_table, zval **object_pp, zval *function_name, zval *retval_ptr, zend_uint param_count, zval *params[] TSRMLS_DC); ZEND_API int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *function_name, zval **retval_ptr_ptr, zend_uint param_count, zval **params[], int no_separation, HashTable *symbol_table TSRMLS_DC); ZEND_API extern const zend_fcall_info empty_fcall_info; ZEND_API extern const zend_fcall_info_cache empty_fcall_info_cache; /** Build zend_call_info/cache from a zval* * * Caller is responsible to provide a return value, otherwise the we will crash. * fci->retval_ptr_ptr = NULL; * In order to pass parameters the following members need to be set: * fci->param_count = 0; * fci->params = NULL; * The callable_name argument may be NULL. * Set check_flags to IS_CALLABLE_STRICT for every new usage! */ ZEND_API int zend_fcall_info_init(zval *callable, uint check_flags, zend_fcall_info *fci, zend_fcall_info_cache *fcc, char **callable_name, char **error TSRMLS_DC); /** Clear argumens connected with zend_fcall_info *fci * If free_mem is not zero then the params array gets free'd as well */ ZEND_API void zend_fcall_info_args_clear(zend_fcall_info *fci, int free_mem); /** Save current arguments from zend_fcall_info *fci * params array will be set to NULL */ ZEND_API void zend_fcall_info_args_save(zend_fcall_info *fci, int *param_count, zval ****params); /** Free arguments connected with zend_fcall_info *fci andset back saved ones. */ ZEND_API void zend_fcall_info_args_restore(zend_fcall_info *fci, int param_count, zval ***params); /** Set or clear the arguments in the zend_call_info struct taking care of * refcount. If args is NULL and arguments are set then those are cleared. */ ZEND_API int zend_fcall_info_args(zend_fcall_info *fci, zval *args TSRMLS_DC); /** Set arguments in the zend_fcall_info struct taking care of refcount. * If argc is 0 the arguments which are set will be cleared, else pass * a variable amount of zval** arguments. */ ZEND_API int zend_fcall_info_argp(zend_fcall_info *fci TSRMLS_DC, int argc, zval ***argv); /** Set arguments in the zend_fcall_info struct taking care of refcount. * If argc is 0 the arguments which are set will be cleared, else pass * a variable amount of zval** arguments. */ ZEND_API int zend_fcall_info_argv(zend_fcall_info *fci TSRMLS_DC, int argc, va_list *argv); /** Set arguments in the zend_fcall_info struct taking care of refcount. * If argc is 0 the arguments which are set will be cleared, else pass * a variable amount of zval** arguments. */ ZEND_API int zend_fcall_info_argn(zend_fcall_info *fci TSRMLS_DC, int argc, ...); /** Call a function using information created by zend_fcall_info_init()/args(). * If args is given then those replace the arguement info in fci is temporarily. */ ZEND_API int zend_fcall_info_call(zend_fcall_info *fci, zend_fcall_info_cache *fcc, zval **retval, zval *args TSRMLS_DC); ZEND_API int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TSRMLS_DC); ZEND_API int zend_set_hash_symbol(zval *symbol, const char *name, int name_length, zend_bool is_ref, int num_symbol_tables, ...); ZEND_API int zend_delete_global_variable(char *name, int name_len TSRMLS_DC); ZEND_API void zend_reset_all_cv(HashTable *symbol_table TSRMLS_DC); ZEND_API void zend_rebuild_symbol_table(TSRMLS_D); #define add_method(arg, key, method) add_assoc_function((arg), (key), (method)) ZEND_API ZEND_FUNCTION(display_disabled_function); ZEND_API ZEND_FUNCTION(display_disabled_class); END_EXTERN_C() #if ZEND_DEBUG #define CHECK_ZVAL_STRING(z) \ if (Z_STRVAL_P(z)[ Z_STRLEN_P(z) ] != '\0') { zend_error(E_WARNING, "String is not zero-terminated (%s)", Z_STRVAL_P(z)); } #define CHECK_ZVAL_STRING_REL(z) \ if (Z_STRVAL_P(z)[ Z_STRLEN_P(z) ] != '\0') { zend_error(E_WARNING, "String is not zero-terminated (%s) (source: %s:%d)", Z_STRVAL_P(z) ZEND_FILE_LINE_RELAY_CC); } #else #define CHECK_ZVAL_STRING(z) #define CHECK_ZVAL_STRING_REL(z) #endif #define ZVAL_RESOURCE(z, l) { \ Z_TYPE_P(z) = IS_RESOURCE; \ Z_LVAL_P(z) = l; \ } #define ZVAL_BOOL(z, b) { \ Z_TYPE_P(z) = IS_BOOL; \ Z_LVAL_P(z) = ((b) != 0); \ } #define ZVAL_NULL(z) { \ Z_TYPE_P(z) = IS_NULL; \ } #define ZVAL_LONG(z, l) { \ Z_TYPE_P(z) = IS_LONG; \ Z_LVAL_P(z) = l; \ } #define ZVAL_DOUBLE(z, d) { \ Z_TYPE_P(z) = IS_DOUBLE; \ Z_DVAL_P(z) = d; \ } #define ZVAL_STRING(z, s, duplicate) { \ const char *__s=(s); \ Z_STRLEN_P(z) = strlen(__s); \ Z_STRVAL_P(z) = (duplicate?estrndup(__s, Z_STRLEN_P(z)):(char*)__s);\ Z_TYPE_P(z) = IS_STRING; \ } #define ZVAL_STRINGL(z, s, l, duplicate) { \ const char *__s=(s); int __l=l; \ Z_STRLEN_P(z) = __l; \ Z_STRVAL_P(z) = (duplicate?estrndup(__s, __l):(char*)__s);\ Z_TYPE_P(z) = IS_STRING; \ } #define ZVAL_EMPTY_STRING(z) { \ Z_STRLEN_P(z) = 0; \ Z_STRVAL_P(z) = STR_EMPTY_ALLOC();\ Z_TYPE_P(z) = IS_STRING; \ } #define ZVAL_ZVAL(z, zv, copy, dtor) { \ zend_uchar is_ref = Z_ISREF_P(z); \ zend_uint refcount = Z_REFCOUNT_P(z); \ *(z) = *(zv); \ if (copy) { \ zval_copy_ctor(z); \ } \ if (dtor) { \ if (!copy) { \ ZVAL_NULL(zv); \ } \ zval_ptr_dtor(&zv); \ } \ Z_SET_ISREF_TO_P(z, is_ref); \ Z_SET_REFCOUNT_P(z, refcount); \ } #define ZVAL_FALSE(z) ZVAL_BOOL(z, 0) #define ZVAL_TRUE(z) ZVAL_BOOL(z, 1) #define RETVAL_RESOURCE(l) ZVAL_RESOURCE(return_value, l) #define RETVAL_BOOL(b) ZVAL_BOOL(return_value, b) #define RETVAL_NULL() ZVAL_NULL(return_value) #define RETVAL_LONG(l) ZVAL_LONG(return_value, l) #define RETVAL_DOUBLE(d) ZVAL_DOUBLE(return_value, d) #define RETVAL_STRING(s, duplicate) ZVAL_STRING(return_value, s, duplicate) #define RETVAL_STRINGL(s, l, duplicate) ZVAL_STRINGL(return_value, s, l, duplicate) #define RETVAL_EMPTY_STRING() ZVAL_EMPTY_STRING(return_value) #define RETVAL_ZVAL(zv, copy, dtor) ZVAL_ZVAL(return_value, zv, copy, dtor) #define RETVAL_FALSE ZVAL_BOOL(return_value, 0) #define RETVAL_TRUE ZVAL_BOOL(return_value, 1) #define RETURN_RESOURCE(l) { RETVAL_RESOURCE(l); return; } #define RETURN_BOOL(b) { RETVAL_BOOL(b); return; } #define RETURN_NULL() { RETVAL_NULL(); return;} #define RETURN_LONG(l) { RETVAL_LONG(l); return; } #define RETURN_DOUBLE(d) { RETVAL_DOUBLE(d); return; } #define RETURN_STRING(s, duplicate) { RETVAL_STRING(s, duplicate); return; } #define RETURN_STRINGL(s, l, duplicate) { RETVAL_STRINGL(s, l, duplicate); return; } #define RETURN_EMPTY_STRING() { RETVAL_EMPTY_STRING(); return; } #define RETURN_ZVAL(zv, copy, dtor) { RETVAL_ZVAL(zv, copy, dtor); return; } #define RETURN_FALSE { RETVAL_FALSE; return; } #define RETURN_TRUE { RETVAL_TRUE; return; } #define SET_VAR_STRING(n, v) { \ { \ zval *var; \ ALLOC_ZVAL(var); \ ZVAL_STRING(var, v, 0); \ ZEND_SET_GLOBAL_VAR(n, var); \ } \ } #define SET_VAR_STRINGL(n, v, l) { \ { \ zval *var; \ ALLOC_ZVAL(var); \ ZVAL_STRINGL(var, v, l, 0); \ ZEND_SET_GLOBAL_VAR(n, var); \ } \ } #define SET_VAR_LONG(n, v) { \ { \ zval *var; \ ALLOC_ZVAL(var); \ ZVAL_LONG(var, v); \ ZEND_SET_GLOBAL_VAR(n, var); \ } \ } #define SET_VAR_DOUBLE(n, v) { \ { \ zval *var; \ ALLOC_ZVAL(var); \ ZVAL_DOUBLE(var, v); \ ZEND_SET_GLOBAL_VAR(n, var); \ } \ } #define ZEND_SET_SYMBOL(symtable, name, var) \ { \ char *_name = (name); \ \ ZEND_SET_SYMBOL_WITH_LENGTH(symtable, _name, strlen(_name)+1, var, 1, 0); \ } #define ZEND_SET_SYMBOL_WITH_LENGTH(symtable, name, name_length, var, _refcount, _is_ref) \ { \ zval **orig_var; \ \ if (zend_hash_find(symtable, (name), (name_length), (void **) &orig_var)==SUCCESS \ && PZVAL_IS_REF(*orig_var)) { \ Z_SET_REFCOUNT_P(var, Z_REFCOUNT_PP(orig_var)); \ Z_SET_ISREF_P(var); \ \ if (_refcount) { \ Z_SET_REFCOUNT_P(var, Z_REFCOUNT_P(var) + _refcount - 1); \ } \ zval_dtor(*orig_var); \ **orig_var = *(var); \ FREE_ZVAL(var); \ } else { \ Z_SET_ISREF_TO_P(var, _is_ref); \ if (_refcount) { \ Z_SET_REFCOUNT_P(var, _refcount); \ } \ zend_hash_update(symtable, (name), (name_length), &(var), sizeof(zval *), NULL); \ } \ } #define ZEND_SET_GLOBAL_VAR(name, var) \ ZEND_SET_SYMBOL(&EG(symbol_table), name, var) #define ZEND_SET_GLOBAL_VAR_WITH_LENGTH(name, name_length, var, _refcount, _is_ref) \ ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), name, name_length, var, _refcount, _is_ref) #define ZEND_DEFINE_PROPERTY(class_ptr, name, value, mask) \ { \ char *_name = (name); \ int namelen = strlen(_name); \ zend_declare_property(class_ptr, _name, namelen, value, mask TSRMLS_CC); \ } #define HASH_OF(p) (Z_TYPE_P(p)==IS_ARRAY ? Z_ARRVAL_P(p) : ((Z_TYPE_P(p)==IS_OBJECT ? Z_OBJ_HT_P(p)->get_properties((p) TSRMLS_CC) : NULL))) #define ZVAL_IS_NULL(z) (Z_TYPE_P(z)==IS_NULL) /* For compatibility */ #define ZEND_MINIT ZEND_MODULE_STARTUP_N #define ZEND_MSHUTDOWN ZEND_MODULE_SHUTDOWN_N #define ZEND_RINIT ZEND_MODULE_ACTIVATE_N #define ZEND_RSHUTDOWN ZEND_MODULE_DEACTIVATE_N #define ZEND_MINFO ZEND_MODULE_INFO_N #define ZEND_GINIT(module) ((void (*)(void* TSRMLS_DC))(ZEND_MODULE_GLOBALS_CTOR_N(module))) #define ZEND_GSHUTDOWN(module) ((void (*)(void* TSRMLS_DC))(ZEND_MODULE_GLOBALS_DTOR_N(module))) #define ZEND_MINIT_FUNCTION ZEND_MODULE_STARTUP_D #define ZEND_MSHUTDOWN_FUNCTION ZEND_MODULE_SHUTDOWN_D #define ZEND_RINIT_FUNCTION ZEND_MODULE_ACTIVATE_D #define ZEND_RSHUTDOWN_FUNCTION ZEND_MODULE_DEACTIVATE_D #define ZEND_MINFO_FUNCTION ZEND_MODULE_INFO_D #define ZEND_GINIT_FUNCTION ZEND_MODULE_GLOBALS_CTOR_D #define ZEND_GSHUTDOWN_FUNCTION ZEND_MODULE_GLOBALS_DTOR_D END_EXTERN_C() #endif /* ZEND_API_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180cfb000081a40000000000000000000000014dc0f41200000d88000000b600010002ffffffffffffffff0000002b00000000root/usr/local/include/php/Zend/acconfig.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: acconfig.h 306939 2011-01-01 02:19:59Z felipe $ */ #if defined(__GNUC__) && __GNUC__ >= 4 # define ZEND_API __attribute__ ((visibility("default"))) # define ZEND_DLEXPORT __attribute__ ((visibility("default"))) #else # define ZEND_API # define ZEND_DLEXPORT #endif #define ZEND_DLIMPORT @TOP@ #undef uint #undef ulong /* Define if you want to enable memory limit support */ #define MEMORY_LIMIT 0 @BOTTOM@ #ifndef ZEND_ACCONFIG_H_NO_C_PROTOS #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_SELECT_H #include #endif #ifdef HAVE_IEEEFP_H # include #endif #ifdef HAVE_STRING_H # include #else # include #endif #if ZEND_BROKEN_SPRINTF int zend_sprintf(char *buffer, const char *format, ...); #else # define zend_sprintf sprintf #endif #include /* To enable the is_nan, is_infinite and is_finite PHP functions */ #ifdef NETWARE #define HAVE_ISNAN 1 #define HAVE_ISINF 1 #define HAVE_ISFINITE 1 #endif #ifndef zend_isnan #ifdef HAVE_ISNAN #define zend_isnan(a) isnan(a) #elif defined(HAVE_FPCLASS) #define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN)) #else #define zend_isnan(a) 0 #endif #endif #ifdef HAVE_ISINF #define zend_isinf(a) isinf(a) #elif defined(INFINITY) /* Might not work, but is required by ISO C99 */ #define zend_isinf(a) (((a)==INFINITY)?1:0) #elif defined(HAVE_FPCLASS) #define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF)) #else #define zend_isinf(a) 0 #endif #ifdef HAVE_FINITE #define zend_finite(a) finite(a) #elif defined(HAVE_ISFINITE) || defined(isfinite) #define zend_finite(a) isfinite(a) #elif defined(fpclassify) #define zend_finite(a) ((fpclassify((a))!=FP_INFINITE&&fpclassify((a))!=FP_NAN)?1:0) #else #define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1) #endif #endif /* ifndef ZEND_ACCONFIG_H_NO_C_PROTOS */ #ifdef NETWARE #ifdef USE_WINSOCK #/*This detection against winsock is of no use*/ undef HAVE_SOCKLEN_T #/*This detection against winsock is of no use*/ undef HAVE_SYS_SOCKET_H #endif #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d17000081a40000000000000000000000014dc0f412000000fe000000b600010002ffffffffffffffff0000003800000000root/usr/local/include/php/Zend/zend_ini_scanner_defs.h/* Generated by re2c 0.13.5 on Sun Aug 1 12:07:43 2010 */ #line 3 "Zend/zend_ini_scanner_defs.h" enum YYCONDTYPE { yycINITIAL, yycST_OFFSET, yycST_SECTION_VALUE, yycST_VALUE, yycST_SECTION_RAW, yycST_DOUBLE_QUOTES, yycST_VARNAME, yycST_RAW, }; 07070100180d28000081a40000000000000000000000014dc0f412000005e8000000b600010002ffffffffffffffff0000002d00000000root/usr/local/include/php/Zend/zend_qsort.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Sterling Hughes | +----------------------------------------------------------------------+ */ /* $Id: zend_qsort.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_QSORT_H #define ZEND_QSORT_H BEGIN_EXTERN_C() ZEND_API void zend_qsort(void *base, size_t nmemb, size_t siz, compare_func_t compare TSRMLS_DC); END_EXTERN_C() #endif /* ZEND_QSORT_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d20000081a40000000000000000000000014dc0f412000013e6000000b600010002ffffffffffffffff0000002f00000000root/usr/local/include/php/Zend/zend_modules.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_modules.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef MODULES_H #define MODULES_H #include "zend.h" #include "zend_compile.h" #include "zend_build.h" #define INIT_FUNC_ARGS int type, int module_number TSRMLS_DC #define INIT_FUNC_ARGS_PASSTHRU type, module_number TSRMLS_CC #define SHUTDOWN_FUNC_ARGS int type, int module_number TSRMLS_DC #define SHUTDOWN_FUNC_ARGS_PASSTHRU type, module_number TSRMLS_CC #define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module TSRMLS_DC #define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module TSRMLS_CC #define ZEND_MODULE_API_NO 20090626 #ifdef ZTS #define USING_ZTS 1 #else #define USING_ZTS 0 #endif #define STANDARD_MODULE_HEADER_EX sizeof(zend_module_entry), ZEND_MODULE_API_NO, ZEND_DEBUG, USING_ZTS #define STANDARD_MODULE_HEADER \ STANDARD_MODULE_HEADER_EX, NULL, NULL #define ZE2_STANDARD_MODULE_HEADER \ STANDARD_MODULE_HEADER_EX, ini_entries, NULL #define ZEND_MODULE_BUILD_ID "API" ZEND_TOSTR(ZEND_MODULE_API_NO) ZEND_BUILD_TS ZEND_BUILD_DEBUG ZEND_BUILD_SYSTEM ZEND_BUILD_EXTRA #define STANDARD_MODULE_PROPERTIES_EX 0, 0, NULL, 0, ZEND_MODULE_BUILD_ID #define NO_MODULE_GLOBALS 0, NULL, NULL, NULL #ifdef ZTS # define ZEND_MODULE_GLOBALS(module_name) sizeof(zend_##module_name##_globals), &module_name##_globals_id #else # define ZEND_MODULE_GLOBALS(module_name) sizeof(zend_##module_name##_globals), &module_name##_globals #endif #define STANDARD_MODULE_PROPERTIES \ NO_MODULE_GLOBALS, NULL, STANDARD_MODULE_PROPERTIES_EX #define NO_VERSION_YET NULL #define MODULE_PERSISTENT 1 #define MODULE_TEMPORARY 2 struct _zend_ini_entry; typedef struct _zend_module_entry zend_module_entry; typedef struct _zend_module_dep zend_module_dep; struct _zend_module_entry { unsigned short size; unsigned int zend_api; unsigned char zend_debug; unsigned char zts; const struct _zend_ini_entry *ini_entry; const struct _zend_module_dep *deps; const char *name; const struct _zend_function_entry *functions; int (*module_startup_func)(INIT_FUNC_ARGS); int (*module_shutdown_func)(SHUTDOWN_FUNC_ARGS); int (*request_startup_func)(INIT_FUNC_ARGS); int (*request_shutdown_func)(SHUTDOWN_FUNC_ARGS); void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS); const char *version; size_t globals_size; #ifdef ZTS ts_rsrc_id* globals_id_ptr; #else void* globals_ptr; #endif void (*globals_ctor)(void *global TSRMLS_DC); void (*globals_dtor)(void *global TSRMLS_DC); int (*post_deactivate_func)(void); int module_started; unsigned char type; void *handle; int module_number; char *build_id; }; #define MODULE_DEP_REQUIRED 1 #define MODULE_DEP_CONFLICTS 2 #define MODULE_DEP_OPTIONAL 3 #define ZEND_MOD_REQUIRED_EX(name, rel, ver) { name, rel, ver, MODULE_DEP_REQUIRED }, #define ZEND_MOD_CONFLICTS_EX(name, rel, ver) { name, rel, ver, MODULE_DEP_CONFLICTS }, #define ZEND_MOD_OPTIONAL_EX(name, rel, ver) { name, rel, ver, MODULE_DEP_OPTIONAL }, #define ZEND_MOD_REQUIRED(name) ZEND_MOD_REQUIRED_EX(name, NULL, NULL) #define ZEND_MOD_CONFLICTS(name) ZEND_MOD_CONFLICTS_EX(name, NULL, NULL) #define ZEND_MOD_OPTIONAL(name) ZEND_MOD_OPTIONAL_EX(name, NULL, NULL) struct _zend_module_dep { const char *name; /* module name */ const char *rel; /* version relationship: NULL (exists), lt|le|eq|ge|gt (to given version) */ const char *version; /* version */ unsigned char type; /* dependency type */ }; extern ZEND_API HashTable module_registry; void module_destructor(zend_module_entry *module); int module_registry_cleanup(zend_module_entry *module TSRMLS_DC); int module_registry_request_startup(zend_module_entry *module TSRMLS_DC); int module_registry_unload_temp(const zend_module_entry *module TSRMLS_DC); #define ZEND_MODULE_DTOR (void (*)(void *)) module_destructor #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d33000081a40000000000000000000000014dc0f41200001eea000000b600010002ffffffffffffffff0000003200000000root/usr/local/include/php/Zend/zend_vm_opcodes.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2010 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | | Dmitry Stogov | +----------------------------------------------------------------------+ */ #define ZEND_NOP 0 #define ZEND_ADD 1 #define ZEND_SUB 2 #define ZEND_MUL 3 #define ZEND_DIV 4 #define ZEND_MOD 5 #define ZEND_SL 6 #define ZEND_SR 7 #define ZEND_CONCAT 8 #define ZEND_BW_OR 9 #define ZEND_BW_AND 10 #define ZEND_BW_XOR 11 #define ZEND_BW_NOT 12 #define ZEND_BOOL_NOT 13 #define ZEND_BOOL_XOR 14 #define ZEND_IS_IDENTICAL 15 #define ZEND_IS_NOT_IDENTICAL 16 #define ZEND_IS_EQUAL 17 #define ZEND_IS_NOT_EQUAL 18 #define ZEND_IS_SMALLER 19 #define ZEND_IS_SMALLER_OR_EQUAL 20 #define ZEND_CAST 21 #define ZEND_QM_ASSIGN 22 #define ZEND_ASSIGN_ADD 23 #define ZEND_ASSIGN_SUB 24 #define ZEND_ASSIGN_MUL 25 #define ZEND_ASSIGN_DIV 26 #define ZEND_ASSIGN_MOD 27 #define ZEND_ASSIGN_SL 28 #define ZEND_ASSIGN_SR 29 #define ZEND_ASSIGN_CONCAT 30 #define ZEND_ASSIGN_BW_OR 31 #define ZEND_ASSIGN_BW_AND 32 #define ZEND_ASSIGN_BW_XOR 33 #define ZEND_PRE_INC 34 #define ZEND_PRE_DEC 35 #define ZEND_POST_INC 36 #define ZEND_POST_DEC 37 #define ZEND_ASSIGN 38 #define ZEND_ASSIGN_REF 39 #define ZEND_ECHO 40 #define ZEND_PRINT 41 #define ZEND_JMP 42 #define ZEND_JMPZ 43 #define ZEND_JMPNZ 44 #define ZEND_JMPZNZ 45 #define ZEND_JMPZ_EX 46 #define ZEND_JMPNZ_EX 47 #define ZEND_CASE 48 #define ZEND_SWITCH_FREE 49 #define ZEND_BRK 50 #define ZEND_CONT 51 #define ZEND_BOOL 52 #define ZEND_INIT_STRING 53 #define ZEND_ADD_CHAR 54 #define ZEND_ADD_STRING 55 #define ZEND_ADD_VAR 56 #define ZEND_BEGIN_SILENCE 57 #define ZEND_END_SILENCE 58 #define ZEND_INIT_FCALL_BY_NAME 59 #define ZEND_DO_FCALL 60 #define ZEND_DO_FCALL_BY_NAME 61 #define ZEND_RETURN 62 #define ZEND_RECV 63 #define ZEND_RECV_INIT 64 #define ZEND_SEND_VAL 65 #define ZEND_SEND_VAR 66 #define ZEND_SEND_REF 67 #define ZEND_NEW 68 #define ZEND_INIT_NS_FCALL_BY_NAME 69 #define ZEND_FREE 70 #define ZEND_INIT_ARRAY 71 #define ZEND_ADD_ARRAY_ELEMENT 72 #define ZEND_INCLUDE_OR_EVAL 73 #define ZEND_UNSET_VAR 74 #define ZEND_UNSET_DIM 75 #define ZEND_UNSET_OBJ 76 #define ZEND_FE_RESET 77 #define ZEND_FE_FETCH 78 #define ZEND_EXIT 79 #define ZEND_FETCH_R 80 #define ZEND_FETCH_DIM_R 81 #define ZEND_FETCH_OBJ_R 82 #define ZEND_FETCH_W 83 #define ZEND_FETCH_DIM_W 84 #define ZEND_FETCH_OBJ_W 85 #define ZEND_FETCH_RW 86 #define ZEND_FETCH_DIM_RW 87 #define ZEND_FETCH_OBJ_RW 88 #define ZEND_FETCH_IS 89 #define ZEND_FETCH_DIM_IS 90 #define ZEND_FETCH_OBJ_IS 91 #define ZEND_FETCH_FUNC_ARG 92 #define ZEND_FETCH_DIM_FUNC_ARG 93 #define ZEND_FETCH_OBJ_FUNC_ARG 94 #define ZEND_FETCH_UNSET 95 #define ZEND_FETCH_DIM_UNSET 96 #define ZEND_FETCH_OBJ_UNSET 97 #define ZEND_FETCH_DIM_TMP_VAR 98 #define ZEND_FETCH_CONSTANT 99 #define ZEND_GOTO 100 #define ZEND_EXT_STMT 101 #define ZEND_EXT_FCALL_BEGIN 102 #define ZEND_EXT_FCALL_END 103 #define ZEND_EXT_NOP 104 #define ZEND_TICKS 105 #define ZEND_SEND_VAR_NO_REF 106 #define ZEND_CATCH 107 #define ZEND_THROW 108 #define ZEND_FETCH_CLASS 109 #define ZEND_CLONE 110 #define ZEND_INIT_METHOD_CALL 112 #define ZEND_INIT_STATIC_METHOD_CALL 113 #define ZEND_ISSET_ISEMPTY_VAR 114 #define ZEND_ISSET_ISEMPTY_DIM_OBJ 115 #define ZEND_PRE_INC_OBJ 132 #define ZEND_PRE_DEC_OBJ 133 #define ZEND_POST_INC_OBJ 134 #define ZEND_POST_DEC_OBJ 135 #define ZEND_ASSIGN_OBJ 136 #define ZEND_INSTANCEOF 138 #define ZEND_DECLARE_CLASS 139 #define ZEND_DECLARE_INHERITED_CLASS 140 #define ZEND_DECLARE_FUNCTION 141 #define ZEND_RAISE_ABSTRACT_ERROR 142 #define ZEND_DECLARE_CONST 143 #define ZEND_ADD_INTERFACE 144 #define ZEND_DECLARE_INHERITED_CLASS_DELAYED 145 #define ZEND_VERIFY_ABSTRACT_CLASS 146 #define ZEND_ASSIGN_DIM 147 #define ZEND_ISSET_ISEMPTY_PROP_OBJ 148 #define ZEND_HANDLE_EXCEPTION 149 #define ZEND_USER_OPCODE 150 #define ZEND_JMP_SET 152 #define ZEND_DECLARE_LAMBDA_FUNCTION 153 07070100180d02000081a40000000000000000000000014dc0f41200007415000000b600010002ffffffffffffffff0000002f00000000root/usr/local/include/php/Zend/zend_compile.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_compile.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_COMPILE_H #define ZEND_COMPILE_H #include "zend.h" #ifdef HAVE_STDARG_H # include #endif #include "zend_llist.h" #define DEBUG_ZEND 0 #define FREE_PNODE(znode) zval_dtor(&znode->u.constant); #define SET_UNUSED(op) (op).op_type = IS_UNUSED #define INC_BPC(op_array) if (op_array->fn_flags & ZEND_ACC_INTERACTIVE) { ((op_array)->backpatch_count++); } #define DEC_BPC(op_array) if (op_array->fn_flags & ZEND_ACC_INTERACTIVE) { ((op_array)->backpatch_count--); } #define HANDLE_INTERACTIVE() if (CG(active_op_array)->fn_flags & ZEND_ACC_INTERACTIVE) { execute_new_code(TSRMLS_C); } #define RESET_DOC_COMMENT() \ { \ if (CG(doc_comment)) { \ efree(CG(doc_comment)); \ CG(doc_comment) = NULL; \ } \ CG(doc_comment_len) = 0; \ } typedef struct _zend_op_array zend_op_array; typedef struct _zend_op zend_op; typedef struct _znode { int op_type; union { zval constant; zend_uint var; zend_uint opline_num; /* Needs to be signed */ zend_op_array *op_array; zend_op *jmp_addr; struct { zend_uint var; /* dummy */ zend_uint type; } EA; } u; } znode; typedef struct _zend_execute_data zend_execute_data; #define ZEND_OPCODE_HANDLER_ARGS zend_execute_data *execute_data TSRMLS_DC #define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU execute_data TSRMLS_CC typedef int (*user_opcode_handler_t) (ZEND_OPCODE_HANDLER_ARGS); typedef int (ZEND_FASTCALL *opcode_handler_t) (ZEND_OPCODE_HANDLER_ARGS); extern ZEND_API opcode_handler_t *zend_opcode_handlers; struct _zend_op { opcode_handler_t handler; znode result; znode op1; znode op2; ulong extended_value; uint lineno; zend_uchar opcode; }; typedef struct _zend_brk_cont_element { int start; int cont; int brk; int parent; } zend_brk_cont_element; typedef struct _zend_label { int brk_cont; zend_uint opline_num; } zend_label; typedef struct _zend_try_catch_element { zend_uint try_op; zend_uint catch_op; /* ketchup! */ } zend_try_catch_element; /* method flags (types) */ #define ZEND_ACC_STATIC 0x01 #define ZEND_ACC_ABSTRACT 0x02 #define ZEND_ACC_FINAL 0x04 #define ZEND_ACC_IMPLEMENTED_ABSTRACT 0x08 /* class flags (types) */ /* ZEND_ACC_IMPLICIT_ABSTRACT_CLASS is used for abstract classes (since it is set by any abstract method even interfaces MAY have it set, too). */ /* ZEND_ACC_EXPLICIT_ABSTRACT_CLASS denotes that a class was explicitly defined as abstract by using the keyword. */ #define ZEND_ACC_IMPLICIT_ABSTRACT_CLASS 0x10 #define ZEND_ACC_EXPLICIT_ABSTRACT_CLASS 0x20 #define ZEND_ACC_FINAL_CLASS 0x40 #define ZEND_ACC_INTERFACE 0x80 /* op_array flags */ #define ZEND_ACC_INTERACTIVE 0x10 /* method flags (visibility) */ /* The order of those must be kept - public < protected < private */ #define ZEND_ACC_PUBLIC 0x100 #define ZEND_ACC_PROTECTED 0x200 #define ZEND_ACC_PRIVATE 0x400 #define ZEND_ACC_PPP_MASK (ZEND_ACC_PUBLIC | ZEND_ACC_PROTECTED | ZEND_ACC_PRIVATE) #define ZEND_ACC_CHANGED 0x800 #define ZEND_ACC_IMPLICIT_PUBLIC 0x1000 /* method flags (special method detection) */ #define ZEND_ACC_CTOR 0x2000 #define ZEND_ACC_DTOR 0x4000 #define ZEND_ACC_CLONE 0x8000 /* method flag (bc only), any method that has this flag can be used statically and non statically. */ #define ZEND_ACC_ALLOW_STATIC 0x10000 /* shadow of parent's private method/property */ #define ZEND_ACC_SHADOW 0x20000 /* deprecation flag */ #define ZEND_ACC_DEPRECATED 0x40000 /* class implement interface(s) flag */ #define ZEND_ACC_IMPLEMENT_INTERFACES 0x80000 #define ZEND_ACC_CLOSURE 0x100000 /* function flag for internal user call handlers __call, __callstatic */ #define ZEND_ACC_CALL_VIA_HANDLER 0x200000 char *zend_visibility_string(zend_uint fn_flags); typedef struct _zend_property_info { zend_uint flags; char *name; int name_length; ulong h; char *doc_comment; int doc_comment_len; zend_class_entry *ce; } zend_property_info; typedef struct _zend_arg_info { const char *name; zend_uint name_len; const char *class_name; zend_uint class_name_len; zend_bool array_type_hint; zend_bool allow_null; zend_bool pass_by_reference; zend_bool return_reference; int required_num_args; } zend_arg_info; typedef struct _zend_compiled_variable { char *name; int name_len; ulong hash_value; } zend_compiled_variable; struct _zend_op_array { /* Common elements */ zend_uchar type; char *function_name; zend_class_entry *scope; zend_uint fn_flags; union _zend_function *prototype; zend_uint num_args; zend_uint required_num_args; zend_arg_info *arg_info; zend_bool pass_rest_by_reference; unsigned char return_reference; /* END of common elements */ zend_bool done_pass_two; zend_uint *refcount; zend_op *opcodes; zend_uint last, size; zend_compiled_variable *vars; int last_var, size_var; zend_uint T; zend_brk_cont_element *brk_cont_array; int last_brk_cont; int current_brk_cont; zend_try_catch_element *try_catch_array; int last_try_catch; /* static variables support */ HashTable *static_variables; zend_op *start_op; int backpatch_count; zend_uint this_var; char *filename; zend_uint line_start; zend_uint line_end; char *doc_comment; zend_uint doc_comment_len; zend_uint early_binding; /* the linked list of delayed declarations */ void *reserved[ZEND_MAX_RESERVED_RESOURCES]; }; #define ZEND_RETURN_VALUE 0 #define ZEND_RETURN_REFERENCE 1 typedef struct _zend_internal_function { /* Common elements */ zend_uchar type; char * function_name; zend_class_entry *scope; zend_uint fn_flags; union _zend_function *prototype; zend_uint num_args; zend_uint required_num_args; zend_arg_info *arg_info; zend_bool pass_rest_by_reference; unsigned char return_reference; /* END of common elements */ void (*handler)(INTERNAL_FUNCTION_PARAMETERS); struct _zend_module_entry *module; } zend_internal_function; #define ZEND_FN_SCOPE_NAME(function) ((function) && (function)->common.scope ? (function)->common.scope->name : "") typedef union _zend_function { zend_uchar type; /* MUST be the first element of this struct! */ struct { zend_uchar type; /* never used */ char *function_name; zend_class_entry *scope; zend_uint fn_flags; union _zend_function *prototype; zend_uint num_args; zend_uint required_num_args; zend_arg_info *arg_info; zend_bool pass_rest_by_reference; unsigned char return_reference; } common; zend_op_array op_array; zend_internal_function internal_function; } zend_function; typedef struct _zend_function_state { zend_function *function; void **arguments; } zend_function_state; typedef struct _zend_switch_entry { znode cond; int default_case; int control_var; } zend_switch_entry; typedef struct _list_llist_element { znode var; zend_llist dimensions; znode value; } list_llist_element; union _temp_variable; struct _zend_execute_data { struct _zend_op *opline; zend_function_state function_state; zend_function *fbc; /* Function Being Called */ zend_class_entry *called_scope; zend_op_array *op_array; zval *object; union _temp_variable *Ts; zval ***CVs; HashTable *symbol_table; struct _zend_execute_data *prev_execute_data; zval *old_error_reporting; zend_bool nested; zval **original_return_value; zend_class_entry *current_scope; zend_class_entry *current_called_scope; zval *current_this; zval *current_object; struct _zend_op *call_opline; }; #define EX(element) execute_data.element #define IS_CONST (1<<0) #define IS_TMP_VAR (1<<1) #define IS_VAR (1<<2) #define IS_UNUSED (1<<3) /* Unused variable */ #define IS_CV (1<<4) /* Compiled variable */ #define EXT_TYPE_UNUSED (1<<0) #define EXT_TYPE_FREE_ON_RETURN (2<<0) #include "zend_globals.h" BEGIN_EXTERN_C() void init_compiler(TSRMLS_D); void shutdown_compiler(TSRMLS_D); void zend_init_compiler_data_structures(TSRMLS_D); extern ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type TSRMLS_DC); extern ZEND_API zend_op_array *(*zend_compile_string)(zval *source_string, char *filename TSRMLS_DC); ZEND_API int lex_scan(zval *zendlval TSRMLS_DC); void startup_scanner(TSRMLS_D); void shutdown_scanner(TSRMLS_D); ZEND_API char *zend_set_compiled_filename(const char *new_compiled_filename TSRMLS_DC); ZEND_API void zend_restore_compiled_filename(char *original_compiled_filename TSRMLS_DC); ZEND_API char *zend_get_compiled_filename(TSRMLS_D); ZEND_API int zend_get_compiled_lineno(TSRMLS_D); ZEND_API size_t zend_get_scanned_file_offset(TSRMLS_D); void zend_resolve_non_class_name(znode *element_name, zend_bool check_namespace TSRMLS_DC); void zend_resolve_class_name(znode *class_name, ulong *fetch_type, int check_ns_name TSRMLS_DC); ZEND_API char* zend_get_compiled_variable_name(const zend_op_array *op_array, zend_uint var, int* name_len); #ifdef ZTS const char *zend_get_zendtext(TSRMLS_D); int zend_get_zendleng(TSRMLS_D); #endif /* parser-driven code generators */ void zend_do_binary_op(zend_uchar op, znode *result, const znode *op1, const znode *op2 TSRMLS_DC); void zend_do_unary_op(zend_uchar op, znode *result, const znode *op1 TSRMLS_DC); void zend_do_binary_assign_op(zend_uchar op, znode *result, const znode *op1, const znode *op2 TSRMLS_DC); void zend_do_assign(znode *result, znode *variable, const znode *value TSRMLS_DC); void zend_do_assign_ref(znode *result, const znode *lvar, const znode *rvar TSRMLS_DC); void fetch_simple_variable(znode *result, znode *varname, int bp TSRMLS_DC); void fetch_simple_variable_ex(znode *result, znode *varname, int bp, zend_uchar op TSRMLS_DC); void zend_do_indirect_references(znode *result, const znode *num_references, znode *variable TSRMLS_DC); void zend_do_fetch_static_variable(znode *varname, const znode *static_assignment, int fetch_type TSRMLS_DC); void zend_do_fetch_global_variable(znode *varname, const znode *static_assignment, int fetch_type TSRMLS_DC); void fetch_array_begin(znode *result, znode *varname, znode *first_dim TSRMLS_DC); void fetch_array_dim(znode *result, const znode *parent, const znode *dim TSRMLS_DC); void fetch_string_offset(znode *result, const znode *parent, const znode *offset TSRMLS_DC); void zend_do_fetch_static_member(znode *result, znode *class_znode TSRMLS_DC); void zend_do_print(znode *result, const znode *arg TSRMLS_DC); void zend_do_echo(const znode *arg TSRMLS_DC); typedef int (*unary_op_type)(zval *, zval * TSRMLS_DC); typedef int (*binary_op_type)(zval *, zval *, zval * TSRMLS_DC); ZEND_API unary_op_type get_unary_op(int opcode); ZEND_API binary_op_type get_binary_op(int opcode); void zend_do_while_cond(const znode *expr, znode *close_bracket_token TSRMLS_DC); void zend_do_while_end(const znode *while_token, const znode *close_bracket_token TSRMLS_DC); void zend_do_do_while_begin(TSRMLS_D); void zend_do_do_while_end(const znode *do_token, const znode *expr_open_bracket, const znode *expr TSRMLS_DC); void zend_do_if_cond(const znode *cond, znode *closing_bracket_token TSRMLS_DC); void zend_do_if_after_statement(const znode *closing_bracket_token, unsigned char initialize TSRMLS_DC); void zend_do_if_end(TSRMLS_D); void zend_do_for_cond(const znode *expr, znode *second_semicolon_token TSRMLS_DC); void zend_do_for_before_statement(const znode *cond_start, const znode *second_semicolon_token TSRMLS_DC); void zend_do_for_end(const znode *second_semicolon_token TSRMLS_DC); void zend_do_pre_incdec(znode *result, const znode *op1, zend_uchar op TSRMLS_DC); void zend_do_post_incdec(znode *result, const znode *op1, zend_uchar op TSRMLS_DC); void zend_do_begin_variable_parse(TSRMLS_D); void zend_do_end_variable_parse(znode *variable, int type, int arg_offset TSRMLS_DC); void zend_check_writable_variable(const znode *variable); void zend_do_free(znode *op1 TSRMLS_DC); void zend_do_add_string(znode *result, const znode *op1, znode *op2 TSRMLS_DC); void zend_do_add_variable(znode *result, const znode *op1, const znode *op2 TSRMLS_DC); int zend_do_verify_access_types(const znode *current_access_type, const znode *new_modifier); void zend_do_begin_function_declaration(znode *function_token, znode *function_name, int is_method, int return_reference, znode *fn_flags_znode TSRMLS_DC); void zend_do_end_function_declaration(const znode *function_token TSRMLS_DC); void zend_do_receive_arg(zend_uchar op, const znode *var, const znode *offset, const znode *initialization, znode *class_type, const znode *varname, zend_bool pass_by_reference TSRMLS_DC); int zend_do_begin_function_call(znode *function_name, zend_bool check_namespace TSRMLS_DC); void zend_do_begin_method_call(znode *left_bracket TSRMLS_DC); void zend_do_clone(znode *result, const znode *expr TSRMLS_DC); void zend_do_begin_dynamic_function_call(znode *function_name, int prefix_len TSRMLS_DC); void zend_do_fetch_class(znode *result, znode *class_name TSRMLS_DC); void zend_do_build_full_name(znode *result, znode *prefix, znode *name, int is_class_member TSRMLS_DC); int zend_do_begin_class_member_function_call(znode *class_name, znode *method_name TSRMLS_DC); void zend_do_end_function_call(znode *function_name, znode *result, const znode *argument_list, int is_method, int is_dynamic_fcall TSRMLS_DC); void zend_do_return(znode *expr, int do_end_vparse TSRMLS_DC); void zend_do_handle_exception(TSRMLS_D); void zend_do_begin_lambda_function_declaration(znode *result, znode *function_token, int return_reference TSRMLS_DC); void zend_do_fetch_lexical_variable(znode *varname, zend_bool is_ref TSRMLS_DC); void zend_do_try(znode *try_token TSRMLS_DC); void zend_do_begin_catch(znode *try_token, znode *catch_class, const znode *catch_var, znode *first_catch TSRMLS_DC); void zend_do_end_catch(const znode *try_token TSRMLS_DC); void zend_do_throw(const znode *expr TSRMLS_DC); ZEND_API int do_bind_function(zend_op *opline, HashTable *function_table, zend_bool compile_time); ZEND_API zend_class_entry *do_bind_class(const zend_op *opline, HashTable *class_table, zend_bool compile_time TSRMLS_DC); ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op *opline, HashTable *class_table, zend_class_entry *parent_ce, zend_bool compile_time TSRMLS_DC); ZEND_API void zend_do_inherit_interfaces(zend_class_entry *ce, const zend_class_entry *iface TSRMLS_DC); ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry *iface TSRMLS_DC); void zend_do_implements_interface(znode *interface_znode TSRMLS_DC); ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce TSRMLS_DC); void zend_do_early_binding(TSRMLS_D); ZEND_API void zend_do_delayed_early_binding(const zend_op_array *op_array TSRMLS_DC); void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC); void zend_do_boolean_or_begin(znode *expr1, znode *op_token TSRMLS_DC); void zend_do_boolean_or_end(znode *result, const znode *expr1, const znode *expr2, znode *op_token TSRMLS_DC); void zend_do_boolean_and_begin(znode *expr1, znode *op_token TSRMLS_DC); void zend_do_boolean_and_end(znode *result, const znode *expr1, const znode *expr2, const znode *op_token TSRMLS_DC); void zend_do_brk_cont(zend_uchar op, const znode *expr TSRMLS_DC); void zend_do_switch_cond(const znode *cond TSRMLS_DC); void zend_do_switch_end(const znode *case_list TSRMLS_DC); void zend_do_case_before_statement(const znode *case_list, znode *case_token, const znode *case_expr TSRMLS_DC); void zend_do_case_after_statement(znode *result, const znode *case_token TSRMLS_DC); void zend_do_default_before_statement(const znode *case_list, znode *default_token TSRMLS_DC); void zend_do_begin_class_declaration(const znode *class_token, znode *class_name, const znode *parent_class_name TSRMLS_DC); void zend_do_end_class_declaration(const znode *class_token, const znode *parent_token TSRMLS_DC); void zend_do_declare_property(const znode *var_name, const znode *value, zend_uint access_type TSRMLS_DC); void zend_do_declare_implicit_property(TSRMLS_D); void zend_do_declare_class_constant(znode *var_name, const znode *value TSRMLS_DC); void zend_do_fetch_property(znode *result, znode *object, const znode *property TSRMLS_DC); void zend_do_halt_compiler_register(TSRMLS_D); void zend_do_push_object(const znode *object TSRMLS_DC); void zend_do_pop_object(znode *object TSRMLS_DC); void zend_do_begin_new_object(znode *new_token, znode *class_type TSRMLS_DC); void zend_do_end_new_object(znode *result, const znode *new_token, const znode *argument_list TSRMLS_DC); void zend_do_fetch_constant(znode *result, znode *constant_container, znode *constant_name, int mode, zend_bool check_namespace TSRMLS_DC); void zend_do_shell_exec(znode *result, const znode *cmd TSRMLS_DC); void zend_do_init_array(znode *result, const znode *expr, const znode *offset, zend_bool is_ref TSRMLS_DC); void zend_do_add_array_element(znode *result, const znode *expr, const znode *offset, zend_bool is_ref TSRMLS_DC); void zend_do_add_static_array_element(znode *result, znode *offset, const znode *expr); void zend_do_list_init(TSRMLS_D); void zend_do_list_end(znode *result, znode *expr TSRMLS_DC); void zend_do_add_list_element(const znode *element TSRMLS_DC); void zend_do_new_list_begin(TSRMLS_D); void zend_do_new_list_end(TSRMLS_D); void zend_do_cast(znode *result, const znode *expr, int type TSRMLS_DC); void zend_do_include_or_eval(int type, znode *result, const znode *op1 TSRMLS_DC); void zend_do_unset(const znode *variable TSRMLS_DC); void zend_do_isset_or_isempty(int type, znode *result, znode *variable TSRMLS_DC); void zend_do_instanceof(znode *result, const znode *expr, const znode *class_znode, int type TSRMLS_DC); void zend_do_foreach_begin(znode *foreach_token, znode *open_brackets_token, znode *array, znode *as_token, int variable TSRMLS_DC); void zend_do_foreach_cont(znode *foreach_token, const znode *open_brackets_token, const znode *as_token, znode *value, znode *key TSRMLS_DC); void zend_do_foreach_end(const znode *foreach_token, const znode *as_token TSRMLS_DC); void zend_do_declare_begin(TSRMLS_D); void zend_do_declare_stmt(znode *var, znode *val TSRMLS_DC); void zend_do_declare_end(const znode *declare_token TSRMLS_DC); void zend_do_exit(znode *result, const znode *message TSRMLS_DC); void zend_do_begin_silence(znode *strudel_token TSRMLS_DC); void zend_do_end_silence(const znode *strudel_token TSRMLS_DC); void zend_do_jmp_set(const znode *value, znode *jmp_token, znode *colon_token TSRMLS_DC); void zend_do_jmp_set_else(znode *result, const znode *false_value, const znode *jmp_token, const znode *colon_token TSRMLS_DC); void zend_do_begin_qm_op(const znode *cond, znode *qm_token TSRMLS_DC); void zend_do_qm_true(const znode *true_value, znode *qm_token, znode *colon_token TSRMLS_DC); void zend_do_qm_false(znode *result, const znode *false_value, const znode *qm_token, const znode *colon_token TSRMLS_DC); void zend_do_extended_info(TSRMLS_D); void zend_do_extended_fcall_begin(TSRMLS_D); void zend_do_extended_fcall_end(TSRMLS_D); void zend_do_ticks(TSRMLS_D); void zend_do_abstract_method(const znode *function_name, znode *modifiers, const znode *body TSRMLS_DC); void zend_do_declare_constant(znode *name, znode *value TSRMLS_DC); void zend_do_build_namespace_name(znode *result, znode *prefix, znode *name TSRMLS_DC); void zend_do_begin_namespace(const znode *name, zend_bool with_brackets TSRMLS_DC); void zend_do_end_namespace(TSRMLS_D); void zend_verify_namespace(TSRMLS_D); void zend_do_use(znode *name, znode *new_name, int is_global TSRMLS_DC); void zend_do_end_compilation(TSRMLS_D); void zend_do_label(znode *label TSRMLS_DC); void zend_do_goto(const znode *label TSRMLS_DC); void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2 TSRMLS_DC); void zend_release_labels(TSRMLS_D); ZEND_API void function_add_ref(zend_function *function); #define INITIAL_OP_ARRAY_SIZE 64 /* helper functions in zend_language_scanner.l */ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSRMLS_DC); ZEND_API zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC); ZEND_API zend_op_array *compile_filename(int type, zval *filename TSRMLS_DC); ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_count, ...); ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC); ZEND_API void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size TSRMLS_DC); ZEND_API void destroy_op_array(zend_op_array *op_array TSRMLS_DC); ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle TSRMLS_DC); ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC); ZEND_API int zend_cleanup_function_data(zend_function *function TSRMLS_DC); ZEND_API int zend_cleanup_function_data_full(zend_function *function TSRMLS_DC); ZEND_API void destroy_zend_function(zend_function *function TSRMLS_DC); ZEND_API void zend_function_dtor(zend_function *function); ZEND_API void destroy_zend_class(zend_class_entry **pce); void zend_class_add_ref(zend_class_entry **ce); ZEND_API void zend_mangle_property_name(char **dest, int *dest_length, const char *src1, int src1_length, const char *src2, int src2_length, int internal); ZEND_API int zend_unmangle_property_name(char *mangled_property, int mangled_property_len, char **prop_name, char **class_name); #define ZEND_FUNCTION_DTOR (void (*)(void *)) zend_function_dtor #define ZEND_CLASS_DTOR (void (*)(void *)) destroy_zend_class zend_op *get_next_op(zend_op_array *op_array TSRMLS_DC); void init_op(zend_op *op TSRMLS_DC); int get_next_op_number(zend_op_array *op_array); int print_class(zend_class_entry *class_entry TSRMLS_DC); void print_op_array(zend_op_array *op_array, int optimizations); ZEND_API int pass_two(zend_op_array *op_array TSRMLS_DC); zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array); void zend_do_first_catch(znode *open_parentheses TSRMLS_DC); void zend_initialize_try_catch_element(const znode *try_token TSRMLS_DC); void zend_do_mark_last_catch(const znode *first_catch, const znode *last_additional_catch TSRMLS_DC); ZEND_API zend_bool zend_is_compiling(TSRMLS_D); ZEND_API char *zend_make_compiled_string_description(const char *name TSRMLS_DC); ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify_handlers TSRMLS_DC); int zend_get_class_fetch_type(const char *class_name, uint class_name_len); typedef zend_bool (*zend_auto_global_callback)(char *name, uint name_len TSRMLS_DC); typedef struct _zend_auto_global { char *name; uint name_len; zend_auto_global_callback auto_global_callback; zend_bool armed; } zend_auto_global; void zend_auto_global_dtor(zend_auto_global *auto_global); ZEND_API int zend_register_auto_global(const char *name, uint name_len, zend_auto_global_callback auto_global_callback TSRMLS_DC); ZEND_API zend_bool zend_is_auto_global(const char *name, uint name_len TSRMLS_DC); ZEND_API int zend_auto_global_disable_jit(const char *varname, zend_uint varname_length TSRMLS_DC); ZEND_API size_t zend_dirname(char *path, size_t len); int zendlex(znode *zendlval TSRMLS_DC); /* BEGIN: OPCODES */ #include "zend_vm_opcodes.h" #define ZEND_OP_DATA 137 /* END: OPCODES */ /* global/local fetches */ #define ZEND_FETCH_GLOBAL 0 #define ZEND_FETCH_LOCAL 1 #define ZEND_FETCH_STATIC 2 #define ZEND_FETCH_STATIC_MEMBER 3 #define ZEND_FETCH_GLOBAL_LOCK 4 #define ZEND_FETCH_LEXICAL 5 /* class fetches */ #define ZEND_FETCH_CLASS_DEFAULT 0 #define ZEND_FETCH_CLASS_SELF 1 #define ZEND_FETCH_CLASS_PARENT 2 #define ZEND_FETCH_CLASS_MAIN 3 #define ZEND_FETCH_CLASS_GLOBAL 4 #define ZEND_FETCH_CLASS_AUTO 5 #define ZEND_FETCH_CLASS_INTERFACE 6 #define ZEND_FETCH_CLASS_STATIC 7 #define ZEND_FETCH_CLASS_MASK 0x0f #define ZEND_FETCH_CLASS_NO_AUTOLOAD 0x80 #define ZEND_FETCH_CLASS_SILENT 0x0100 /* variable parsing type (compile-time) */ #define ZEND_PARSED_MEMBER (1<<0) #define ZEND_PARSED_METHOD_CALL (1<<1) #define ZEND_PARSED_STATIC_MEMBER (1<<2) #define ZEND_PARSED_FUNCTION_CALL (1<<3) #define ZEND_PARSED_VARIABLE (1<<4) #define ZEND_PARSED_REFERENCE_VARIABLE (1<<5) #define ZEND_PARSED_NEW (1<<6) /* unset types */ #define ZEND_UNSET_REG 0 /* var status for backpatching */ #define BP_VAR_R 0 #define BP_VAR_W 1 #define BP_VAR_RW 2 #define BP_VAR_IS 3 #define BP_VAR_NA 4 /* if not applicable */ #define BP_VAR_FUNC_ARG 5 #define BP_VAR_UNSET 6 #define ZEND_INTERNAL_FUNCTION 1 #define ZEND_USER_FUNCTION 2 #define ZEND_OVERLOADED_FUNCTION 3 #define ZEND_EVAL_CODE 4 #define ZEND_OVERLOADED_FUNCTION_TEMPORARY 5 #define ZEND_INTERNAL_CLASS 1 #define ZEND_USER_CLASS 2 #define ZEND_EVAL (1<<0) #define ZEND_INCLUDE (1<<1) #define ZEND_INCLUDE_ONCE (1<<2) #define ZEND_REQUIRE (1<<3) #define ZEND_REQUIRE_ONCE (1<<4) #define ZEND_ISSET (1<<0) #define ZEND_ISEMPTY (1<<1) #define ZEND_ISSET_ISEMPTY_MASK (ZEND_ISSET | ZEND_ISEMPTY) #define ZEND_QUICK_SET (1<<2) #define ZEND_CT (1<<0) #define ZEND_RT (1<<1) #define ZEND_FETCH_STANDARD 0x00000000 #define ZEND_FETCH_ADD_LOCK 0x08000000 #define ZEND_FETCH_MAKE_REF 0x04000000 #define ZEND_FE_FETCH_BYREF 1 #define ZEND_FE_FETCH_WITH_KEY 2 #define ZEND_FE_RESET_VARIABLE 1 #define ZEND_FE_RESET_REFERENCE 2 #define ZEND_MEMBER_FUNC_CALL 1<<0 #define ZEND_ARG_SEND_BY_REF (1<<0) #define ZEND_ARG_COMPILE_TIME_BOUND (1<<1) #define ZEND_ARG_SEND_FUNCTION (1<<2) #define ZEND_ARG_SEND_SILENT (1<<3) #define ZEND_SEND_BY_VAL 0 #define ZEND_SEND_BY_REF 1 #define ZEND_SEND_PREFER_REF 2 #define ARG_SEND_TYPE(zf, arg_num) \ ((zf) ? \ ((((zend_function*)(zf))->common.arg_info && \ arg_num<=((zend_function*)(zf))->common.num_args) ? \ ((zend_function *)(zf))->common.arg_info[arg_num-1].pass_by_reference : \ ((zend_function *)(zf))->common.pass_rest_by_reference) : \ ZEND_SEND_BY_VAL) #define ARG_MUST_BE_SENT_BY_REF(zf, arg_num) \ (ARG_SEND_TYPE(zf, arg_num) == ZEND_SEND_BY_REF) #define ARG_SHOULD_BE_SENT_BY_REF(zf, arg_num) \ (ARG_SEND_TYPE(zf, arg_num) & (ZEND_SEND_BY_REF|ZEND_SEND_PREFER_REF)) #define ARG_MAY_BE_SENT_BY_REF(zf, arg_num) \ (ARG_SEND_TYPE(zf, arg_num) == ZEND_SEND_PREFER_REF) #define ZEND_RETURN_VAL 0 #define ZEND_RETURN_REF 1 #define ZEND_RETURNS_FUNCTION 1<<0 #define ZEND_RETURNS_NEW 1<<1 END_EXTERN_C() #define ZEND_CLONE_FUNC_NAME "__clone" #define ZEND_CONSTRUCTOR_FUNC_NAME "__construct" #define ZEND_DESTRUCTOR_FUNC_NAME "__destruct" #define ZEND_GET_FUNC_NAME "__get" #define ZEND_SET_FUNC_NAME "__set" #define ZEND_UNSET_FUNC_NAME "__unset" #define ZEND_ISSET_FUNC_NAME "__isset" #define ZEND_CALL_FUNC_NAME "__call" #define ZEND_CALLSTATIC_FUNC_NAME "__callstatic" #define ZEND_TOSTRING_FUNC_NAME "__tostring" #define ZEND_AUTOLOAD_FUNC_NAME "__autoload" /* The following constants may be combined in CG(compiler_options) * to change the default compiler behavior */ /* generate extended debug information */ #define ZEND_COMPILE_EXTENDED_INFO (1<<0) /* call op_array handler of extendions */ #define ZEND_COMPILE_HANDLE_OP_ARRAY (1<<1) /* generate ZEND_DO_FCALL_BY_NAME for internal functions instead of ZEND_DO_FCALL */ #define ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS (1<<2) /* don't perform early binding for classes inherited form internal ones; * in namespaces assume that internal class that doesn't exist at compile-time * may apper in run-time */ #define ZEND_COMPILE_IGNORE_INTERNAL_CLASSES (1<<3) /* generate ZEND_DECLARE_INHERITED_CLASS_DELAYED opcode to delay early binding */ #define ZEND_COMPILE_DELAYED_BINDING (1<<4) /* disable constant substitution at compile-time */ #define ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION (1<<5) /* The default value for CG(compiler_options) */ #define ZEND_COMPILE_DEFAULT ZEND_COMPILE_HANDLE_OP_ARRAY /* The default value for CG(compiler_options) during eval() */ #define ZEND_COMPILE_DEFAULT_FOR_EVAL 0 #endif /* ZEND_COMPILE_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d23000081a40000000000000000000000014dc0f412000021e9000000b600010002ffffffffffffffff0000003700000000root/usr/local/include/php/Zend/zend_object_handlers.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_object_handlers.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_OBJECT_HANDLERS_H #define ZEND_OBJECT_HANDLERS_H union _zend_function; struct _zend_property_info; /* The following rule applies to read_property() and read_dimension() implementations: If you return a zval which is not otherwise referenced by the extension or the engine's symbol table, its reference count should be 0. */ /* Used to fetch property from the object, read-only */ typedef zval *(*zend_object_read_property_t)(zval *object, zval *member, int type TSRMLS_DC); /* Used to fetch dimension from the object, read-only */ typedef zval *(*zend_object_read_dimension_t)(zval *object, zval *offset, int type TSRMLS_DC); /* The following rule applies to write_property() and write_dimension() implementations: If you receive a value zval in write_property/write_dimension, you may only modify it if its reference count is 1. Otherwise, you must create a copy of that zval before making any changes. You should NOT modify the reference count of the value passed to you. */ /* Used to set property of the object */ typedef void (*zend_object_write_property_t)(zval *object, zval *member, zval *value TSRMLS_DC); /* Used to set dimension of the object */ typedef void (*zend_object_write_dimension_t)(zval *object, zval *offset, zval *value TSRMLS_DC); /* Used to create pointer to the property of the object, for future direct r/w access */ typedef zval **(*zend_object_get_property_ptr_ptr_t)(zval *object, zval *member TSRMLS_DC); /* Used to set object value. Can be used to override assignments and scalar write ops (like ++, +=) on the object */ typedef void (*zend_object_set_t)(zval **object, zval *value TSRMLS_DC); /* Used to get object value. Can be used when converting object value to * one of the basic types and when using scalar ops (like ++, +=) on the object */ typedef zval* (*zend_object_get_t)(zval *object TSRMLS_DC); /* Used to check if a property of the object exists */ /* param has_set_exists: * 0 (has) whether property exists and is not NULL * 1 (set) whether property exists and is true * 2 (exists) whether property exists */ typedef int (*zend_object_has_property_t)(zval *object, zval *member, int has_set_exists TSRMLS_DC); /* Used to check if a dimension of the object exists */ typedef int (*zend_object_has_dimension_t)(zval *object, zval *member, int check_empty TSRMLS_DC); /* Used to remove a property of the object */ typedef void (*zend_object_unset_property_t)(zval *object, zval *member TSRMLS_DC); /* Used to remove a dimension of the object */ typedef void (*zend_object_unset_dimension_t)(zval *object, zval *offset TSRMLS_DC); /* Used to get hash of the properties of the object, as hash of zval's */ typedef HashTable *(*zend_object_get_properties_t)(zval *object TSRMLS_DC); typedef HashTable *(*zend_object_get_debug_info_t)(zval *object, int *is_temp TSRMLS_DC); /* Used to call methods */ /* args on stack! */ /* Andi - EX(fbc) (function being called) needs to be initialized already in the INIT fcall opcode so that the parameters can be parsed the right way. We need to add another callback for this. */ typedef int (*zend_object_call_method_t)(char *method, INTERNAL_FUNCTION_PARAMETERS); typedef union _zend_function *(*zend_object_get_method_t)(zval **object_ptr, char *method, int method_len TSRMLS_DC); typedef union _zend_function *(*zend_object_get_constructor_t)(zval *object TSRMLS_DC); /* Object maintenance/destruction */ typedef void (*zend_object_add_ref_t)(zval *object TSRMLS_DC); typedef void (*zend_object_del_ref_t)(zval *object TSRMLS_DC); typedef void (*zend_object_delete_obj_t)(zval *object TSRMLS_DC); typedef zend_object_value (*zend_object_clone_obj_t)(zval *object TSRMLS_DC); typedef zend_class_entry *(*zend_object_get_class_entry_t)(const zval *object TSRMLS_DC); typedef int (*zend_object_get_class_name_t)(const zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC); typedef int (*zend_object_compare_t)(zval *object1, zval *object2 TSRMLS_DC); /* Cast an object to some other type */ typedef int (*zend_object_cast_t)(zval *readobj, zval *retval, int type TSRMLS_DC); /* updates *count to hold the number of elements present and returns SUCCESS. * Returns FAILURE if the object does not have any sense of overloaded dimensions */ typedef int (*zend_object_count_elements_t)(zval *object, long *count TSRMLS_DC); typedef int (*zend_object_get_closure_t)(zval *obj, zend_class_entry **ce_ptr, union _zend_function **fptr_ptr, zval **zobj_ptr TSRMLS_DC); struct _zend_object_handlers { /* general object functions */ zend_object_add_ref_t add_ref; zend_object_del_ref_t del_ref; zend_object_clone_obj_t clone_obj; /* individual object functions */ zend_object_read_property_t read_property; zend_object_write_property_t write_property; zend_object_read_dimension_t read_dimension; zend_object_write_dimension_t write_dimension; zend_object_get_property_ptr_ptr_t get_property_ptr_ptr; zend_object_get_t get; zend_object_set_t set; zend_object_has_property_t has_property; zend_object_unset_property_t unset_property; zend_object_has_dimension_t has_dimension; zend_object_unset_dimension_t unset_dimension; zend_object_get_properties_t get_properties; zend_object_get_method_t get_method; zend_object_call_method_t call_method; zend_object_get_constructor_t get_constructor; zend_object_get_class_entry_t get_class_entry; zend_object_get_class_name_t get_class_name; zend_object_compare_t compare_objects; zend_object_cast_t cast_object; zend_object_count_elements_t count_elements; zend_object_get_debug_info_t get_debug_info; zend_object_get_closure_t get_closure; }; extern ZEND_API zend_object_handlers std_object_handlers; BEGIN_EXTERN_C() ZEND_API union _zend_function *zend_std_get_static_method(zend_class_entry *ce, char *function_name_strval, int function_name_strlen TSRMLS_DC); ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, char *property_name, int property_name_len, zend_bool silent TSRMLS_DC); ZEND_API zend_bool zend_std_unset_static_property(zend_class_entry *ce, char *property_name, int property_name_len TSRMLS_DC); ZEND_API union _zend_function *zend_std_get_constructor(zval *object TSRMLS_DC); ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce, zval *member, int silent TSRMLS_DC); ZEND_API HashTable *zend_std_get_properties(zval *object TSRMLS_DC); ZEND_API HashTable *zend_std_get_debug_info(zval *object, int *is_temp TSRMLS_DC); ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int type TSRMLS_DC); #define IS_ZEND_STD_OBJECT(z) (Z_TYPE(z) == IS_OBJECT && (Z_OBJ_HT((z))->get_class_entry != NULL)) #define HAS_CLASS_ENTRY(z) (Z_OBJ_HT(z)->get_class_entry != NULL) ZEND_API int zend_check_private(union _zend_function *fbc, zend_class_entry *ce, char *function_name_strval, int function_name_strlen TSRMLS_DC); ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope); ZEND_API int zend_check_property_access(zend_object *zobj, char *prop_info_name, int prop_info_name_len TSRMLS_DC); ZEND_API void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS); END_EXTERN_C() #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d16000081a40000000000000000000000014dc0f412000007d7000000b600010002ffffffffffffffff0000003300000000root/usr/local/include/php/Zend/zend_ini_scanner.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_ini_scanner.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef _ZEND_INI_SCANNER_H #define _ZEND_INI_SCANNER_H /* Scanner modes */ #define ZEND_INI_SCANNER_NORMAL 0 /* Normal mode. [DEFAULT] */ #define ZEND_INI_SCANNER_RAW 1 /* Raw mode. Option values are not parsed */ BEGIN_EXTERN_C() int zend_ini_scanner_get_lineno(TSRMLS_D); char *zend_ini_scanner_get_filename(TSRMLS_D); int zend_ini_open_file_for_scanning(zend_file_handle *fh, int scanner_mode TSRMLS_DC); int zend_ini_prepare_string_for_scanning(char *str, int scanner_mode TSRMLS_DC); int ini_lex(zval *ini_lval TSRMLS_DC); void shutdown_ini_scanner(TSRMLS_D); END_EXTERN_C() #endif /* _ZEND_INI_SCANNER_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d10000081a40000000000000000000000014dc0f41200000cd5000000b600010002ffffffffffffffff0000003600000000root/usr/local/include/php/Zend/zend_globals_macros.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_globals_macros.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_GLOBALS_MACROS_H #define ZEND_GLOBALS_MACROS_H typedef struct _zend_compiler_globals zend_compiler_globals; typedef struct _zend_executor_globals zend_executor_globals; typedef struct _zend_php_scanner_globals zend_php_scanner_globals; typedef struct _zend_ini_scanner_globals zend_ini_scanner_globals; BEGIN_EXTERN_C() /* Compiler */ #ifdef ZTS # define CG(v) TSRMG(compiler_globals_id, zend_compiler_globals *, v) int zendparse(void *compiler_globals); #else # define CG(v) (compiler_globals.v) extern ZEND_API struct _zend_compiler_globals compiler_globals; int zendparse(void); #endif /* Executor */ #ifdef ZTS # define EG(v) TSRMG(executor_globals_id, zend_executor_globals *, v) #else # define EG(v) (executor_globals.v) extern ZEND_API zend_executor_globals executor_globals; #endif /* Language Scanner */ #ifdef ZTS # define LANG_SCNG(v) TSRMG(language_scanner_globals_id, zend_php_scanner_globals *, v) extern ZEND_API ts_rsrc_id language_scanner_globals_id; #else # define LANG_SCNG(v) (language_scanner_globals.v) extern ZEND_API zend_php_scanner_globals language_scanner_globals; #endif /* INI Scanner */ #ifdef ZTS # define INI_SCNG(v) TSRMG(ini_scanner_globals_id, zend_ini_scanner_globals *, v) extern ZEND_API ts_rsrc_id ini_scanner_globals_id; #else # define INI_SCNG(v) (ini_scanner_globals.v) extern ZEND_API zend_ini_scanner_globals ini_scanner_globals; #endif END_EXTERN_C() /* For limited downwards source compatibility */ #define CLS_FETCH() #define ELS_FETCH() #define ALS_FETCH() #define PLS_FETCH() #define SLS_FETCH() #define CLS_D #define ELS_D #define ALS_D #define PLS_D #define SLS_D #define CLS_DC #define ELS_DC #define ALS_DC #define PLS_DC #define SLS_DC #define CLS_C #define ELS_C #define ALS_C #define PLS_C #define SLS_C #define CLS_CC #define ELS_CC #define ALS_CC #define PLS_CC #define SLS_CC #endif /* ZEND_GLOBALS_MACROS_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d0a000081a40000000000000000000000014dc0f412000033a5000000b600010002ffffffffffffffff0000002f00000000root/usr/local/include/php/Zend/zend_execute.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_execute.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_EXECUTE_H #define ZEND_EXECUTE_H #include "zend_compile.h" #include "zend_hash.h" #include "zend_operators.h" #include "zend_variables.h" typedef union _temp_variable { zval tmp_var; struct { zval **ptr_ptr; zval *ptr; zend_bool fcall_returned_reference; } var; struct { zval **ptr_ptr; zval *ptr; zend_bool fcall_returned_reference; zval *str; zend_uint offset; } str_offset; struct { zval **ptr_ptr; zval *ptr; zend_bool fcall_returned_reference; HashPointer fe_pos; } fe; zend_class_entry *class_entry; } temp_variable; BEGIN_EXTERN_C() ZEND_API extern void (*zend_execute)(zend_op_array *op_array TSRMLS_DC); ZEND_API extern void (*zend_execute_internal)(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC); void init_executor(TSRMLS_D); void shutdown_executor(TSRMLS_D); void shutdown_destructors(TSRMLS_D); ZEND_API void execute(zend_op_array *op_array TSRMLS_DC); ZEND_API void execute_internal(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC); ZEND_API int zend_is_true(zval *op); #define safe_free_zval_ptr(p) safe_free_zval_ptr_rel(p ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) static inline void safe_free_zval_ptr_rel(zval *p ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) { TSRMLS_FETCH(); if (p!=EG(uninitialized_zval_ptr)) { FREE_ZVAL_REL(p); } } ZEND_API int zend_lookup_class(const char *name, int name_length, zend_class_entry ***ce TSRMLS_DC); ZEND_API int zend_lookup_class_ex(const char *name, int name_length, int use_autoload, zend_class_entry ***ce TSRMLS_DC); ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name TSRMLS_DC); ZEND_API int zend_eval_stringl(char *str, int str_len, zval *retval_ptr, char *string_name TSRMLS_DC); ZEND_API int zend_eval_string_ex(char *str, zval *retval_ptr, char *string_name, int handle_exceptions TSRMLS_DC); ZEND_API int zend_eval_stringl_ex(char *str, int str_len, zval *retval_ptr, char *string_name, int handle_exceptions TSRMLS_DC); static inline int i_zend_is_true(zval *op) { int result; switch (Z_TYPE_P(op)) { case IS_NULL: result = 0; break; case IS_LONG: case IS_BOOL: case IS_RESOURCE: result = (Z_LVAL_P(op)?1:0); break; case IS_DOUBLE: result = (Z_DVAL_P(op) ? 1 : 0); break; case IS_STRING: if (Z_STRLEN_P(op) == 0 || (Z_STRLEN_P(op)==1 && Z_STRVAL_P(op)[0]=='0')) { result = 0; } else { result = 1; } break; case IS_ARRAY: result = (zend_hash_num_elements(Z_ARRVAL_P(op))?1:0); break; case IS_OBJECT: if(IS_ZEND_STD_OBJECT(*op)) { TSRMLS_FETCH(); if (Z_OBJ_HT_P(op)->cast_object) { zval tmp; if (Z_OBJ_HT_P(op)->cast_object(op, &tmp, IS_BOOL TSRMLS_CC) == SUCCESS) { result = Z_LVAL(tmp); break; } } else if (Z_OBJ_HT_P(op)->get) { zval *tmp = Z_OBJ_HT_P(op)->get(op TSRMLS_CC); if(Z_TYPE_P(tmp) != IS_OBJECT) { /* for safety - avoid loop */ convert_to_boolean(tmp); result = Z_LVAL_P(tmp); zval_ptr_dtor(&tmp); break; } } } result = 1; break; default: result = 0; break; } return result; } ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC); ZEND_API int zval_update_constant_inline_change(zval **pp, void *arg TSRMLS_DC); ZEND_API int zval_update_constant_no_inline_change(zval **pp, void *arg TSRMLS_DC); ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *scope TSRMLS_DC); /* dedicated Zend executor functions - do not use! */ #define ZEND_VM_STACK_PAGE_SIZE ((64 * 1024) - 64) struct _zend_vm_stack { void **top; void **end; zend_vm_stack prev; }; #define ZEND_VM_STACK_ELEMETS(stack) \ ((void**)(((char*)(stack)) + ZEND_MM_ALIGNED_SIZE(sizeof(struct _zend_vm_stack)))) #define ZEND_VM_STACK_GROW_IF_NEEDED(count) \ do { \ if (UNEXPECTED((count) > \ EG(argument_stack)->end - EG(argument_stack)->top)) { \ zend_vm_stack_extend((count) TSRMLS_CC); \ } \ } while (0) static inline zend_vm_stack zend_vm_stack_new_page(int count) { zend_vm_stack page = (zend_vm_stack)emalloc(ZEND_MM_ALIGNED_SIZE(sizeof(*page)) + sizeof(void*) * count); page->top = ZEND_VM_STACK_ELEMETS(page); page->end = page->top + count; page->prev = NULL; return page; } static inline void zend_vm_stack_init(TSRMLS_D) { EG(argument_stack) = zend_vm_stack_new_page(ZEND_VM_STACK_PAGE_SIZE); } static inline void zend_vm_stack_destroy(TSRMLS_D) { zend_vm_stack stack = EG(argument_stack); while (stack != NULL) { zend_vm_stack p = stack->prev; efree(stack); stack = p; } } static inline void zend_vm_stack_extend(int count TSRMLS_DC) { zend_vm_stack p = zend_vm_stack_new_page(count >= ZEND_VM_STACK_PAGE_SIZE ? count : ZEND_VM_STACK_PAGE_SIZE); p->prev = EG(argument_stack); EG(argument_stack) = p; } static inline void **zend_vm_stack_top(TSRMLS_D) { return EG(argument_stack)->top; } static inline void zend_vm_stack_push(void *ptr TSRMLS_DC) { ZEND_VM_STACK_GROW_IF_NEEDED(1); *(EG(argument_stack)->top++) = ptr; } static inline void zend_vm_stack_push_nocheck(void *ptr TSRMLS_DC) { *(EG(argument_stack)->top++) = ptr; } static inline void *zend_vm_stack_pop(TSRMLS_D) { void *el = *(--EG(argument_stack)->top); if (UNEXPECTED(EG(argument_stack)->top == ZEND_VM_STACK_ELEMETS(EG(argument_stack)))) { zend_vm_stack p = EG(argument_stack); EG(argument_stack) = p->prev; efree(p); } return el; } static inline void *zend_vm_stack_alloc(size_t size TSRMLS_DC) { void *ret; size = (size + (sizeof(void*) - 1)) / sizeof(void*); /* the following comparison must be optimized out at compile time */ if (ZEND_MM_ALIGNMENT > sizeof(void*)) { int extra = (ZEND_MM_ALIGNMENT - ((zend_uintptr_t)EG(argument_stack)->top & (ZEND_MM_ALIGNMENT - 1))) / sizeof(void*); if (UNEXPECTED(size + extra + ZEND_MM_ALIGNED_SIZE(sizeof(void*)) / sizeof(void*) > (zend_uintptr_t)(EG(argument_stack)->end - EG(argument_stack)->top))) { zend_vm_stack_extend(size TSRMLS_CC); } else { void **old_top = EG(argument_stack)->top; EG(argument_stack)->top += extra; /* store old top on the stack */ *EG(argument_stack)->top = (void*)old_top; EG(argument_stack)->top += ZEND_MM_ALIGNED_SIZE(sizeof(void*)) / sizeof(void*); } } else { ZEND_VM_STACK_GROW_IF_NEEDED((int)size); } ret = (void*)EG(argument_stack)->top; EG(argument_stack)->top += size; return ret; } static inline void zend_vm_stack_free_int(void *ptr TSRMLS_DC) { if (UNEXPECTED(ZEND_VM_STACK_ELEMETS(EG(argument_stack)) == (void**)ptr)) { zend_vm_stack p = EG(argument_stack); EG(argument_stack) = p->prev; efree(p); } else { EG(argument_stack)->top = (void**)ptr; } } static inline void zend_vm_stack_free(void *ptr TSRMLS_DC) { if (UNEXPECTED(ZEND_VM_STACK_ELEMETS(EG(argument_stack)) == (void**)ptr)) { zend_vm_stack p = EG(argument_stack); EG(argument_stack) = p->prev; efree(p); } else { /* the following comparison must be optimized out at compile time */ if (ZEND_MM_ALIGNMENT > sizeof(void*)) { ptr = (void*)(((char*)ptr) - ZEND_MM_ALIGNED_SIZE(sizeof(void*))); EG(argument_stack)->top = *(void***)ptr; } else { EG(argument_stack)->top = (void**)ptr; } } } static inline void** zend_vm_stack_push_args(int count TSRMLS_DC) { if (UNEXPECTED(EG(argument_stack)->top - ZEND_VM_STACK_ELEMETS(EG(argument_stack)) < count) || UNEXPECTED(EG(argument_stack)->top == EG(argument_stack)->end)) { zend_vm_stack p = EG(argument_stack); zend_vm_stack_extend(count + 1 TSRMLS_CC); EG(argument_stack)->top += count; *(EG(argument_stack)->top) = (void*)(zend_uintptr_t)count; while (count-- > 0) { void *data = *(--p->top); if (UNEXPECTED(p->top == ZEND_VM_STACK_ELEMETS(p))) { zend_vm_stack r = p; EG(argument_stack)->prev = p->prev; p = p->prev; efree(r); } *(ZEND_VM_STACK_ELEMETS(EG(argument_stack)) + count) = data; } return EG(argument_stack)->top++; } *(EG(argument_stack)->top) = (void*)(zend_uintptr_t)count; return EG(argument_stack)->top++; } static inline void zend_vm_stack_clear_multiple(TSRMLS_D) { void **p = EG(argument_stack)->top - 1; int delete_count = (int)(zend_uintptr_t) *p; while (--delete_count>=0) { zval *q = *(zval **)(--p); *p = NULL; zval_ptr_dtor(&q); } zend_vm_stack_free_int(p TSRMLS_CC); } static inline zval** zend_vm_stack_get_arg(int requested_arg TSRMLS_DC) { void **p = EG(current_execute_data)->prev_execute_data->function_state.arguments; int arg_count = (int)(zend_uintptr_t) *p; if (UNEXPECTED(requested_arg > arg_count)) { return NULL; } return (zval**)p - arg_count + requested_arg - 1; } static inline void zend_arg_types_stack_2_pop(zend_ptr_stack *stack, zval **object, zend_function **fbc) { void *a, *b; zend_ptr_stack_2_pop(stack, &a, &b); *object = (zval *) a; *fbc = (zend_function *) b; } static inline void zend_arg_types_stack_3_pop(zend_ptr_stack *stack, zend_class_entry **called_scope, zval **object, zend_function **fbc) { void *a, *b, *c; zend_ptr_stack_3_pop(stack, &a, &b, &c); *called_scope = (zend_class_entry *) a; *object = (zval *) b; *fbc = (zend_function *) c; } void execute_new_code(TSRMLS_D); /* services */ ZEND_API char *get_active_class_name(char **space TSRMLS_DC); ZEND_API char *get_active_function_name(TSRMLS_D); ZEND_API char *zend_get_executed_filename(TSRMLS_D); ZEND_API uint zend_get_executed_lineno(TSRMLS_D); ZEND_API zend_bool zend_is_executing(TSRMLS_D); ZEND_API void zend_set_timeout(long seconds, int reset_signals); ZEND_API void zend_unset_timeout(TSRMLS_D); ZEND_API void zend_timeout(int dummy); ZEND_API zend_class_entry *zend_fetch_class(const char *class_name, uint class_name_len, int fetch_type TSRMLS_DC); void zend_verify_abstract_class(zend_class_entry *ce TSRMLS_DC); #ifdef ZEND_WIN32 void zend_init_timeout_thread(void); void zend_shutdown_timeout_thread(void); #define WM_REGISTER_ZEND_TIMEOUT (WM_USER+1) #define WM_UNREGISTER_ZEND_TIMEOUT (WM_USER+2) #endif #define zendi_zval_copy_ctor(p) zval_copy_ctor(&(p)) #define zendi_zval_dtor(p) zval_dtor(&(p)) #define active_opline (*EG(opline_ptr)) /* The following tries to resolve the classname of a zval of type object. * Since it is slow it should be only used in error messages. */ #define Z_OBJ_CLASS_NAME_P(zval) ((zval) && Z_TYPE_P(zval) == IS_OBJECT && Z_OBJ_HT_P(zval)->get_class_entry != NULL && Z_OBJ_HT_P(zval)->get_class_entry(zval TSRMLS_CC) ? Z_OBJ_HT_P(zval)->get_class_entry(zval TSRMLS_CC)->name : "") ZEND_API zval** zend_get_compiled_variable_value(const zend_execute_data *execute_data_ptr, zend_uint var); #define ZEND_USER_OPCODE_CONTINUE 0 /* execute next opcode */ #define ZEND_USER_OPCODE_RETURN 1 /* exit from executor (return from function) */ #define ZEND_USER_OPCODE_DISPATCH 2 /* call original opcode handler */ #define ZEND_USER_OPCODE_ENTER 3 /* enter into new op_array without recursion */ #define ZEND_USER_OPCODE_LEAVE 4 /* return to calling op_array within the same executor */ #define ZEND_USER_OPCODE_DISPATCH_TO 0x100 /* call original handler of returned opcode */ ZEND_API int zend_set_user_opcode_handler(zend_uchar opcode, user_opcode_handler_t handler); ZEND_API user_opcode_handler_t zend_get_user_opcode_handler(zend_uchar opcode); /* former zend_execute_locks.h */ typedef struct _zend_free_op { zval* var; /* int is_var; */ } zend_free_op; ZEND_API zval *zend_get_zval_ptr(znode *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC); ZEND_API zval **zend_get_zval_ptr_ptr(const znode *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC); ZEND_API int zend_do_fcall(ZEND_OPCODE_HANDLER_ARGS); END_EXTERN_C() #endif /* ZEND_EXECUTE_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d14000081a40000000000000000000000014dc0f41200002769000000b600010002ffffffffffffffff0000002b00000000root/usr/local/include/php/Zend/zend_ini.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_ini.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_INI_H #define ZEND_INI_H #define ZEND_INI_USER (1<<0) #define ZEND_INI_PERDIR (1<<1) #define ZEND_INI_SYSTEM (1<<2) #define ZEND_INI_ALL (ZEND_INI_USER|ZEND_INI_PERDIR|ZEND_INI_SYSTEM) #ifndef XtOffsetOf # if defined(CRAY) || (defined(__arm) && !defined(LINUX)) # ifdef __STDC__ # define XtOffset(p_type, field) _Offsetof(p_type, field) # else # ifdef CRAY2 # define XtOffset(p_type, field) \ (sizeof(int)*((unsigned int)&(((p_type)NULL)->field))) # else /* !CRAY2 */ # define XtOffset(p_type, field) ((unsigned int)&(((p_type)NULL)->field)) # endif /* !CRAY2 */ # endif /* __STDC__ */ # else /* ! (CRAY || __arm) */ # define XtOffset(p_type, field) \ ((long) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL))) # endif /* !CRAY */ # ifdef offsetof # define XtOffsetOf(s_type, field) offsetof(s_type, field) # else # define XtOffsetOf(s_type, field) XtOffset(s_type*, field) # endif #endif typedef struct _zend_ini_entry zend_ini_entry; #define ZEND_INI_MH(name) int name(zend_ini_entry *entry, char *new_value, uint new_value_length, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage TSRMLS_DC) #define ZEND_INI_DISP(name) void name(zend_ini_entry *ini_entry, int type) struct _zend_ini_entry { int module_number; int modifiable; char *name; uint name_length; ZEND_INI_MH((*on_modify)); void *mh_arg1; void *mh_arg2; void *mh_arg3; char *value; uint value_length; char *orig_value; uint orig_value_length; int orig_modifiable; int modified; void (*displayer)(zend_ini_entry *ini_entry, int type); }; BEGIN_EXTERN_C() ZEND_API int zend_ini_startup(TSRMLS_D); ZEND_API int zend_ini_shutdown(TSRMLS_D); ZEND_API int zend_ini_global_shutdown(TSRMLS_D); ZEND_API int zend_ini_deactivate(TSRMLS_D); ZEND_API int zend_copy_ini_directives(TSRMLS_D); ZEND_API void zend_ini_sort_entries(TSRMLS_D); ZEND_API int zend_register_ini_entries(const zend_ini_entry *ini_entry, int module_number TSRMLS_DC); ZEND_API void zend_unregister_ini_entries(int module_number TSRMLS_DC); ZEND_API void zend_ini_refresh_caches(int stage TSRMLS_DC); ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage); ZEND_API int zend_alter_ini_entry_ex(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage, int force_change TSRMLS_DC); ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage); ZEND_API void display_ini_entries(zend_module_entry *module); ZEND_API long zend_ini_long(char *name, uint name_length, int orig); ZEND_API double zend_ini_double(char *name, uint name_length, int orig); ZEND_API char *zend_ini_string(char *name, uint name_length, int orig); ZEND_API char *zend_ini_string_ex(char *name, uint name_length, int orig, zend_bool *exists); ZEND_API int zend_ini_register_displayer(char *name, uint name_length, void (*displayer)(zend_ini_entry *ini_entry, int type)); ZEND_API ZEND_INI_DISP(zend_ini_boolean_displayer_cb); ZEND_API ZEND_INI_DISP(zend_ini_color_displayer_cb); ZEND_API ZEND_INI_DISP(display_link_numbers); END_EXTERN_C() #define ZEND_INI_BEGIN() static const zend_ini_entry ini_entries[] = { #define ZEND_INI_END() { 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, 0, 0, NULL } }; #define ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, arg2, arg3, displayer) \ { 0, modifiable, name, sizeof(name), on_modify, arg1, arg2, arg3, default_value, sizeof(default_value)-1, NULL, 0, 0, 0, displayer }, #define ZEND_INI_ENTRY3(name, default_value, modifiable, on_modify, arg1, arg2, arg3) \ ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, arg2, arg3, NULL) #define ZEND_INI_ENTRY2_EX(name, default_value, modifiable, on_modify, arg1, arg2, displayer) \ ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, arg2, NULL, displayer) #define ZEND_INI_ENTRY2(name, default_value, modifiable, on_modify, arg1, arg2) \ ZEND_INI_ENTRY2_EX(name, default_value, modifiable, on_modify, arg1, arg2, NULL) #define ZEND_INI_ENTRY1_EX(name, default_value, modifiable, on_modify, arg1, displayer) \ ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, NULL, NULL, displayer) #define ZEND_INI_ENTRY1(name, default_value, modifiable, on_modify, arg1) \ ZEND_INI_ENTRY1_EX(name, default_value, modifiable, on_modify, arg1, NULL) #define ZEND_INI_ENTRY_EX(name, default_value, modifiable, on_modify, displayer) \ ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, NULL, NULL, NULL, displayer) #define ZEND_INI_ENTRY(name, default_value, modifiable, on_modify) \ ZEND_INI_ENTRY_EX(name, default_value, modifiable, on_modify, NULL) #ifdef ZTS #define STD_ZEND_INI_ENTRY(name, default_value, modifiable, on_modify, property_name, struct_type, struct_ptr) \ ZEND_INI_ENTRY2(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr##_id) #define STD_ZEND_INI_ENTRY_EX(name, default_value, modifiable, on_modify, property_name, struct_type, struct_ptr, displayer) \ ZEND_INI_ENTRY2_EX(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr##_id, displayer) #define STD_ZEND_INI_BOOLEAN(name, default_value, modifiable, on_modify, property_name, struct_type, struct_ptr) \ ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr##_id, NULL, zend_ini_boolean_displayer_cb) #else #define STD_ZEND_INI_ENTRY(name, default_value, modifiable, on_modify, property_name, struct_type, struct_ptr) \ ZEND_INI_ENTRY2(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr) #define STD_ZEND_INI_ENTRY_EX(name, default_value, modifiable, on_modify, property_name, struct_type, struct_ptr, displayer) \ ZEND_INI_ENTRY2_EX(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr, displayer) #define STD_ZEND_INI_BOOLEAN(name, default_value, modifiable, on_modify, property_name, struct_type, struct_ptr) \ ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr, NULL, zend_ini_boolean_displayer_cb) #endif #define INI_INT(name) zend_ini_long((name), sizeof(name), 0) #define INI_FLT(name) zend_ini_double((name), sizeof(name), 0) #define INI_STR(name) zend_ini_string_ex((name), sizeof(name), 0, NULL) #define INI_BOOL(name) ((zend_bool) INI_INT(name)) #define INI_ORIG_INT(name) zend_ini_long((name), sizeof(name), 1) #define INI_ORIG_FLT(name) zend_ini_double((name), sizeof(name), 1) #define INI_ORIG_STR(name) zend_ini_string((name), sizeof(name), 1) #define INI_ORIG_BOOL(name) ((zend_bool) INI_ORIG_INT(name)) #define REGISTER_INI_ENTRIES() zend_register_ini_entries(ini_entries, module_number TSRMLS_CC) #define UNREGISTER_INI_ENTRIES() zend_unregister_ini_entries(module_number TSRMLS_CC) #define DISPLAY_INI_ENTRIES() display_ini_entries(zend_module) #define REGISTER_INI_DISPLAYER(name, displayer) zend_ini_register_displayer((name), sizeof(name), displayer) #define REGISTER_INI_BOOLEAN(name) REGISTER_INI_DISPLAYER(name, zend_ini_boolean_displayer_cb) /* Standard message handlers */ BEGIN_EXTERN_C() ZEND_API ZEND_INI_MH(OnUpdateBool); ZEND_API ZEND_INI_MH(OnUpdateLong); ZEND_API ZEND_INI_MH(OnUpdateLongGEZero); ZEND_API ZEND_INI_MH(OnUpdateReal); ZEND_API ZEND_INI_MH(OnUpdateString); ZEND_API ZEND_INI_MH(OnUpdateStringUnempty); END_EXTERN_C() #define ZEND_INI_DISPLAY_ORIG 1 #define ZEND_INI_DISPLAY_ACTIVE 2 #define ZEND_INI_STAGE_STARTUP (1<<0) #define ZEND_INI_STAGE_SHUTDOWN (1<<1) #define ZEND_INI_STAGE_ACTIVATE (1<<2) #define ZEND_INI_STAGE_DEACTIVATE (1<<3) #define ZEND_INI_STAGE_RUNTIME (1<<4) #define ZEND_INI_STAGE_HTACCESS (1<<5) /* INI parsing engine */ typedef void (*zend_ini_parser_cb_t)(zval *arg1, zval *arg2, zval *arg3, int callback_type, void *arg TSRMLS_DC); BEGIN_EXTERN_C() ZEND_API int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg TSRMLS_DC); ZEND_API int zend_parse_ini_string(char *str, zend_bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg TSRMLS_DC); END_EXTERN_C() /* INI entries */ #define ZEND_INI_PARSER_ENTRY 1 /* Normal entry: foo = bar */ #define ZEND_INI_PARSER_SECTION 2 /* Section: [foobar] */ #define ZEND_INI_PARSER_POP_ENTRY 3 /* Offset entry: foo[] = bar */ typedef struct _zend_ini_parser_param { zend_ini_parser_cb_t ini_parser_cb; void *arg; } zend_ini_parser_param; #endif /* ZEND_INI_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d1d000081a40000000000000000000000014dc0f41200000146000000b600010002ffffffffffffffff0000003d00000000root/usr/local/include/php/Zend/zend_language_scanner_defs.h/* Generated by re2c 0.13.5 on Mon Jan 3 05:56:03 2011 */ #line 3 "Zend/zend_language_scanner_defs.h" enum YYCONDTYPE { yycST_IN_SCRIPTING, yycST_LOOKING_FOR_PROPERTY, yycST_BACKQUOTE, yycST_DOUBLE_QUOTES, yycST_HEREDOC, yycST_LOOKING_FOR_VARNAME, yycST_VAR_OFFSET, yycINITIAL, yycST_END_HEREDOC, yycST_NOWDOC, }; 07070100180d1c000081a40000000000000000000000014dc0f412000009bf000000b600010002ffffffffffffffff0000003800000000root/usr/local/include/php/Zend/zend_language_scanner.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_language_scanner.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_SCANNER_H #define ZEND_SCANNER_H typedef struct _zend_lex_state { unsigned int yy_leng; unsigned char *yy_start; unsigned char *yy_text; unsigned char *yy_cursor; unsigned char *yy_marker; unsigned char *yy_limit; int yy_state; zend_stack state_stack; zend_file_handle *in; uint lineno; char *filename; #ifdef ZEND_MULTIBYTE /* original (unfiltered) script */ unsigned char *script_org; size_t script_org_size; /* filtered script */ unsigned char *script_filtered; size_t script_filtered_size; /* input/ouput filters */ zend_encoding_filter input_filter; zend_encoding_filter output_filter; zend_encoding *script_encoding; zend_encoding *internal_encoding; #endif /* ZEND_MULTIBYTE */ } zend_lex_state; BEGIN_EXTERN_C() int zend_compare_file_handles(zend_file_handle *fh1, zend_file_handle *fh2); ZEND_API void zend_save_lexical_state(zend_lex_state *lex_state TSRMLS_DC); ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state TSRMLS_DC); ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_DC); END_EXTERN_C() #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d26000081a40000000000000000000000014dc0f41200003dc8000000b600010002ffffffffffffffff0000003100000000root/usr/local/include/php/Zend/zend_operators.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_operators.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_OPERATORS_H #define ZEND_OPERATORS_H #include #include #include #ifdef HAVE_IEEEFP_H #include #endif #include "zend_strtod.h" #if 0&&HAVE_BCMATH #include "ext/bcmath/libbcmath/src/bcmath.h" #endif BEGIN_EXTERN_C() ZEND_API int add_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int sub_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int mul_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int div_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int mod_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int boolean_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int boolean_not_function(zval *result, zval *op1 TSRMLS_DC); ZEND_API int bitwise_not_function(zval *result, zval *op1 TSRMLS_DC); ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int shift_left_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int shift_right_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int concat_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int is_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int is_not_identical_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int is_not_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API zend_bool instanceof_function_ex(const zend_class_entry *instance_ce, const zend_class_entry *ce, zend_bool interfaces_only TSRMLS_DC); ZEND_API zend_bool instanceof_function(const zend_class_entry *instance_ce, const zend_class_entry *ce TSRMLS_DC); END_EXTERN_C() #if ZEND_DVAL_TO_LVAL_CAST_OK # define zend_dval_to_lval(d) ((long) (d)) #elif SIZEOF_LONG == 4 && defined(HAVE_ZEND_LONG64) static zend_always_inline long zend_dval_to_lval(double d) { if (d > LONG_MAX || d < LONG_MIN) { return (long)(unsigned long)(zend_long64) d; } return (long) d; } #else static zend_always_inline long zend_dval_to_lval(double d) { if (d > LONG_MAX) { return (long)(unsigned long) d; } return (long) d; } #endif /* }}} */ #define ZEND_IS_DIGIT(c) ((c) >= '0' && (c) <= '9') #define ZEND_IS_XDIGIT(c) (((c) >= 'A' && (c) <= 'F') || ((c) >= 'a' && (c) <= 'f')) /** * Checks whether the string "str" with length "length" is numeric. The value * of allow_errors determines whether it's required to be entirely numeric, or * just its prefix. Leading whitespace is allowed. * * The function returns 0 if the string did not contain a valid number; IS_LONG * if it contained a number that fits within the range of a long; or IS_DOUBLE * if the number was out of long range or contained a decimal point/exponent. * The number's value is returned into the respective pointer, *lval or *dval, * if that pointer is not NULL. */ static inline zend_uchar is_numeric_string(const char *str, int length, long *lval, double *dval, int allow_errors) { const char *ptr; int base = 10, digits = 0, dp_or_e = 0; double local_dval; zend_uchar type; if (!length) { return 0; } /* Skip any whitespace * This is much faster than the isspace() function */ while (*str == ' ' || *str == '\t' || *str == '\n' || *str == '\r' || *str == '\v' || *str == '\f') { str++; length--; } ptr = str; if (*ptr == '-' || *ptr == '+') { ptr++; } if (ZEND_IS_DIGIT(*ptr)) { /* Handle hex numbers * str is used instead of ptr to disallow signs and keep old behavior */ if (length > 2 && *str == '0' && (str[1] == 'x' || str[1] == 'X')) { base = 16; ptr += 2; } /* Skip any leading 0s */ while (*ptr == '0') { ptr++; } /* Count the number of digits. If a decimal point/exponent is found, * it's a double. Otherwise, if there's a dval or no need to check for * a full match, stop when there are too many digits for a long */ for (type = IS_LONG; !(digits >= MAX_LENGTH_OF_LONG && (dval || allow_errors == 1)); digits++, ptr++) { check_digits: if (ZEND_IS_DIGIT(*ptr) || (base == 16 && ZEND_IS_XDIGIT(*ptr))) { continue; } else if (base == 10) { if (*ptr == '.' && dp_or_e < 1) { goto process_double; } else if ((*ptr == 'e' || *ptr == 'E') && dp_or_e < 2) { const char *e = ptr + 1; if (*e == '-' || *e == '+') { ptr = e++; } if (ZEND_IS_DIGIT(*e)) { goto process_double; } } } break; } if (base == 10) { if (digits >= MAX_LENGTH_OF_LONG) { dp_or_e = -1; goto process_double; } } else if (!(digits < SIZEOF_LONG * 2 || (digits == SIZEOF_LONG * 2 && ptr[-digits] <= '7'))) { if (dval) { local_dval = zend_hex_strtod(str, (char **)&ptr); } type = IS_DOUBLE; } } else if (*ptr == '.' && ZEND_IS_DIGIT(ptr[1])) { process_double: type = IS_DOUBLE; /* If there's a dval, do the conversion; else continue checking * the digits if we need to check for a full match */ if (dval) { local_dval = zend_strtod(str, (char **)&ptr); } else if (allow_errors != 1 && dp_or_e != -1) { dp_or_e = (*ptr++ == '.') ? 1 : 2; goto check_digits; } } else { return 0; } if (ptr != str + length) { if (!allow_errors) { return 0; } if (allow_errors == -1) { zend_error(E_NOTICE, "A non well formed numeric value encountered"); } } if (type == IS_LONG) { if (digits == MAX_LENGTH_OF_LONG - 1) { int cmp = strcmp(&ptr[-digits], long_min_digits); if (!(cmp < 0 || (cmp == 0 && *str == '-'))) { if (dval) { *dval = zend_strtod(str, NULL); } return IS_DOUBLE; } } if (lval) { *lval = strtol(str, NULL, base); } return IS_LONG; } else { if (dval) { *dval = local_dval; } return IS_DOUBLE; } } static inline char * zend_memnstr(char *haystack, char *needle, int needle_len, char *end) { char *p = haystack; char ne = needle[needle_len-1]; if (needle_len == 1) { return (char *)memchr(p, *needle, (end-p)); } if (needle_len > end-haystack) { return NULL; } end -= needle_len; while (p <= end) { if ((p = (char *)memchr(p, *needle, (end-p+1))) && ne == p[needle_len-1]) { if (!memcmp(needle, p, needle_len-1)) { return p; } } if (p == NULL) { return NULL; } p++; } return NULL; } static inline void *zend_memrchr(const void *s, int c, size_t n) { register unsigned char *e; if (n <= 0) { return NULL; } for (e = (unsigned char *)s + n - 1; e >= (unsigned char *)s; e--) { if (*e == (unsigned char)c) { return (void *)e; } } return NULL; } BEGIN_EXTERN_C() ZEND_API int increment_function(zval *op1); ZEND_API int decrement_function(zval *op2); ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC); ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC); ZEND_API void convert_to_long(zval *op); ZEND_API void convert_to_double(zval *op); ZEND_API void convert_to_long_base(zval *op, int base); ZEND_API void convert_to_null(zval *op); ZEND_API void convert_to_boolean(zval *op); ZEND_API void convert_to_array(zval *op); ZEND_API void convert_to_object(zval *op); ZEND_API void multi_convert_to_long_ex(int argc, ...); ZEND_API void multi_convert_to_double_ex(int argc, ...); ZEND_API void multi_convert_to_string_ex(int argc, ...); ZEND_API int add_char_to_string(zval *result, const zval *op1, const zval *op2); ZEND_API int add_string_to_string(zval *result, const zval *op1, const zval *op2); #define convert_to_string(op) if ((op)->type != IS_STRING) { _convert_to_string((op) ZEND_FILE_LINE_CC); } ZEND_API double zend_string_to_double(const char *number, zend_uint length); ZEND_API int zval_is_true(zval *op); ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int numeric_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); #if HAVE_STRCOLL ZEND_API int string_locale_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); #endif ZEND_API void zend_str_tolower(char *str, unsigned int length); ZEND_API char *zend_str_tolower_copy(char *dest, const char *source, unsigned int length); ZEND_API char *zend_str_tolower_dup(const char *source, unsigned int length); ZEND_API int zend_binary_zval_strcmp(zval *s1, zval *s2); ZEND_API int zend_binary_zval_strncmp(zval *s1, zval *s2, zval *s3); ZEND_API int zend_binary_zval_strcasecmp(zval *s1, zval *s2); ZEND_API int zend_binary_zval_strncasecmp(zval *s1, zval *s2, zval *s3); ZEND_API int zend_binary_strcmp(const char *s1, uint len1, const char *s2, uint len2); ZEND_API int zend_binary_strncmp(const char *s1, uint len1, const char *s2, uint len2, uint length); ZEND_API int zend_binary_strcasecmp(const char *s1, uint len1, const char *s2, uint len2); ZEND_API int zend_binary_strncasecmp(const char *s1, uint len1, const char *s2, uint len2, uint length); ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2); ZEND_API void zend_compare_symbol_tables(zval *result, HashTable *ht1, HashTable *ht2 TSRMLS_DC); ZEND_API void zend_compare_arrays(zval *result, zval *a1, zval *a2 TSRMLS_DC); ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2 TSRMLS_DC); ZEND_API int zend_atoi(const char *str, int str_len); ZEND_API long zend_atol(const char *str, int str_len); ZEND_API void zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_DC); END_EXTERN_C() #define convert_to_ex_master(ppzv, lower_type, upper_type) \ if (Z_TYPE_PP(ppzv)!=IS_##upper_type) { \ SEPARATE_ZVAL_IF_NOT_REF(ppzv); \ convert_to_##lower_type(*ppzv); \ } #define convert_to_explicit_type(pzv, type) \ do { \ switch (type) { \ case IS_NULL: \ convert_to_null(pzv); \ break; \ case IS_LONG: \ convert_to_long(pzv); \ break; \ case IS_DOUBLE: \ convert_to_double(pzv); \ break; \ case IS_BOOL: \ convert_to_boolean(pzv); \ break; \ case IS_ARRAY: \ convert_to_array(pzv); \ break; \ case IS_OBJECT: \ convert_to_object(pzv); \ break; \ case IS_STRING: \ convert_to_string(pzv); \ break; \ default: \ assert(0); \ break; \ } \ } while (0); #define convert_to_explicit_type_ex(ppzv, str_type) \ if (Z_TYPE_PP(ppzv) != str_type) { \ SEPARATE_ZVAL_IF_NOT_REF(ppzv); \ convert_to_explicit_type(*ppzv, str_type); \ } #define convert_to_boolean_ex(ppzv) convert_to_ex_master(ppzv, boolean, BOOL) #define convert_to_long_ex(ppzv) convert_to_ex_master(ppzv, long, LONG) #define convert_to_double_ex(ppzv) convert_to_ex_master(ppzv, double, DOUBLE) #define convert_to_string_ex(ppzv) convert_to_ex_master(ppzv, string, STRING) #define convert_to_array_ex(ppzv) convert_to_ex_master(ppzv, array, ARRAY) #define convert_to_object_ex(ppzv) convert_to_ex_master(ppzv, object, OBJECT) #define convert_to_null_ex(ppzv) convert_to_ex_master(ppzv, null, NULL) #define convert_scalar_to_number_ex(ppzv) \ if (Z_TYPE_PP(ppzv)!=IS_LONG && Z_TYPE_PP(ppzv)!=IS_DOUBLE) { \ if (!Z_ISREF_PP(ppzv)) { \ SEPARATE_ZVAL(ppzv); \ } \ convert_scalar_to_number(*ppzv TSRMLS_CC); \ } #define Z_LVAL(zval) (zval).value.lval #define Z_BVAL(zval) ((zend_bool)(zval).value.lval) #define Z_DVAL(zval) (zval).value.dval #define Z_STRVAL(zval) (zval).value.str.val #define Z_STRLEN(zval) (zval).value.str.len #define Z_ARRVAL(zval) (zval).value.ht #define Z_OBJVAL(zval) (zval).value.obj #define Z_OBJ_HANDLE(zval) Z_OBJVAL(zval).handle #define Z_OBJ_HT(zval) Z_OBJVAL(zval).handlers #define Z_OBJCE(zval) zend_get_class_entry(&(zval) TSRMLS_CC) #define Z_OBJPROP(zval) Z_OBJ_HT((zval))->get_properties(&(zval) TSRMLS_CC) #define Z_OBJ_HANDLER(zval, hf) Z_OBJ_HT((zval))->hf #define Z_RESVAL(zval) (zval).value.lval #define Z_OBJDEBUG(zval,is_tmp) (Z_OBJ_HANDLER((zval),get_debug_info)?Z_OBJ_HANDLER((zval),get_debug_info)(&(zval),&is_tmp TSRMLS_CC):(is_tmp=0,Z_OBJ_HANDLER((zval),get_properties)?Z_OBJPROP(zval):NULL)) #define Z_LVAL_P(zval_p) Z_LVAL(*zval_p) #define Z_BVAL_P(zval_p) Z_BVAL(*zval_p) #define Z_DVAL_P(zval_p) Z_DVAL(*zval_p) #define Z_STRVAL_P(zval_p) Z_STRVAL(*zval_p) #define Z_STRLEN_P(zval_p) Z_STRLEN(*zval_p) #define Z_ARRVAL_P(zval_p) Z_ARRVAL(*zval_p) #define Z_OBJPROP_P(zval_p) Z_OBJPROP(*zval_p) #define Z_OBJCE_P(zval_p) Z_OBJCE(*zval_p) #define Z_RESVAL_P(zval_p) Z_RESVAL(*zval_p) #define Z_OBJVAL_P(zval_p) Z_OBJVAL(*zval_p) #define Z_OBJ_HANDLE_P(zval_p) Z_OBJ_HANDLE(*zval_p) #define Z_OBJ_HT_P(zval_p) Z_OBJ_HT(*zval_p) #define Z_OBJ_HANDLER_P(zval_p, h) Z_OBJ_HANDLER(*zval_p, h) #define Z_OBJDEBUG_P(zval_p,is_tmp) Z_OBJDEBUG(*zval_p,is_tmp) #define Z_LVAL_PP(zval_pp) Z_LVAL(**zval_pp) #define Z_BVAL_PP(zval_pp) Z_BVAL(**zval_pp) #define Z_DVAL_PP(zval_pp) Z_DVAL(**zval_pp) #define Z_STRVAL_PP(zval_pp) Z_STRVAL(**zval_pp) #define Z_STRLEN_PP(zval_pp) Z_STRLEN(**zval_pp) #define Z_ARRVAL_PP(zval_pp) Z_ARRVAL(**zval_pp) #define Z_OBJPROP_PP(zval_pp) Z_OBJPROP(**zval_pp) #define Z_OBJCE_PP(zval_pp) Z_OBJCE(**zval_pp) #define Z_RESVAL_PP(zval_pp) Z_RESVAL(**zval_pp) #define Z_OBJVAL_PP(zval_pp) Z_OBJVAL(**zval_pp) #define Z_OBJ_HANDLE_PP(zval_p) Z_OBJ_HANDLE(**zval_p) #define Z_OBJ_HT_PP(zval_p) Z_OBJ_HT(**zval_p) #define Z_OBJ_HANDLER_PP(zval_p, h) Z_OBJ_HANDLER(**zval_p, h) #define Z_OBJDEBUG_PP(zval_pp,is_tmp) Z_OBJDEBUG(**zval_pp,is_tmp) #define Z_TYPE(zval) (zval).type #define Z_TYPE_P(zval_p) Z_TYPE(*zval_p) #define Z_TYPE_PP(zval_pp) Z_TYPE(**zval_pp) #if HAVE_SETLOCALE && defined(ZEND_WIN32) && !defined(ZTS) && defined(_MSC_VER) && (_MSC_VER >= 1400) /* This is performance improvement of tolower() on Windows and VC2005 * Gives 10-18% on bench.php */ #define ZEND_USE_TOLOWER_L 1 #endif #ifdef ZEND_USE_TOLOWER_L ZEND_API void zend_update_current_locale(void); #else #define zend_update_current_locale() #endif #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d0d000081a40000000000000000000000014dc0f41200003d5b000000b600010002ffffffffffffffff0000002d00000000root/usr/local/include/php/Zend/zend_float.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Christian Seiler | +----------------------------------------------------------------------+ */ /* $Id: zend_float.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_FLOAT_H #define ZEND_FLOAT_H /* Define functions for FP initialization and de-initialization. */ extern ZEND_API void zend_init_fpu(TSRMLS_D); extern ZEND_API void zend_shutdown_fpu(TSRMLS_D); extern ZEND_API void zend_ensure_fpu_mode(TSRMLS_D); /* Copy of the contents of xpfpa.h (which is under public domain) See http://wiki.php.net/rfc/rounding for details. Cross Platform Floating Point Arithmetics This header file defines several platform-dependent macros that ensure equal and deterministic floating point behaviour across several platforms, compilers and architectures. The current macros are currently only used on x86 and x86_64 architectures, on every other architecture, these macros expand to NOPs. This assumes that other architectures do not have an internal precision and the operhand types define the computational precision of floating point operations. This assumption may be false, in that case, the author is interested in further details on the other platform. For further details, please visit: http://www.christian-seiler.de/projekte/fpmath/ Version: 20090317 */ /* Implementation notes: x86_64: - Since all x86_64 compilers use SSE by default, it is probably unecessary to use these macros there. We define them anyway since we are too lazy to differentiate the architecture. Also, the compiler option -mfpmath=i387 justifies this decision. General: - It would be nice if one could detect whether SSE if used for math via some funky compiler defines and if so, make the macros go to NOPs. Any ideas on how to do that? MS Visual C: - Since MSVC users tipically don't use autoconf or CMake, we will detect MSVC via compile time define. */ /* MSVC detection (MSVC people usually don't use autoconf) */ #ifdef _MSC_VER # if _MSC_VER >= 1500 /* Visual C++ 2008 or higher, supports _controlfp_s */ # define HAVE__CONTROLFP_S # else /* Visual C++ (up to 2005), supports _controlfp */ # define HAVE__CONTROLFP # endif /* MSC_VER >= 1500 */ /* Tell MSVC optimizer that we access FP environment */ # if _MSC_VER >= 1500 # pragma fenv_access (on) # endif #endif /* _MSC_VER */ #ifdef HAVE__CONTROLFP_S /* float.h defines _controlfp_s */ # include # define XPFPA_HAVE_CW 1 # define XPFPA_CW_DATATYPE \ unsigned int # define XPFPA_STORE_CW(vptr) do { \ _controlfp_s((unsigned int *)(vptr), 0, 0); \ } while (0) # define XPFPA_RESTORE_CW(vptr) do { \ unsigned int _xpfpa_fpu_cw; \ _controlfp_s(&_xpfpa_fpu_cw, *((unsigned int *)(vptr)), _MCW_PC); \ } while (0) # define XPFPA_DECLARE \ unsigned int _xpfpa_fpu_oldcw, _xpfpa_fpu_cw; # define XPFPA_SWITCH_DOUBLE() do { \ _controlfp_s(&_xpfpa_fpu_cw, 0, 0); \ _xpfpa_fpu_oldcw = _xpfpa_fpu_cw; \ _controlfp_s(&_xpfpa_fpu_cw, _PC_53, _MCW_PC); \ } while (0) # define XPFPA_SWITCH_SINGLE() do { \ _controlfp_s(&_xpfpa_fpu_cw, 0, 0); \ _xpfpa_fpu_oldcw = _xpfpa_fpu_cw; \ _controlfp_s(&_xpfpa_fpu_cw, _PC_24, _MCW_PC); \ } while (0) /* NOTE: This only sets internal precision. MSVC does NOT support double- extended precision! */ # define XPFPA_SWITCH_DOUBLE_EXTENDED() do { \ _controlfp_s(&_xpfpa_fpu_cw, 0, 0); \ _xpfpa_fpu_oldcw = _xpfpa_fpu_cw; \ _controlfp_s(&_xpfpa_fpu_cw, _PC_64, _MCW_PC); \ } while (0) # define XPFPA_RESTORE() \ _controlfp_s(&_xpfpa_fpu_cw, _xpfpa_fpu_oldcw, _MCW_PC) /* We do NOT use the volatile return trick since _controlfp_s is a function call and thus FP registers are saved in memory anyway. However, we do use a variable to ensure that the expression passed into val will be evaluated *before* switching back contexts. */ # define XPFPA_RETURN_DOUBLE(val) \ do { \ double _xpfpa_result = (val); \ XPFPA_RESTORE(); \ return _xpfpa_result; \ } while (0) # define XPFPA_RETURN_SINGLE(val) \ do { \ float _xpfpa_result = (val); \ XPFPA_RESTORE(); \ return _xpfpa_result; \ } while (0) /* This won't work, but we add a macro for it anyway. */ # define XPFPA_RETURN_DOUBLE_EXTENDED(val) \ do { \ long double _xpfpa_result = (val); \ XPFPA_RESTORE(); \ return _xpfpa_result; \ } while (0) #elif defined(HAVE__CONTROLFP) /* float.h defines _controlfp */ # include # define XPFPA_DECLARE \ unsigned int _xpfpa_fpu_oldcw; # define XPFPA_HAVE_CW 1 # define XPFPA_CW_DATATYPE \ unsigned int # define XPFPA_STORE_CW(vptr) do { \ *((unsigned int *)(vptr)) = _controlfp(0, 0); \ } while (0) # define XPFPA_RESTORE_CW(vptr) do { \ _controlfp(*((unsigned int *)(vptr)), _MCW_PC); \ } while (0) # define XPFPA_SWITCH_DOUBLE() do { \ _xpfpa_fpu_oldcw = _controlfp(0, 0); \ _controlfp(_PC_53, _MCW_PC); \ } while (0) # define XPFPA_SWITCH_SINGLE() do { \ _xpfpa_fpu_oldcw = _controlfp(0, 0); \ _controlfp(_PC_24, _MCW_PC); \ } while (0) /* NOTE: This will only work as expected on MinGW. */ # define XPFPA_SWITCH_DOUBLE_EXTENDED() do { \ _xpfpa_fpu_oldcw = _controlfp(0, 0); \ _controlfp(_PC_64, _MCW_PC); \ } while (0) # define XPFPA_RESTORE() \ _controlfp(_xpfpa_fpu_oldcw, _MCW_PC) /* We do NOT use the volatile return trick since _controlfp is a function call and thus FP registers are saved in memory anyway. However, we do use a variable to ensure that the expression passed into val will be evaluated *before* switching back contexts. */ # define XPFPA_RETURN_DOUBLE(val) \ do { \ double _xpfpa_result = (val); \ XPFPA_RESTORE(); \ return _xpfpa_result; \ } while (0) # define XPFPA_RETURN_SINGLE(val) \ do { \ float _xpfpa_result = (val); \ XPFPA_RESTORE(); \ return _xpfpa_result; \ } while (0) /* This will only work on MinGW */ # define XPFPA_RETURN_DOUBLE_EXTENDED(val) \ do { \ long double _xpfpa_result = (val); \ XPFPA_RESTORE(); \ return _xpfpa_result; \ } while (0) #elif defined(HAVE__FPU_SETCW) /* glibc systems */ /* fpu_control.h defines _FPU_[GS]ETCW */ # include # define XPFPA_DECLARE \ fpu_control_t _xpfpa_fpu_oldcw, _xpfpa_fpu_cw; # define XPFPA_HAVE_CW 1 # define XPFPA_CW_DATATYPE \ fpu_control_t # define XPFPA_STORE_CW(vptr) do { \ _FPU_GETCW((*((fpu_control_t *)(vptr)))); \ } while (0) # define XPFPA_RESTORE_CW(vptr) do { \ _FPU_SETCW((*((fpu_control_t *)(vptr)))); \ } while (0) # define XPFPA_SWITCH_DOUBLE() do { \ _FPU_GETCW(_xpfpa_fpu_oldcw); \ _xpfpa_fpu_cw = (_xpfpa_fpu_oldcw & ~_FPU_EXTENDED & ~_FPU_SINGLE) | _FPU_DOUBLE; \ _FPU_SETCW(_xpfpa_fpu_cw); \ } while (0) # define XPFPA_SWITCH_SINGLE() do { \ _FPU_GETCW(_xpfpa_fpu_oldcw); \ _xpfpa_fpu_cw = (_xpfpa_fpu_oldcw & ~_FPU_EXTENDED & ~_FPU_DOUBLE) | _FPU_SINGLE; \ _FPU_SETCW(_xpfpa_fpu_cw); \ } while (0) # define XPFPA_SWITCH_DOUBLE_EXTENDED() do { \ _FPU_GETCW(_xpfpa_fpu_oldcw); \ _xpfpa_fpu_cw = (_xpfpa_fpu_oldcw & ~_FPU_SINGLE & ~_FPU_DOUBLE) | _FPU_EXTENDED; \ _FPU_SETCW(_xpfpa_fpu_cw); \ } while (0) # define XPFPA_RESTORE() \ _FPU_SETCW(_xpfpa_fpu_oldcw) /* We use a temporary volatile variable (in a new block) in order to ensure that the optimizer does not mis-optimize the instructions. Also, a volatile variable ensures truncation to correct precision. */ # define XPFPA_RETURN_DOUBLE(val) \ do { \ volatile double _xpfpa_result = (val); \ XPFPA_RESTORE(); \ return _xpfpa_result; \ } while (0) # define XPFPA_RETURN_SINGLE(val) \ do { \ volatile float _xpfpa_result = (val); \ XPFPA_RESTORE(); \ return _xpfpa_result; \ } while (0) # define XPFPA_RETURN_DOUBLE_EXTENDED(val) \ do { \ volatile long double _xpfpa_result = (val); \ XPFPA_RESTORE(); \ return _xpfpa_result; \ } while (0) #elif defined(HAVE_FPSETPREC) /* FreeBSD */ /* fpu_control.h defines _FPU_[GS]ETCW */ # include # define XPFPA_DECLARE \ fp_prec_t _xpfpa_fpu_oldprec; # define XPFPA_HAVE_CW 1 # define XPFPA_CW_DATATYPE \ fp_prec_t # define XPFPA_STORE_CW(vptr) do { \ *((fp_prec_t *)(vptr)) = fpgetprec(); \ } while (0) # define XPFPA_RESTORE_CW(vptr) do { \ fpsetprec(*((fp_prec_t *)(vptr))); \ } while (0) # define XPFPA_SWITCH_DOUBLE() do { \ _xpfpa_fpu_oldprec = fpgetprec(); \ fpsetprec(FP_PD); \ } while (0) # define XPFPA_SWITCH_SINGLE() do { \ _xpfpa_fpu_oldprec = fpgetprec(); \ fpsetprec(FP_PS); \ } while (0) # define XPFPA_SWITCH_DOUBLE_EXTENDED() do { \ _xpfpa_fpu_oldprec = fpgetprec(); \ fpsetprec(FP_PE); \ } while (0) # define XPFPA_RESTORE() \ fpsetprec(_xpfpa_fpu_oldprec) /* We use a temporary volatile variable (in a new block) in order to ensure that the optimizer does not mis-optimize the instructions. Also, a volatile variable ensures truncation to correct precision. */ # define XPFPA_RETURN_DOUBLE(val) \ do { \ volatile double _xpfpa_result = (val); \ XPFPA_RESTORE(); \ return _xpfpa_result; \ } while (0) # define XPFPA_RETURN_SINGLE(val) \ do { \ volatile float _xpfpa_result = (val); \ XPFPA_RESTORE(); \ return _xpfpa_result; \ } while (0) # define XPFPA_RETURN_DOUBLE_EXTENDED(val) \ do { \ volatile long double _xpfpa_result = (val); \ XPFPA_RESTORE(); \ return _xpfpa_result; \ } while (0) #elif defined(HAVE_FPU_INLINE_ASM_X86) /* Custom x86 inline assembler implementation. This implementation does not use predefined wrappers of the OS / compiler but rather uses x86/x87 inline assembler directly. Basic instructions: fnstcw - Store the FPU control word in a variable fldcw - Load the FPU control word from a variable Bits (only bits 8 and 9 are relevant, bits 0 to 7 are for other things): 0x0yy: Single precision 0x1yy: Reserved 0x2yy: Double precision 0x3yy: Double-extended precision We use an unsigned int for the datatype. glibc sources add __mode__ (__HI__) attribute to it (HI stands for half-integer according to docs). It is unclear what the does exactly and how portable it is. The assembly syntax works with GNU CC, Intel CC and Sun CC. */ # define XPFPA_DECLARE \ unsigned int _xpfpa_fpu_oldcw, _xpfpa_fpu_cw; # define XPFPA_HAVE_CW 1 # define XPFPA_CW_DATATYPE \ unsigned int # define XPFPA_STORE_CW(vptr) do { \ __asm__ __volatile__ ("fnstcw %0" : "=m" (*((unsigned int *)(vptr)))); \ } while (0) # define XPFPA_RESTORE_CW(vptr) do { \ __asm__ __volatile__ ("fldcw %0" : : "m" (*((unsigned int *)(vptr)))); \ } while (0) # define XPFPA_SWITCH_DOUBLE() do { \ __asm__ __volatile__ ("fnstcw %0" : "=m" (*&_xpfpa_fpu_oldcw)); \ _xpfpa_fpu_cw = (_xpfpa_fpu_oldcw & ~0x100) | 0x200; \ __asm__ __volatile__ ("fldcw %0" : : "m" (*&_xpfpa_fpu_cw)); \ } while (0) # define XPFPA_SWITCH_SINGLE() do { \ __asm__ __volatile__ ("fnstcw %0" : "=m" (*&_xpfpa_fpu_oldcw)); \ _xpfpa_fpu_cw = (_xpfpa_fpu_oldcw & ~0x300); \ __asm__ __volatile__ ("fldcw %0" : : "m" (*&_xpfpa_fpu_cw)); \ } while (0) # define XPFPA_SWITCH_DOUBLE_EXTENDED() do { \ __asm__ __volatile__ ("fnstcw %0" : "=m" (*&_xpfpa_fpu_oldcw)); \ _xpfpa_fpu_cw = _xpfpa_fpu_oldcw | 0x300; \ __asm__ __volatile__ ("fldcw %0" : : "m" (*&_xpfpa_fpu_cw)); \ } while (0) # define XPFPA_RESTORE() \ __asm__ __volatile__ ("fldcw %0" : : "m" (*&_xpfpa_fpu_oldcw)) /* We use a temporary volatile variable (in a new block) in order to ensure that the optimizer does not mis-optimize the instructions. Also, a volatile variable ensures truncation to correct precision. */ # define XPFPA_RETURN_DOUBLE(val) \ do { \ volatile double _xpfpa_result = (val); \ XPFPA_RESTORE(); \ return _xpfpa_result; \ } while (0) # define XPFPA_RETURN_SINGLE(val) \ do { \ volatile float _xpfpa_result = (val); \ XPFPA_RESTORE(); \ return _xpfpa_result; \ } while (0) # define XPFPA_RETURN_DOUBLE_EXTENDED(val) \ do { \ volatile long double _xpfpa_result = (val); \ XPFPA_RESTORE(); \ return _xpfpa_result; \ } while (0) #else /* FPU CONTROL */ /* This is either not an x87 FPU or the inline assembly syntax was not recognized. In any case, default to NOPs for the macros and hope the generated code will behave as planned. */ # define XPFPA_DECLARE /* NOP */ # define XPFPA_HAVE_CW 0 # define XPFPA_CW_DATATYPE unsigned int # define XPFPA_STORE_CW(variable) /* NOP */ # define XPFPA_RESTORE_CW(variable) /* NOP */ # define XPFPA_SWITCH_DOUBLE() /* NOP */ # define XPFPA_SWITCH_SINGLE() /* NOP */ # define XPFPA_SWITCH_DOUBLE_EXTENDED() /* NOP */ # define XPFPA_RESTORE() /* NOP */ # define XPFPA_RETURN_DOUBLE(val) return (val) # define XPFPA_RETURN_SINGLE(val) return (val) # define XPFPA_RETURN_DOUBLE_EXTENDED(val) return (val) #endif /* FPU CONTROL */ #endif 07070100180d0f000081a40000000000000000000000014dc0f41200001cb2000000b600010002ffffffffffffffff0000002f00000000root/usr/local/include/php/Zend/zend_globals.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_globals.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_GLOBALS_H #define ZEND_GLOBALS_H #include #include "zend_globals_macros.h" #include "zend_stack.h" #include "zend_ptr_stack.h" #include "zend_hash.h" #include "zend_llist.h" #include "zend_objects.h" #include "zend_objects_API.h" #include "zend_modules.h" #ifdef ZEND_MULTIBYTE #include "zend_multibyte.h" #endif /* ZEND_MULTIBYTE */ /* Define ZTS if you want a thread-safe Zend */ /*#undef ZTS*/ #ifdef ZTS BEGIN_EXTERN_C() ZEND_API extern int compiler_globals_id; ZEND_API extern int executor_globals_id; END_EXTERN_C() #endif #define SYMTABLE_CACHE_SIZE 32 #include "zend_compile.h" /* excpt.h on Digital Unix 4.0 defines function_table */ #undef function_table #define ZEND_EARLY_BINDING_COMPILE_TIME 0 #define ZEND_EARLY_BINDING_DELAYED 1 #define ZEND_EARLY_BINDING_DELAYED_ALL 2 typedef struct _zend_declarables { zval ticks; } zend_declarables; typedef struct _zend_vm_stack *zend_vm_stack; struct _zend_compiler_globals { zend_stack bp_stack; zend_stack switch_cond_stack; zend_stack foreach_copy_stack; zend_stack object_stack; zend_stack declare_stack; zend_class_entry *active_class_entry; /* variables for list() compilation */ zend_llist list_llist; zend_llist dimension_llist; zend_stack list_stack; zend_stack function_call_stack; char *compiled_filename; int zend_lineno; char *heredoc; int heredoc_len; zend_op_array *active_op_array; HashTable *function_table; /* function symbol table */ HashTable *class_table; /* class table */ HashTable filenames_table; HashTable *auto_globals; zend_bool in_compilation; zend_bool short_tags; zend_bool asp_tags; zend_bool allow_call_time_pass_reference; zend_declarables declarables; zend_bool unclean_shutdown; zend_bool ini_parser_unbuffered_errors; zend_llist open_files; long catch_begin; struct _zend_ini_parser_param *ini_parser_param; int interactive; zend_uint start_lineno; zend_bool increment_lineno; znode implementing_class; zend_uint access_type; char *doc_comment; zend_uint doc_comment_len; zend_uint compiler_options; /* set of ZEND_COMPILE_* constants */ zval *current_namespace; HashTable *current_import; zend_bool in_namespace; zend_bool has_bracketed_namespaces; HashTable *labels; zend_stack labels_stack; #ifdef ZEND_MULTIBYTE zend_encoding **script_encoding_list; size_t script_encoding_list_size; zend_bool detect_unicode; zend_bool encoding_declared; zend_encoding *internal_encoding; /* multibyte utility functions */ zend_encoding_detector encoding_detector; zend_encoding_converter encoding_converter; zend_encoding_oddlen encoding_oddlen; #endif /* ZEND_MULTIBYTE */ #ifdef ZTS HashTable **static_members; int last_static_member; #endif }; struct _zend_executor_globals { zval **return_value_ptr_ptr; zval uninitialized_zval; zval *uninitialized_zval_ptr; zval error_zval; zval *error_zval_ptr; zend_ptr_stack arg_types_stack; /* symbol table cache */ HashTable *symtable_cache[SYMTABLE_CACHE_SIZE]; HashTable **symtable_cache_limit; HashTable **symtable_cache_ptr; zend_op **opline_ptr; HashTable *active_symbol_table; HashTable symbol_table; /* main symbol table */ HashTable included_files; /* files already included */ JMP_BUF *bailout; int error_reporting; int orig_error_reporting; int exit_status; zend_op_array *active_op_array; HashTable *function_table; /* function symbol table */ HashTable *class_table; /* class table */ HashTable *zend_constants; /* constants table */ zend_class_entry *scope; zend_class_entry *called_scope; /* Scope of the calling class */ zval *This; long precision; int ticks_count; zend_bool in_execution; HashTable *in_autoload; zend_function *autoload_func; zend_bool full_tables_cleanup; /* for extended information support */ zend_bool no_extensions; #ifdef ZEND_WIN32 zend_bool timed_out; OSVERSIONINFOEX windows_version_info; #endif HashTable regular_list; HashTable persistent_list; zend_vm_stack argument_stack; int user_error_handler_error_reporting; zval *user_error_handler; zval *user_exception_handler; zend_stack user_error_handlers_error_reporting; zend_ptr_stack user_error_handlers; zend_ptr_stack user_exception_handlers; zend_error_handling_t error_handling; zend_class_entry *exception_class; /* timeout support */ int timeout_seconds; int lambda_count; HashTable *ini_directives; HashTable *modified_ini_directives; zend_objects_store objects_store; zval *exception, *prev_exception; zend_op *opline_before_exception; zend_op exception_op[3]; struct _zend_execute_data *current_execute_data; struct _zend_module_entry *current_module; zend_property_info std_property_info; zend_bool active; void *saved_fpu_cw; void *reserved[ZEND_MAX_RESERVED_RESOURCES]; }; struct _zend_ini_scanner_globals { zend_file_handle *yy_in; zend_file_handle *yy_out; unsigned int yy_leng; unsigned char *yy_start; unsigned char *yy_text; unsigned char *yy_cursor; unsigned char *yy_marker; unsigned char *yy_limit; int yy_state; zend_stack state_stack; char *filename; int lineno; /* Modes are: ZEND_INI_SCANNER_NORMAL, ZEND_INI_SCANNER_RAW */ int scanner_mode; }; struct _zend_php_scanner_globals { zend_file_handle *yy_in; zend_file_handle *yy_out; unsigned int yy_leng; unsigned char *yy_start; unsigned char *yy_text; unsigned char *yy_cursor; unsigned char *yy_marker; unsigned char *yy_limit; int yy_state; zend_stack state_stack; #ifdef ZEND_MULTIBYTE /* original (unfiltered) script */ unsigned char *script_org; size_t script_org_size; /* filtered script */ unsigned char *script_filtered; size_t script_filtered_size; /* input/ouput filters */ zend_encoding_filter input_filter; zend_encoding_filter output_filter; zend_encoding *script_encoding; zend_encoding *internal_encoding; #endif /* ZEND_MULTIBYTE */ }; #endif /* ZEND_GLOBALS_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d0b000081a40000000000000000000000014dc0f41200001237000000b600010002ffffffffffffffff0000003200000000root/usr/local/include/php/Zend/zend_extensions.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_extensions.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_EXTENSIONS_H #define ZEND_EXTENSIONS_H #include "zend_compile.h" #include "zend_build.h" /* The first number is the engine version and the rest is the date. * This way engine 2/3 API no. is always greater than engine 1 API no.. */ #define ZEND_EXTENSION_API_NO 220090626 typedef struct _zend_extension_version_info { int zend_extension_api_no; char *build_id; } zend_extension_version_info; #define ZEND_EXTENSION_BUILD_ID "API" ZEND_TOSTR(ZEND_EXTENSION_API_NO) ZEND_BUILD_TS ZEND_BUILD_DEBUG ZEND_BUILD_SYSTEM ZEND_BUILD_EXTRA typedef struct _zend_extension zend_extension; /* Typedef's for zend_extension function pointers */ typedef int (*startup_func_t)(zend_extension *extension); typedef void (*shutdown_func_t)(zend_extension *extension); typedef void (*activate_func_t)(void); typedef void (*deactivate_func_t)(void); typedef void (*message_handler_func_t)(int message, void *arg); typedef void (*op_array_handler_func_t)(zend_op_array *op_array); typedef void (*statement_handler_func_t)(zend_op_array *op_array); typedef void (*fcall_begin_handler_func_t)(zend_op_array *op_array); typedef void (*fcall_end_handler_func_t)(zend_op_array *op_array); typedef void (*op_array_ctor_func_t)(zend_op_array *op_array); typedef void (*op_array_dtor_func_t)(zend_op_array *op_array); struct _zend_extension { char *name; char *version; char *author; char *URL; char *copyright; startup_func_t startup; shutdown_func_t shutdown; activate_func_t activate; deactivate_func_t deactivate; message_handler_func_t message_handler; op_array_handler_func_t op_array_handler; statement_handler_func_t statement_handler; fcall_begin_handler_func_t fcall_begin_handler; fcall_end_handler_func_t fcall_end_handler; op_array_ctor_func_t op_array_ctor; op_array_dtor_func_t op_array_dtor; int (*api_no_check)(int api_no); int (*build_id_check)(const char* build_id); void *reserved3; void *reserved4; void *reserved5; void *reserved6; void *reserved7; void *reserved8; DL_HANDLE handle; int resource_number; }; BEGIN_EXTERN_C() ZEND_API int zend_get_resource_handle(zend_extension *extension); ZEND_API void zend_extension_dispatch_message(int message, void *arg); END_EXTERN_C() #define ZEND_EXTMSG_NEW_EXTENSION 1 #define ZEND_EXTENSION() \ ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, ZEND_EXTENSION_BUILD_ID } #define STANDARD_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1 #define COMPAT_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1 #define BUILD_COMPAT_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1 ZEND_API extern zend_llist zend_extensions; void zend_extension_dtor(zend_extension *extension); void zend_append_version_info(const zend_extension *extension); int zend_startup_extensions_mechanism(void); int zend_startup_extensions(void); void zend_shutdown_extensions(TSRMLS_D); BEGIN_EXTERN_C() ZEND_API int zend_load_extension(const char *path); ZEND_API int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle); ZEND_API zend_extension *zend_get_extension(const char *extension_name); END_EXTERN_C() #endif /* ZEND_EXTENSIONS_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d30000081a40000000000000000000000014dc0f4120000059b000000b600010002ffffffffffffffff0000002a00000000root/usr/local/include/php/Zend/zend_vm.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Dmitry Stogov | +----------------------------------------------------------------------+ */ /* $Id: zend_vm.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_VM_H #define ZEND_VM_H ZEND_API void zend_vm_use_old_executor(void); ZEND_API void zend_vm_set_opcode_handler(zend_op* opcode); #define ZEND_VM_SET_OPCODE_HANDLER(opline) zend_vm_set_opcode_handler(opline) #endif 07070100180d05000081a40000000000000000000000014dc0f41200000c35000000b600010002ffffffffffffffff0000003200000000root/usr/local/include/php/Zend/zend_config.w32.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_config.w32.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_CONFIG_W32_H #define ZEND_CONFIG_W32_H #include <../main/config.w32.h> #define _CRTDBG_MAP_ALLOC #include #include #include #include #ifndef ZEND_INCLUDE_FULL_WINDOWS_HEADERS #define WIN32_LEAN_AND_MEAN #endif #include #include #include typedef unsigned long ulong; typedef unsigned int uint; #define HAVE_STDIOSTR_H 1 #define HAVE_CLASS_ISTDIOSTREAM #define istdiostream stdiostream #define snprintf _snprintf #if _MSC_VER < 1500 #define vsnprintf _vsnprintf #endif #define strcasecmp(s1, s2) stricmp(s1, s2) #define strncasecmp(s1, s2, n) strnicmp(s1, s2, n) #define zend_isinf(a) ((_fpclass(a) == _FPCLASS_PINF) || (_fpclass(a) == _FPCLASS_NINF)) #define zend_finite(x) _finite(x) #define zend_isnan(x) _isnan(x) #define zend_sprintf sprintf /* This will cause the compilation process to be MUCH longer, but will generate * a much quicker PHP binary */ #undef inline #ifdef ZEND_WIN32_FORCE_INLINE # define inline __forceinline #else # define inline #endif #ifdef LIBZEND_EXPORTS # define ZEND_API __declspec(dllexport) #else # define ZEND_API __declspec(dllimport) #endif #define ZEND_DLEXPORT __declspec(dllexport) #define ZEND_DLIMPORT __declspec(dllimport) /* 0x00200000L is MB_SERVICE_NOTIFICATION, which is only supported under Windows NT * (and requires _WIN32_WINNT to be defined, which prevents the resulting executable * from running under Windows 9x * Windows 9x should silently ignore it, so it's being used here directly */ #ifndef MB_SERVICE_NOTIFICATION #define MB_SERVICE_NOTIFICATION 0x00200000L #endif #define ZEND_SERVICE_MB_STYLE (MB_TOPMOST|MB_SERVICE_NOTIFICATION) #endif /* ZEND_CONFIG_W32_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d15000081a40000000000000000000000014dc0f41200000a87000000b600010002ffffffffffffffff0000003200000000root/usr/local/include/php/Zend/zend_ini_parser.h/* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton interface for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { TC_SECTION = 258, TC_RAW = 259, TC_CONSTANT = 260, TC_NUMBER = 261, TC_STRING = 262, TC_WHITESPACE = 263, TC_LABEL = 264, TC_OFFSET = 265, TC_DOLLAR_CURLY = 266, TC_VARNAME = 267, TC_QUOTED_STRING = 268, BOOL_TRUE = 269, BOOL_FALSE = 270, END_OF_LINE = 271 }; #endif /* Tokens. */ #define TC_SECTION 258 #define TC_RAW 259 #define TC_CONSTANT 260 #define TC_NUMBER 261 #define TC_STRING 262 #define TC_WHITESPACE 263 #define TC_LABEL 264 #define TC_OFFSET 265 #define TC_DOLLAR_CURLY 266 #define TC_VARNAME 267 #define TC_QUOTED_STRING 268 #define BOOL_TRUE 269 #define BOOL_FALSE 270 #define END_OF_LINE 271 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif 07070100180d2b000081a40000000000000000000000014dc0f41200000bb9000000b600010002ffffffffffffffff0000002e00000000root/usr/local/include/php/Zend/zend_stream.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Wez Furlong | | Scott MacVicar | | Nuno Lopes | | Marcus Boerger | +----------------------------------------------------------------------+ */ /* $Id: zend_stream.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_STREAM_H #define ZEND_STREAM_H /* Lightweight stream implementation for the ZE scanners. * These functions are private to the engine. * */ typedef size_t (*zend_stream_fsizer_t)(void* handle TSRMLS_DC); typedef size_t (*zend_stream_reader_t)(void* handle, char *buf, size_t len TSRMLS_DC); typedef void (*zend_stream_closer_t)(void* handle TSRMLS_DC); #define ZEND_MMAP_AHEAD 32 typedef enum { ZEND_HANDLE_FILENAME, ZEND_HANDLE_FD, ZEND_HANDLE_FP, ZEND_HANDLE_STREAM, ZEND_HANDLE_MAPPED } zend_stream_type; typedef struct _zend_mmap { size_t len; size_t pos; void *map; char *buf; void *old_handle; zend_stream_closer_t old_closer; } zend_mmap; typedef struct _zend_stream { void *handle; int isatty; zend_mmap mmap; zend_stream_reader_t reader; zend_stream_fsizer_t fsizer; zend_stream_closer_t closer; } zend_stream; typedef struct _zend_file_handle { zend_stream_type type; char *filename; char *opened_path; union { int fd; FILE *fp; zend_stream stream; } handle; zend_bool free_filename; } zend_file_handle; BEGIN_EXTERN_C() ZEND_API int zend_stream_open(const char *filename, zend_file_handle *handle TSRMLS_DC); ZEND_API int zend_stream_fixup(zend_file_handle *file_handle, char **buf, size_t *len TSRMLS_DC); ZEND_API void zend_file_handle_dtor(zend_file_handle *fh TSRMLS_DC); ZEND_API int zend_compare_file_handles(zend_file_handle *fh1, zend_file_handle *fh2); END_EXTERN_C() #endif 07070100180d2c000081a40000000000000000000000014dc0f41200000725000000b600010002ffffffffffffffff0000002e00000000root/usr/local/include/php/Zend/zend_strtod.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Derick Rethans | +----------------------------------------------------------------------+ */ /* $Id: zend_strtod.h 306939 2011-01-01 02:19:59Z felipe $ */ /* This is a header file for the strtod implementation by David M. Gay which * can be found in zend_strtod.c */ #ifndef ZEND_STRTOD_H #define ZEND_STRTOD_H #include BEGIN_EXTERN_C() ZEND_API void zend_freedtoa(char *s); ZEND_API char * zend_dtoa(double _d, int mode, int ndigits, int *decpt, int *sign, char **rve); ZEND_API double zend_strtod(const char *s00, char **se); ZEND_API double zend_hex_strtod(const char *str, char **endptr); ZEND_API double zend_oct_strtod(const char *str, char **endptr); ZEND_API int zend_startup_strtod(void); ZEND_API int zend_shutdown_strtod(void); END_EXTERN_C() #endif 07070100180d27000081a40000000000000000000000014dc0f41200001027000000b600010002ffffffffffffffff0000003100000000root/usr/local/include/php/Zend/zend_ptr_stack.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_ptr_stack.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_PTR_STACK_H #define ZEND_PTR_STACK_H typedef struct _zend_ptr_stack { int top, max; void **elements; void **top_element; zend_bool persistent; } zend_ptr_stack; #define PTR_STACK_BLOCK_SIZE 64 BEGIN_EXTERN_C() ZEND_API void zend_ptr_stack_init(zend_ptr_stack *stack); ZEND_API void zend_ptr_stack_init_ex(zend_ptr_stack *stack, zend_bool persistent); ZEND_API void zend_ptr_stack_n_push(zend_ptr_stack *stack, int count, ...); ZEND_API void zend_ptr_stack_n_pop(zend_ptr_stack *stack, int count, ...); ZEND_API void zend_ptr_stack_destroy(zend_ptr_stack *stack); ZEND_API void zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *)); ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), zend_bool free_elements); ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack); END_EXTERN_C() #define ZEND_PTR_STACK_RESIZE_IF_NEEDED(stack, count) \ if (stack->top+count > stack->max) { \ /* we need to allocate more memory */ \ stack->max *= 2; \ stack->max += count; \ stack->elements = (void **) perealloc(stack->elements, (sizeof(void *) * (stack->max)), stack->persistent); \ stack->top_element = stack->elements+stack->top; \ } /* Not doing this with a macro because of the loop unrolling in the element assignment. Just using a macro for 3 in the body for readability sake. */ static inline void zend_ptr_stack_3_push(zend_ptr_stack *stack, void *a, void *b, void *c) { #define ZEND_PTR_STACK_NUM_ARGS 3 ZEND_PTR_STACK_RESIZE_IF_NEEDED(stack, ZEND_PTR_STACK_NUM_ARGS) stack->top += ZEND_PTR_STACK_NUM_ARGS; *(stack->top_element++) = a; *(stack->top_element++) = b; *(stack->top_element++) = c; #undef ZEND_PTR_STACK_NUM_ARGS } static inline void zend_ptr_stack_2_push(zend_ptr_stack *stack, void *a, void *b) { #define ZEND_PTR_STACK_NUM_ARGS 2 ZEND_PTR_STACK_RESIZE_IF_NEEDED(stack, ZEND_PTR_STACK_NUM_ARGS) stack->top += ZEND_PTR_STACK_NUM_ARGS; *(stack->top_element++) = a; *(stack->top_element++) = b; #undef ZEND_PTR_STACK_NUM_ARGS } static inline void zend_ptr_stack_3_pop(zend_ptr_stack *stack, void **a, void **b, void **c) { *a = *(--stack->top_element); *b = *(--stack->top_element); *c = *(--stack->top_element); stack->top -= 3; } static inline void zend_ptr_stack_2_pop(zend_ptr_stack *stack, void **a, void **b) { *a = *(--stack->top_element); *b = *(--stack->top_element); stack->top -= 2; } static inline void zend_ptr_stack_push(zend_ptr_stack *stack, void *ptr) { ZEND_PTR_STACK_RESIZE_IF_NEEDED(stack, 1) stack->top++; *(stack->top_element++) = ptr; } static inline void *zend_ptr_stack_pop(zend_ptr_stack *stack) { stack->top--; return *(--stack->top_element); } #endif /* ZEND_PTR_STACK_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d04000081a40000000000000000000000014dc0f412000009fc000000b600010002ffffffffffffffff0000003100000000root/usr/local/include/php/Zend/zend_config.nw.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend_config.nw.h 306939 2011-01-01 02:19:59Z felipe $ */ #ifndef ZEND_CONFIG_NW_H #define ZEND_CONFIG_NW_H #include #include typedef unsigned long ulong; typedef unsigned int uint; #define HAVE_ALLOCA 1 #define HAVE_LIMITS_H 1 /* #include */ #define HAVE_STRING_H 1 #define HAVE_SYS_SELECT_H 1 #define HAVE_STDLIB_H 1 #undef HAVE_KILL #define HAVE_GETPID 1 /* #define HAVE_ALLOCA_H 1 */ #define HAVE_MEMCPY 1 #define HAVE_STRDUP 1 #define HAVE_SYS_TYPES_H 1 /* #define HAVE_STDIOSTR_H 1 */ #define HAVE_CLASS_ISTDIOSTREAM #define istdiostream stdiostream #define HAVE_STDARG_H 1 #define HAVE_DLFCN_H 1 /* #define HAVE_LIBDL 1 */ #define HAVE_SNPRINTF 1 #define HAVE_VSNPRINTF 1 /* #define snprintf _snprintf #define vsnprintf _vsnprintf #define zend_isinf(a) 0 #define zend_finite(x) _finite(x) #define zend_isnan(x) _isnan(x) */ #define zend_sprintf sprintf /* This will cause the compilation process to be MUCH longer, but will generate * a much quicker PHP binary */ /* #undef inline #ifdef ZEND_WIN32_FORCE_INLINE # define inline __forceinline #else # define inline #endif */ /* #define zend_finite(A) _finite(A) #define zend_isnan(A) _isnan(A) */ #endif /* ZEND_CONFIG_NW_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180cfc000081a40000000000000000000000014dc0f4120000600d000000b600010002ffffffffffffffff0000002700000000root/usr/local/include/php/Zend/zend.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2011 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | +----------------------------------------------------------------------+ */ /* $Id: zend.h 307522 2011-01-16 20:39:22Z stas $ */ #ifndef ZEND_H #define ZEND_H #define ZEND_VERSION "2.3.0" #define ZEND_ENGINE_2 #ifdef __cplusplus #define BEGIN_EXTERN_C() extern "C" { #define END_EXTERN_C() } #else #define BEGIN_EXTERN_C() #define END_EXTERN_C() #endif /* * general definitions */ #ifdef ZEND_WIN32 # include "zend_config.w32.h" # define ZEND_PATHS_SEPARATOR ';' #elif defined(NETWARE) # include # define ZEND_PATHS_SEPARATOR ';' #elif defined(__riscos__) # include # define ZEND_PATHS_SEPARATOR ';' #else # include # define ZEND_PATHS_SEPARATOR ':' #endif #ifdef ZEND_WIN32 /* Only use this macro if you know for sure that all of the switches values are covered by its case statements */ #define EMPTY_SWITCH_DEFAULT_CASE() \ default: \ __assume(0); \ break; #else #define EMPTY_SWITCH_DEFAULT_CASE() #endif /* all HAVE_XXX test have to be after the include of zend_config above */ #include #ifdef HAVE_UNIX_H # include #endif #ifdef HAVE_STDARG_H # include #endif #ifdef HAVE_DLFCN_H # include #endif #if defined(HAVE_LIBDL) && !defined(ZEND_WIN32) # ifndef RTLD_LAZY # define RTLD_LAZY 1 /* Solaris 1, FreeBSD's (2.1.7.1 and older) */ # endif # ifndef RTLD_GLOBAL # define RTLD_GLOBAL 0 # endif # if defined(RTLD_GROUP) && defined(RTLD_WORLD) && defined(RTLD_PARENT) # define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_GROUP | RTLD_WORLD | RTLD_PARENT) # elif defined(RTLD_DEEPBIND) # define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND) # else # define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL) # endif # define DL_UNLOAD dlclose # if defined(DLSYM_NEEDS_UNDERSCORE) # define DL_FETCH_SYMBOL(h,s) dlsym((h), "_" s) # else # define DL_FETCH_SYMBOL dlsym # endif # define DL_ERROR dlerror # define DL_HANDLE void * # define ZEND_EXTENSIONS_SUPPORT 1 #elif defined(ZEND_WIN32) # define DL_LOAD(libname) LoadLibrary(libname) # define DL_FETCH_SYMBOL GetProcAddress # define DL_UNLOAD FreeLibrary # define DL_HANDLE HMODULE # define ZEND_EXTENSIONS_SUPPORT 1 #else # define DL_HANDLE void * # define ZEND_EXTENSIONS_SUPPORT 0 #endif #if HAVE_ALLOCA_H && !defined(_ALLOCA_H) # include #endif /* AIX requires this to be the first thing in the file. */ #ifndef __GNUC__ # ifndef HAVE_ALLOCA_H # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif #endif /* GCC x.y.z supplies __GNUC__ = x and __GNUC_MINOR__ = y */ #ifdef __GNUC__ # define ZEND_GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) #else # define ZEND_GCC_VERSION 0 #endif #if ZEND_GCC_VERSION >= 2096 # define ZEND_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) #else # define ZEND_ATTRIBUTE_MALLOC #endif #if ZEND_GCC_VERSION >= 2007 # define ZEND_ATTRIBUTE_FORMAT(type, idx, first) __attribute__ ((format(type, idx, first))) #else # define ZEND_ATTRIBUTE_FORMAT(type, idx, first) #endif #if ZEND_GCC_VERSION >= 3001 && !defined(__INTEL_COMPILER) # define ZEND_ATTRIBUTE_PTR_FORMAT(type, idx, first) __attribute__ ((format(type, idx, first))) #else # define ZEND_ATTRIBUTE_PTR_FORMAT(type, idx, first) #endif #if ZEND_GCC_VERSION >= 3001 # define ZEND_ATTRIBUTE_DEPRECATED __attribute__((deprecated)) #elif defined(ZEND_WIN32) && defined(_MSC_VER) && _MSC_VER >= 1300 # define ZEND_ATTRIBUTE_DEPRECATED __declspec(deprecated) #else # define ZEND_ATTRIBUTE_DEPRECATED #endif #if defined(__GNUC__) && ZEND_GCC_VERSION >= 3004 && defined(__i386__) # define ZEND_FASTCALL __attribute__((fastcall)) #elif defined(_MSC_VER) && defined(_M_IX86) # define ZEND_FASTCALL __fastcall #else # define ZEND_FASTCALL #endif #if defined(__GNUC__) && ZEND_GCC_VERSION >= 3004 #else # define __restrict__ #endif #define restrict __restrict__ #if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32)) && !(defined(ZTS) && defined(NETWARE)) && !(defined(ZTS) && defined(HPUX)) && !defined(DARWIN) # define ZEND_ALLOCA_MAX_SIZE (32 * 1024) # define ALLOCA_FLAG(name) \ zend_bool name; # define SET_ALLOCA_FLAG(name) \ name = 1 # define do_alloca_ex(size, limit, use_heap) \ ((use_heap = (UNEXPECTED((size) > (limit)))) ? emalloc(size) : alloca(size)) # define do_alloca(size, use_heap) \ do_alloca_ex(size, ZEND_ALLOCA_MAX_SIZE, use_heap) # define free_alloca(p, use_heap) \ do { if (UNEXPECTED(use_heap)) efree(p); } while (0) #else # define ALLOCA_FLAG(name) # define SET_ALLOCA_FLAG(name) # define do_alloca(p, use_heap) emalloc(p) # define free_alloca(p, use_heap) efree(p) #endif #if ZEND_DEBUG #define ZEND_FILE_LINE_D char *__zend_filename, uint __zend_lineno #define ZEND_FILE_LINE_DC , ZEND_FILE_LINE_D #define ZEND_FILE_LINE_ORIG_D char *__zend_orig_filename, uint __zend_orig_lineno #define ZEND_FILE_LINE_ORIG_DC , ZEND_FILE_LINE_ORIG_D #define ZEND_FILE_LINE_RELAY_C __zend_filename, __zend_lineno #define ZEND_FILE_LINE_RELAY_CC , ZEND_FILE_LINE_RELAY_C #define ZEND_FILE_LINE_C __FILE__, __LINE__ #define ZEND_FILE_LINE_CC , ZEND_FILE_LINE_C #define ZEND_FILE_LINE_EMPTY_C NULL, 0 #define ZEND_FILE_LINE_EMPTY_CC , ZEND_FILE_LINE_EMPTY_C #define ZEND_FILE_LINE_ORIG_RELAY_C __zend_orig_filename, __zend_orig_lineno #define ZEND_FILE_LINE_ORIG_RELAY_CC , ZEND_FILE_LINE_ORIG_RELAY_C #else #define ZEND_FILE_LINE_D #define ZEND_FILE_LINE_DC #define ZEND_FILE_LINE_ORIG_D #define ZEND_FILE_LINE_ORIG_DC #define ZEND_FILE_LINE_RELAY_C #define ZEND_FILE_LINE_RELAY_CC #define ZEND_FILE_LINE_C #define ZEND_FILE_LINE_CC #define ZEND_FILE_LINE_EMPTY_C #define ZEND_FILE_LINE_EMPTY_CC #define ZEND_FILE_LINE_ORIG_RELAY_C #define ZEND_FILE_LINE_ORIG_RELAY_CC #endif /* ZEND_DEBUG */ #ifdef ZTS #define ZTS_V 1 #else #define ZTS_V 0 #endif #include "zend_errors.h" #include "zend_alloc.h" #include "zend_types.h" #ifdef HAVE_LIMITS_H # include #endif #ifndef LONG_MAX #define LONG_MAX 2147483647L #endif #ifndef LONG_MIN #define LONG_MIN (- LONG_MAX - 1) #endif #if SIZEOF_LONG == 4 #define MAX_LENGTH_OF_LONG 11 static const char long_min_digits[] = "2147483648"; #elif SIZEOF_LONG == 8 #define MAX_LENGTH_OF_LONG 20 static const char long_min_digits[] = "9223372036854775808"; #else #error "Unknown SIZEOF_LONG" #endif #define MAX_LENGTH_OF_DOUBLE 32 #undef SUCCESS #undef FAILURE #define SUCCESS 0 #define FAILURE -1 /* this MUST stay a negative number, or it may affect functions! */ #include "zend_hash.h" #include "zend_ts_hash.h" #include "zend_llist.h" #define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, zval **return_value_ptr, zval *this_ptr, int return_value_used TSRMLS_DC #define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, return_value_ptr, this_ptr, return_value_used TSRMLS_CC #if defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__) void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((noreturn)); #else # define zend_error_noreturn zend_error #endif /* * zval */ typedef struct _zval_struct zval; typedef struct _zend_class_entry zend_class_entry; typedef struct _zend_guard { zend_bool in_get; zend_bool in_set; zend_bool in_unset; zend_bool in_isset; zend_bool dummy; /* sizeof(zend_guard) must not be equal to sizeof(void*) */ } zend_guard; typedef struct _zend_object { zend_class_entry *ce; HashTable *properties; HashTable *guards; /* protects from __get/__set ... recursion */ } zend_object; #include "zend_object_handlers.h" typedef union _zvalue_value { long lval; /* long value */ double dval; /* double value */ struct { char *val; int len; } str; HashTable *ht; /* hash table value */ zend_object_value obj; } zvalue_value; struct _zval_struct { /* Variable information */ zvalue_value value; /* value */ zend_uint refcount__gc; zend_uchar type; /* active type */ zend_uchar is_ref__gc; }; #define Z_REFCOUNT_PP(ppz) Z_REFCOUNT_P(*(ppz)) #define Z_SET_REFCOUNT_PP(ppz, rc) Z_SET_REFCOUNT_P(*(ppz), rc) #define Z_ADDREF_PP(ppz) Z_ADDREF_P(*(ppz)) #define Z_DELREF_PP(ppz) Z_DELREF_P(*(ppz)) #define Z_ISREF_PP(ppz) Z_ISREF_P(*(ppz)) #define Z_SET_ISREF_PP(ppz) Z_SET_ISREF_P(*(ppz)) #define Z_UNSET_ISREF_PP(ppz) Z_UNSET_ISREF_P(*(ppz)) #define Z_SET_ISREF_TO_PP(ppz, isref) Z_SET_ISREF_TO_P(*(ppz), isref) #define Z_REFCOUNT_P(pz) zval_refcount_p(pz) #define Z_SET_REFCOUNT_P(pz, rc) zval_set_refcount_p(pz, rc) #define Z_ADDREF_P(pz) zval_addref_p(pz) #define Z_DELREF_P(pz) zval_delref_p(pz) #define Z_ISREF_P(pz) zval_isref_p(pz) #define Z_SET_ISREF_P(pz) zval_set_isref_p(pz) #define Z_UNSET_ISREF_P(pz) zval_unset_isref_p(pz) #define Z_SET_ISREF_TO_P(pz, isref) zval_set_isref_to_p(pz, isref) #define Z_REFCOUNT(z) Z_REFCOUNT_P(&(z)) #define Z_SET_REFCOUNT(z, rc) Z_SET_REFCOUNT_P(&(z), rc) #define Z_ADDREF(z) Z_ADDREF_P(&(z)) #define Z_DELREF(z) Z_DELREF_P(&(z)) #define Z_ISREF(z) Z_ISREF_P(&(z)) #define Z_SET_ISREF(z) Z_SET_ISREF_P(&(z)) #define Z_UNSET_ISREF(z) Z_UNSET_ISREF_P(&(z)) #define Z_SET_ISREF_TO(z, isref) Z_SET_ISREF_TO_P(&(z), isref) #if defined(__GNUC__) #if __GNUC__ >= 3 #define zend_always_inline inline __attribute__((always_inline)) #else #define zend_always_inline inline #endif #elif defined(_MSC_VER) #define zend_always_inline __forceinline #else #define zend_always_inline inline #endif #if (defined (__GNUC__) && __GNUC__ > 2 ) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) # define EXPECTED(condition) __builtin_expect(condition, 1) # define UNEXPECTED(condition) __builtin_expect(condition, 0) #else # define EXPECTED(condition) (condition) # define UNEXPECTED(condition) (condition) #endif static zend_always_inline zend_uint zval_refcount_p(zval* pz) { return pz->refcount__gc; } static zend_always_inline zend_uint zval_set_refcount_p(zval* pz, zend_uint rc) { return pz->refcount__gc = rc; } static zend_always_inline zend_uint zval_addref_p(zval* pz) { return ++pz->refcount__gc; } static zend_always_inline zend_uint zval_delref_p(zval* pz) { return --pz->refcount__gc; } static zend_always_inline zend_bool zval_isref_p(zval* pz) { return pz->is_ref__gc; } static zend_always_inline zend_bool zval_set_isref_p(zval* pz) { return pz->is_ref__gc = 1; } static zend_always_inline zend_bool zval_unset_isref_p(zval* pz) { return pz->is_ref__gc = 0; } static zend_always_inline zend_bool zval_set_isref_to_p(zval* pz, zend_bool isref) { return pz->is_ref__gc = isref; } /* excpt.h on Digital Unix 4.0 defines function_table */ #undef function_table /* A lot of stuff needs shifiting around in order to include zend_compile.h here */ union _zend_function; #include "zend_iterators.h" struct _zend_serialize_data; struct _zend_unserialize_data; typedef struct _zend_serialize_data zend_serialize_data; typedef struct _zend_unserialize_data zend_unserialize_data; struct _zend_class_entry { char type; char *name; zend_uint name_length; struct _zend_class_entry *parent; int refcount; zend_bool constants_updated; zend_uint ce_flags; HashTable function_table; HashTable default_properties; HashTable properties_info; HashTable default_static_members; HashTable *static_members; HashTable constants_table; const struct _zend_function_entry *builtin_functions; union _zend_function *constructor; union _zend_function *destructor; union _zend_function *clone; union _zend_function *__get; union _zend_function *__set; union _zend_function *__unset; union _zend_function *__isset; union _zend_function *__call; union _zend_function *__callstatic; union _zend_function *__tostring; union _zend_function *serialize_func; union _zend_function *unserialize_func; zend_class_iterator_funcs iterator_funcs; /* handlers */ zend_object_value (*create_object)(zend_class_entry *class_type TSRMLS_DC); zend_object_iterator *(*get_iterator)(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC); int (*interface_gets_implemented)(zend_class_entry *iface, zend_class_entry *class_type TSRMLS_DC); /* a class implements this interface */ union _zend_function *(*get_static_method)(zend_class_entry *ce, char* method, int method_len TSRMLS_DC); /* serializer callbacks */ int (*serialize)(zval *object, unsigned char **buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC); int (*unserialize)(zval **object, zend_class_entry *ce, const unsigned char *buf, zend_uint buf_len, zend_unserialize_data *data TSRMLS_DC); zend_class_entry **interfaces; zend_uint num_interfaces; char *filename; zend_uint line_start; zend_uint line_end; char *doc_comment; zend_uint doc_comment_len; struct _zend_module_entry *module; }; #include "zend_stream.h" typedef struct _zend_utility_functions { void (*error_function)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 4, 0); int (*printf_function)(const char *format, ...) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2); int (*write_function)(const char *str, uint str_length); FILE *(*fopen_function)(const char *filename, char **opened_path TSRMLS_DC); void (*message_handler)(long message, void *data TSRMLS_DC); void (*block_interruptions)(void); void (*unblock_interruptions)(void); int (*get_configuration_directive)(const char *name, uint name_length, zval *contents); void (*ticks_function)(int ticks); void (*on_timeout)(int seconds TSRMLS_DC); int (*stream_open_function)(const char *filename, zend_file_handle *handle TSRMLS_DC); int (*vspprintf_function)(char **pbuf, size_t max_len, const char *format, va_list ap); char *(*getenv_function)(char *name, size_t name_len TSRMLS_DC); char *(*resolve_path_function)(const char *filename, int filename_len TSRMLS_DC); } zend_utility_functions; typedef struct _zend_utility_values { char *import_use_extension; uint import_use_extension_length; zend_bool html_errors; } zend_utility_values; typedef int (*zend_write_func_t)(const char *str, uint str_length); #undef MIN #undef MAX #define MAX(a, b) (((a)>(b))?(a):(b)) #define MIN(a, b) (((a)<(b))?(a):(b)) #define ZEND_STRL(str) (str), (sizeof(str)-1) #define ZEND_STRS(str) (str), (sizeof(str)) #define ZEND_NORMALIZE_BOOL(n) \ ((n) ? (((n)>0) ? 1 : -1) : 0) #define ZEND_TRUTH(x) ((x) ? 1 : 0) #define ZEND_LOG_XOR(a, b) (ZEND_TRUTH(a) ^ ZEND_TRUTH(b)) /* data types */ /* All data types <= IS_BOOL have their constructor/destructors skipped */ #define IS_NULL 0 #define IS_LONG 1 #define IS_DOUBLE 2 #define IS_BOOL 3 #define IS_ARRAY 4 #define IS_OBJECT 5 #define IS_STRING 6 #define IS_RESOURCE 7 #define IS_CONSTANT 8 #define IS_CONSTANT_ARRAY 9 /* Ugly hack to support constants as static array indices */ #define IS_CONSTANT_TYPE_MASK 0x0f #define IS_CONSTANT_UNQUALIFIED 0x10 #define IS_CONSTANT_INDEX 0x80 #define IS_LEXICAL_VAR 0x20 #define IS_LEXICAL_REF 0x40 /* overloaded elements data types */ #define OE_IS_ARRAY (1<<0) #define OE_IS_OBJECT (1<<1) #define OE_IS_METHOD (1<<2) int zend_startup(zend_utility_functions *utility_functions, char **extensions TSRMLS_DC); void zend_shutdown(TSRMLS_D); void zend_register_standard_ini_entries(TSRMLS_D); void zend_post_startup(TSRMLS_D); void zend_set_utility_values(zend_utility_values *utility_values); BEGIN_EXTERN_C() ZEND_API void _zend_bailout(char *filename, uint lineno); END_EXTERN_C() #define zend_bailout() _zend_bailout(__FILE__, __LINE__) #ifdef HAVE_SIGSETJMP # define SETJMP(a) sigsetjmp(a, 0) # define LONGJMP(a,b) siglongjmp(a, b) # define JMP_BUF sigjmp_buf #else # define SETJMP(a) setjmp(a) # define LONGJMP(a,b) longjmp(a, b) # define JMP_BUF jmp_buf #endif #define zend_try \ { \ JMP_BUF *__orig_bailout = EG(bailout); \ JMP_BUF __bailout; \ \ EG(bailout) = &__bailout; \ if (SETJMP(__bailout)==0) { #define zend_catch \ } else { \ EG(bailout) = __orig_bailout; #define zend_end_try() \ } \ EG(bailout) = __orig_bailout; \ } #define zend_first_try EG(bailout)=NULL; zend_try BEGIN_EXTERN_C() ZEND_API char *get_zend_version(void); ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_copy); ZEND_API int zend_print_zval(zval *expr, int indent); ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int indent); ZEND_API void zend_print_zval_r(zval *expr, int indent TSRMLS_DC); ZEND_API void zend_print_flat_zval_r(zval *expr TSRMLS_DC); ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent TSRMLS_DC); ZEND_API void zend_output_debug_string(zend_bool trigger_break, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3); END_EXTERN_C() void zend_activate(TSRMLS_D); void zend_deactivate(TSRMLS_D); void zend_call_destructors(TSRMLS_D); void zend_activate_modules(TSRMLS_D); void zend_deactivate_modules(TSRMLS_D); void zend_post_deactivate_modules(TSRMLS_D); #if ZEND_DEBUG #define Z_DBG(expr) (expr) #else #define Z_DBG(expr) #endif BEGIN_EXTERN_C() ZEND_API void free_estring(char **str_p); END_EXTERN_C() /* FIXME: Check if we can save if (ptr) too */ #define STR_FREE(ptr) if (ptr) { efree(ptr); } #define STR_FREE_REL(ptr) if (ptr) { efree_rel(ptr); } #define STR_EMPTY_ALLOC() estrndup("", sizeof("")-1) #define STR_REALLOC(ptr, size) \ ptr = (char *) erealloc(ptr, size); /* output support */ #define ZEND_WRITE(str, str_len) zend_write((str), (str_len)) #define ZEND_WRITE_EX(str, str_len) write_func((str), (str_len)) #define ZEND_PUTS(str) zend_write((str), strlen((str))) #define ZEND_PUTS_EX(str) write_func((str), strlen((str))) #define ZEND_PUTC(c) zend_write(&(c), 1), (c) BEGIN_EXTERN_C() extern ZEND_API int (*zend_printf)(const char *format, ...) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2); extern ZEND_API zend_write_func_t zend_write; extern ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path TSRMLS_DC); extern ZEND_API void (*zend_block_interruptions)(void); extern ZEND_API void (*zend_unblock_interruptions)(void); extern ZEND_API void (*zend_ticks_function)(int ticks); extern ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 4, 0); extern void (*zend_on_timeout)(int seconds TSRMLS_DC); extern ZEND_API int (*zend_stream_open_function)(const char *filename, zend_file_handle *handle TSRMLS_DC); extern int (*zend_vspprintf)(char **pbuf, size_t max_len, const char *format, va_list ap); extern ZEND_API char *(*zend_getenv)(char *name, size_t name_len TSRMLS_DC); extern ZEND_API char *(*zend_resolve_path)(const char *filename, int filename_len TSRMLS_DC); ZEND_API void zend_error(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3); void zenderror(const char *error); /* The following #define is used for code duality in PHP for Engine 1 & 2 */ #define ZEND_STANDARD_CLASS_DEF_PTR zend_standard_class_def extern ZEND_API zend_class_entry *zend_standard_class_def; extern ZEND_API zend_utility_values zend_uv; extern ZEND_API zval zval_used_for_init; END_EXTERN_C() #define ZEND_UV(name) (zend_uv.name) #define HANDLE_BLOCK_INTERRUPTIONS() if (zend_block_interruptions) { zend_block_interruptions(); } #define HANDLE_UNBLOCK_INTERRUPTIONS() if (zend_unblock_interruptions) { zend_unblock_interruptions(); } BEGIN_EXTERN_C() ZEND_API void zend_message_dispatcher(long message, void *data TSRMLS_DC); ZEND_API int zend_get_configuration_directive(const char *name, uint name_length, zval *contents); END_EXTERN_C() /* Messages for applications of Zend */ #define ZMSG_FAILED_INCLUDE_FOPEN 1L #define ZMSG_FAILED_REQUIRE_FOPEN 2L #define ZMSG_FAILED_HIGHLIGHT_FOPEN 3L #define ZMSG_MEMORY_LEAK_DETECTED 4L #define ZMSG_MEMORY_LEAK_REPEATED 5L #define ZMSG_LOG_SCRIPT_NAME 6L #define ZMSG_MEMORY_LEAKS_GRAND_TOTAL 7L #define INIT_PZVAL(z) \ (z)->refcount__gc = 1; \ (z)->is_ref__gc = 0; #define INIT_ZVAL(z) z = zval_used_for_init; #define ALLOC_INIT_ZVAL(zp) \ ALLOC_ZVAL(zp); \ INIT_ZVAL(*zp); #define MAKE_STD_ZVAL(zv) \ ALLOC_ZVAL(zv); \ INIT_PZVAL(zv); #define PZVAL_IS_REF(z) Z_ISREF_P(z) #define SEPARATE_ZVAL(ppzv) \ { \ zval *orig_ptr = *(ppzv); \ \ if (Z_REFCOUNT_P(orig_ptr) > 1) { \ Z_DELREF_P(orig_ptr); \ ALLOC_ZVAL(*(ppzv)); \ **(ppzv) = *orig_ptr; \ zval_copy_ctor(*(ppzv)); \ Z_SET_REFCOUNT_PP(ppzv, 1); \ Z_UNSET_ISREF_PP((ppzv)); \ } \ } #define SEPARATE_ZVAL_IF_NOT_REF(ppzv) \ if (!PZVAL_IS_REF(*ppzv)) { \ SEPARATE_ZVAL(ppzv); \ } #define SEPARATE_ZVAL_TO_MAKE_IS_REF(ppzv) \ if (!PZVAL_IS_REF(*ppzv)) { \ SEPARATE_ZVAL(ppzv); \ Z_SET_ISREF_PP((ppzv)); \ } #define COPY_PZVAL_TO_ZVAL(zv, pzv) \ (zv) = *(pzv); \ if (Z_REFCOUNT_P(pzv)>1) { \ zval_copy_ctor(&(zv)); \ Z_DELREF_P((pzv)); \ } else { \ FREE_ZVAL(pzv); \ } \ INIT_PZVAL(&(zv)); #define MAKE_COPY_ZVAL(ppzv, pzv) \ *(pzv) = **(ppzv); \ zval_copy_ctor((pzv)); \ INIT_PZVAL((pzv)); #define REPLACE_ZVAL_VALUE(ppzv_dest, pzv_src, copy) { \ int is_ref, refcount; \ \ SEPARATE_ZVAL_IF_NOT_REF(ppzv_dest); \ is_ref = Z_ISREF_PP(ppzv_dest); \ refcount = Z_REFCOUNT_PP(ppzv_dest); \ zval_dtor(*ppzv_dest); \ **ppzv_dest = *pzv_src; \ if (copy) { \ zval_copy_ctor(*ppzv_dest); \ } \ Z_SET_ISREF_TO_PP(ppzv_dest, is_ref); \ Z_SET_REFCOUNT_PP(ppzv_dest, refcount); \ } #define SEPARATE_ARG_IF_REF(varptr) \ if (PZVAL_IS_REF(varptr)) { \ zval *original_var = varptr; \ ALLOC_ZVAL(varptr); \ varptr->value = original_var->value; \ Z_TYPE_P(varptr) = Z_TYPE_P(original_var); \ Z_UNSET_ISREF_P(varptr); \ Z_SET_REFCOUNT_P(varptr, 1); \ zval_copy_ctor(varptr); \ } else { \ Z_ADDREF_P(varptr); \ } #define READY_TO_DESTROY(zv) \ (Z_REFCOUNT_P(zv) == 1 && \ (Z_TYPE_P(zv) != IS_OBJECT || \ zend_objects_store_get_refcount(zv TSRMLS_CC) == 1)) #define ZEND_MAX_RESERVED_RESOURCES 4 #include "zend_gc.h" #include "zend_operators.h" #include "zend_variables.h" typedef enum { EH_NORMAL = 0, EH_SUPPRESS, EH_THROW } zend_error_handling_t; typedef struct { zend_error_handling_t handling; zend_class_entry *exception; zval *user_handler; } zend_error_handling; ZEND_API void zend_save_error_handling(zend_error_handling *current TSRMLS_DC); ZEND_API void zend_replace_error_handling(zend_error_handling_t error_handling, zend_class_entry *exception_class, zend_error_handling *current TSRMLS_DC); ZEND_API void zend_restore_error_handling(zend_error_handling *saved TSRMLS_DC); #define DEBUG_BACKTRACE_PROVIDE_OBJECT (1<<0) #define DEBUG_BACKTRACE_IGNORE_ARGS (1<<1) #endif /* ZEND_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: */ 07070100180d32000081a40000000000000000000000014dc0f41200103367000000b600010002ffffffffffffffff0000003200000000root/usr/local/include/php/Zend/zend_vm_execute.h/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2010 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Zeev Suraski | | Dmitry Stogov | +----------------------------------------------------------------------+ */ #ifdef ZEND_WIN32 # pragma warning(once : 4101) #endif static user_opcode_handler_t zend_user_opcode_handlers[256] = {(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL}; static zend_uchar zend_user_opcodes[256] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255}; static opcode_handler_t zend_vm_get_opcode_handler(zend_uchar opcode, zend_op* op); #define ZEND_VM_CONTINUE() return 0 #define ZEND_VM_RETURN() return 1 #define ZEND_VM_ENTER() return 2 #define ZEND_VM_LEAVE() return 3 #define ZEND_VM_DISPATCH(opcode, opline) return zend_vm_get_opcode_handler(opcode, opline)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); #define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_INTERNAL execute_data TSRMLS_CC #undef EX #define EX(element) execute_data->element ZEND_API void execute(zend_op_array *op_array TSRMLS_DC) { zend_execute_data *execute_data; zend_bool nested = 0; zend_bool original_in_execution = EG(in_execution); if (EG(exception)) { return; } EG(in_execution) = 1; zend_vm_enter: /* Initialize execute_data */ execute_data = (zend_execute_data *)zend_vm_stack_alloc( ZEND_MM_ALIGNED_SIZE(sizeof(zend_execute_data)) + ZEND_MM_ALIGNED_SIZE(sizeof(zval**) * op_array->last_var * (EG(active_symbol_table) ? 1 : 2)) + ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * op_array->T TSRMLS_CC); EX(CVs) = (zval***)((char*)execute_data + ZEND_MM_ALIGNED_SIZE(sizeof(zend_execute_data))); memset(EX(CVs), 0, sizeof(zval**) * op_array->last_var); EX(Ts) = (temp_variable *)(((char*)EX(CVs)) + ZEND_MM_ALIGNED_SIZE(sizeof(zval**) * op_array->last_var * (EG(active_symbol_table) ? 1 : 2))); EX(fbc) = NULL; EX(called_scope) = NULL; EX(object) = NULL; EX(old_error_reporting) = NULL; EX(op_array) = op_array; EX(symbol_table) = EG(active_symbol_table); EX(prev_execute_data) = EG(current_execute_data); EG(current_execute_data) = execute_data; EX(nested) = nested; nested = 1; if (op_array->start_op) { ZEND_VM_SET_OPCODE(op_array->start_op); } else { ZEND_VM_SET_OPCODE(op_array->opcodes); } if (op_array->this_var != -1 && EG(This)) { Z_ADDREF_P(EG(This)); /* For $this pointer */ if (!EG(active_symbol_table)) { EX(CVs)[op_array->this_var] = (zval**)EX(CVs) + (op_array->last_var + op_array->this_var); *EX(CVs)[op_array->this_var] = EG(This); } else { if (zend_hash_add(EG(active_symbol_table), "this", sizeof("this"), &EG(This), sizeof(zval *), (void**)&EX(CVs)[op_array->this_var])==FAILURE) { Z_DELREF_P(EG(This)); } } } EG(opline_ptr) = &EX(opline); EX(function_state).function = (zend_function *) op_array; EX(function_state).arguments = NULL; while (1) { int ret; #ifdef ZEND_WIN32 if (EG(timed_out)) { zend_timeout(0); } #endif if ((ret = EX(opline)->handler(execute_data TSRMLS_CC)) > 0) { switch (ret) { case 1: EG(in_execution) = original_in_execution; return; case 2: op_array = EG(active_op_array); goto zend_vm_enter; case 3: execute_data = EG(current_execute_data); default: break; } } } zend_error_noreturn(E_ERROR, "Arrived at end of main loop which shouldn't happen"); } static int ZEND_FASTCALL ZEND_JMP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { #if DEBUG_ZEND>=2 printf("Jumping to %d\n", EX(opline)->op1.u.opline_num); #endif ZEND_VM_SET_OPCODE(EX(opline)->op1.u.jmp_addr); ZEND_VM_CONTINUE(); /* CHECK_ME */ } static int ZEND_FASTCALL ZEND_INIT_STRING_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zval *tmp = &EX_T(EX(opline)->result.u.var).tmp_var; tmp->value.str.val = emalloc(1); tmp->value.str.val[0] = 0; tmp->value.str.len = 0; Z_SET_REFCOUNT_P(tmp, 1); tmp->type = IS_STRING; Z_UNSET_ISREF_P(tmp); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS) { zend_bool nested; zend_op_array *op_array = EX(op_array); EG(current_execute_data) = EX(prev_execute_data); EG(opline_ptr) = NULL; if (!EG(active_symbol_table)) { zval ***cv = EX(CVs); zval ***end = cv + EX(op_array)->last_var; while (cv != end) { if (*cv) { zval_ptr_dtor(*cv); } cv++; } } nested = EX(nested); zend_vm_stack_free(execute_data TSRMLS_CC); if (nested) { execute_data = EG(current_execute_data); if (EX(call_opline)->opcode == ZEND_INCLUDE_OR_EVAL) { EX(function_state).function = (zend_function *) EX(op_array); EX(function_state).arguments = NULL; EX(object) = EX(current_object); if (RETURN_VALUE_USED(EX(call_opline))) { if (!EX_T(EX(call_opline)->result.u.var).var.ptr) { /* there was no return statement */ ALLOC_ZVAL(EX_T(EX(call_opline)->result.u.var).var.ptr); INIT_PZVAL(EX_T(EX(call_opline)->result.u.var).var.ptr); Z_LVAL_P(EX_T(EX(call_opline)->result.u.var).var.ptr) = 1; Z_TYPE_P(EX_T(EX(call_opline)->result.u.var).var.ptr) = IS_BOOL; } } EG(opline_ptr) = &EX(opline); EG(active_op_array) = EX(op_array); EG(return_value_ptr_ptr) = EX(original_return_value); destroy_op_array(op_array TSRMLS_CC); efree(op_array); if (EG(exception)) { zend_throw_exception_internal(NULL TSRMLS_CC); } EX(opline)++; ZEND_VM_LEAVE(); } else { EG(opline_ptr) = &EX(opline); EG(active_op_array) = EX(op_array); EG(return_value_ptr_ptr) = EX(original_return_value); if (EG(active_symbol_table)) { if (EG(symtable_cache_ptr)>=EG(symtable_cache_limit)) { zend_hash_destroy(EG(active_symbol_table)); FREE_HASHTABLE(EG(active_symbol_table)); } else { /* clean before putting into the cache, since clean could call dtors, which could use cached hash */ zend_hash_clean(EG(active_symbol_table)); *(++EG(symtable_cache_ptr)) = EG(active_symbol_table); } } EG(active_symbol_table) = EX(symbol_table); EX(function_state).function = (zend_function *) EX(op_array); EX(function_state).arguments = NULL; if (EG(This)) { if (EG(exception) && IS_CTOR_CALL(EX(called_scope))) { if (IS_CTOR_USED(EX(called_scope))) { Z_DELREF_P(EG(This)); } if (Z_REFCOUNT_P(EG(This)) == 1) { zend_object_store_ctor_failed(EG(This) TSRMLS_CC); } } zval_ptr_dtor(&EG(This)); } EG(This) = EX(current_this); EG(scope) = EX(current_scope); EG(called_scope) = EX(current_called_scope); EX(object) = EX(current_object); EX(called_scope) = DECODE_CTOR(EX(called_scope)); zend_vm_stack_clear_multiple(TSRMLS_C); if (EG(exception)) { zend_throw_exception_internal(NULL TSRMLS_CC); if (RETURN_VALUE_USED(EX(call_opline)) && EX_T(EX(call_opline)->result.u.var).var.ptr) { zval_ptr_dtor(&EX_T(EX(call_opline)->result.u.var).var.ptr); } } EX(opline)++; ZEND_VM_LEAVE(); } } ZEND_VM_RETURN(); } static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_bool should_change_scope = 0; if (EX(function_state).function->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) { if (EX(function_state).function->common.fn_flags & ZEND_ACC_ABSTRACT) { zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name); ZEND_VM_NEXT_OPCODE(); /* Never reached */ } if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) { zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated", EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : "", EX(function_state).function->common.scope ? "::" : "", EX(function_state).function->common.function_name); } } if (EX(function_state).function->common.scope && !(EX(function_state).function->common.fn_flags & ZEND_ACC_STATIC) && !EX(object)) { if (EX(function_state).function->common.fn_flags & ZEND_ACC_ALLOW_STATIC) { /* FIXME: output identifiers properly */ zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name); } else { /* FIXME: output identifiers properly */ /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */ zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name); } } if (EX(function_state).function->type == ZEND_USER_FUNCTION || EX(function_state).function->common.scope) { should_change_scope = 1; EX(current_this) = EG(This); EX(current_scope) = EG(scope); EX(current_called_scope) = EG(called_scope); EG(This) = EX(object); EG(scope) = (EX(function_state).function->type == ZEND_USER_FUNCTION || !EX(object)) ? EX(function_state).function->common.scope : NULL; EG(called_scope) = EX(called_scope); } zend_arg_types_stack_3_pop(&EG(arg_types_stack), &EX(called_scope), &EX(current_object), &EX(fbc)); EX(function_state).arguments = zend_vm_stack_push_args(opline->extended_value TSRMLS_CC); if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) { ALLOC_INIT_ZVAL(EX_T(opline->result.u.var).var.ptr); EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr; EX_T(opline->result.u.var).var.fcall_returned_reference = EX(function_state).function->common.return_reference; if (EX(function_state).function->common.arg_info) { zend_uint i=0; zval **p = (zval**)EX(function_state).arguments; ulong arg_count = opline->extended_value; while (arg_count>0) { zend_verify_arg_type(EX(function_state).function, ++i, *(p-arg_count), 0 TSRMLS_CC); arg_count--; } } if (!zend_execute_internal) { /* saves one function call if zend_execute_internal is not used */ ((zend_internal_function *) EX(function_state).function)->handler(opline->extended_value, EX_T(opline->result.u.var).var.ptr, EX(function_state).function->common.return_reference?&EX_T(opline->result.u.var).var.ptr:NULL, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC); } else { zend_execute_internal(execute_data, RETURN_VALUE_USED(opline) TSRMLS_CC); } if (!RETURN_VALUE_USED(opline)) { zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr); } } else if (EX(function_state).function->type == ZEND_USER_FUNCTION) { EX(original_return_value) = EG(return_value_ptr_ptr); EG(active_symbol_table) = NULL; EG(active_op_array) = &EX(function_state).function->op_array; EG(return_value_ptr_ptr) = NULL; if (RETURN_VALUE_USED(opline)) { EG(return_value_ptr_ptr) = &EX_T(opline->result.u.var).var.ptr; EX_T(opline->result.u.var).var.ptr = NULL; EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr; EX_T(opline->result.u.var).var.fcall_returned_reference = EX(function_state).function->common.return_reference; } if (zend_execute == execute && !EG(exception)) { EX(call_opline) = opline; ZEND_VM_ENTER(); } else { zend_execute(EG(active_op_array) TSRMLS_CC); } EG(opline_ptr) = &EX(opline); EG(active_op_array) = EX(op_array); EG(return_value_ptr_ptr) = EX(original_return_value); if (EG(active_symbol_table)) { if (EG(symtable_cache_ptr)>=EG(symtable_cache_limit)) { zend_hash_destroy(EG(active_symbol_table)); FREE_HASHTABLE(EG(active_symbol_table)); } else { /* clean before putting into the cache, since clean could call dtors, which could use cached hash */ zend_hash_clean(EG(active_symbol_table)); *(++EG(symtable_cache_ptr)) = EG(active_symbol_table); } } EG(active_symbol_table) = EX(symbol_table); } else { /* ZEND_OVERLOADED_FUNCTION */ ALLOC_INIT_ZVAL(EX_T(opline->result.u.var).var.ptr); /* Not sure what should be done here if it's a static method */ if (EX(object)) { Z_OBJ_HT_P(EX(object))->call_method(EX(function_state).function->common.function_name, opline->extended_value, EX_T(opline->result.u.var).var.ptr, &EX_T(opline->result.u.var).var.ptr, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC); } else { zend_error_noreturn(E_ERROR, "Cannot call overloaded function for non-object"); } if (EX(function_state).function->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) { efree(EX(function_state).function->common.function_name); } efree(EX(function_state).function); if (!RETURN_VALUE_USED(opline)) { zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr); } else { Z_UNSET_ISREF_P(EX_T(opline->result.u.var).var.ptr); Z_SET_REFCOUNT_P(EX_T(opline->result.u.var).var.ptr, 1); EX_T(opline->result.u.var).var.fcall_returned_reference = 0; EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr; } } EX(function_state).function = (zend_function *) EX(op_array); EX(function_state).arguments = NULL; if (should_change_scope) { if (EG(This)) { if (EG(exception) && IS_CTOR_CALL(EX(called_scope))) { if (IS_CTOR_USED(EX(called_scope))) { Z_DELREF_P(EG(This)); } if (Z_REFCOUNT_P(EG(This)) == 1) { zend_object_store_ctor_failed(EG(This) TSRMLS_CC); } } zval_ptr_dtor(&EG(This)); } EG(This) = EX(current_this); EG(scope) = EX(current_scope); EG(called_scope) = EX(current_called_scope); } EX(object) = EX(current_object); EX(called_scope) = DECODE_CTOR(EX(called_scope)); zend_vm_stack_clear_multiple(TSRMLS_C); if (EG(exception)) { zend_throw_exception_internal(NULL TSRMLS_CC); if (RETURN_VALUE_USED(opline) && EX_T(opline->result.u.var).var.ptr) { zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr); } } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { EX(function_state).function = EX(fbc); return zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_RECV_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_uint arg_num = Z_LVAL(opline->op1.u.constant); zval **param = zend_vm_stack_get_arg(arg_num TSRMLS_CC); if (param == NULL) { char *space; char *class_name = get_active_class_name(&space TSRMLS_CC); zend_execute_data *ptr = EX(prev_execute_data); if (zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, NULL, opline->extended_value TSRMLS_CC)) { if(ptr && ptr->op_array) { zend_error(E_WARNING, "Missing argument %ld for %s%s%s(), called in %s on line %d and defined", opline->op1.u.constant.value.lval, class_name, space, get_active_function_name(TSRMLS_C), ptr->op_array->filename, ptr->opline->lineno); } else { zend_error(E_WARNING, "Missing argument %ld for %s%s%s()", opline->op1.u.constant.value.lval, class_name, space, get_active_function_name(TSRMLS_C)); } } if (opline->result.op_type == IS_VAR) { PZVAL_UNLOCK_FREE(*EX_T(opline->result.u.var).var.ptr_ptr); } } else { zend_free_op free_res; zval **var_ptr; zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, *param, opline->extended_value TSRMLS_CC); var_ptr = get_zval_ptr_ptr(&opline->result, EX(Ts), &free_res, BP_VAR_W); Z_DELREF_PP(var_ptr); *var_ptr = *param; Z_ADDREF_PP(var_ptr); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_NEW_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *object_zval; zend_function *constructor; if (EX_T(opline->op1.u.var).class_entry->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) { char *class_type; if (EX_T(opline->op1.u.var).class_entry->ce_flags & ZEND_ACC_INTERFACE) { class_type = "interface"; } else { class_type = "abstract class"; } zend_error_noreturn(E_ERROR, "Cannot instantiate %s %s", class_type, EX_T(opline->op1.u.var).class_entry->name); } ALLOC_ZVAL(object_zval); object_init_ex(object_zval, EX_T(opline->op1.u.var).class_entry); INIT_PZVAL(object_zval); constructor = Z_OBJ_HT_P(object_zval)->get_constructor(object_zval TSRMLS_CC); if (constructor == NULL) { if (RETURN_VALUE_USED(opline)) { AI_SET_PTR(EX_T(opline->result.u.var).var, object_zval); } else { zval_ptr_dtor(&object_zval); } ZEND_VM_JMP(EX(op_array)->opcodes + opline->op2.u.opline_num); } else { if (RETURN_VALUE_USED(opline)) { AI_SET_PTR(EX_T(opline->result.u.var).var, object_zval); PZVAL_LOCK(object_zval); } zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), ENCODE_CTOR(EX(called_scope), RETURN_VALUE_USED(opline))); /* We are not handling overloaded classes right now */ EX(object) = object_zval; EX(fbc) = constructor; EX(called_scope) = EX_T(opline->op1.u.var).class_entry; ZEND_VM_NEXT_OPCODE(); } } static int ZEND_FASTCALL ZEND_BEGIN_SILENCE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); Z_LVAL(EX_T(opline->result.u.var).tmp_var) = EG(error_reporting); Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_LONG; /* shouldn't be necessary */ if (EX(old_error_reporting) == NULL) { EX(old_error_reporting) = &EX_T(opline->result.u.var).tmp_var; } if (EG(error_reporting)) { zend_alter_ini_entry_ex("error_reporting", sizeof("error_reporting"), "0", 1, ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME, 1 TSRMLS_CC); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_RAISE_ABSTRACT_ERROR_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", EG(scope)->name, EX(op_array)->function_name); ZEND_VM_NEXT_OPCODE(); /* Never reached */ } static int ZEND_FASTCALL ZEND_EXT_STMT_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { if (!EG(no_extensions)) { zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_statement_handler, EX(op_array) TSRMLS_CC); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { if (!EG(no_extensions)) { zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_begin_handler, EX(op_array) TSRMLS_CC); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_EXT_FCALL_END_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { if (!EG(no_extensions)) { zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_end_handler, EX(op_array) TSRMLS_CC); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_DECLARE_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); EX_T(opline->result.u.var).class_entry = do_bind_class(opline, EG(class_table), 0 TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); EX_T(opline->result.u.var).class_entry = do_bind_inherited_class(opline, EG(class_table), EX_T(opline->extended_value).class_entry, 0 TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_class_entry **pce, **pce_orig; if (zend_hash_find(EG(class_table), Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant)+1, (void**)&pce) == FAILURE || (zend_hash_find(EG(class_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), (void**)&pce_orig) == SUCCESS && *pce != *pce_orig)) { do_bind_inherited_class(opline, EG(class_table), EX_T(opline->extended_value).class_entry, 0 TSRMLS_CC); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_DECLARE_FUNCTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { do_bind_function(EX(opline), EG(function_table), 0); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_EXT_NOP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_NOP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_uint op_num = EG(opline_before_exception)-EG(active_op_array)->opcodes; int i; zend_uint catch_op_num; int catched = 0; zval restored_error_reporting; void **stack_frame = (void**)(((char*)EX(Ts)) + (ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * EX(op_array)->T)); while (zend_vm_stack_top(TSRMLS_C) != stack_frame) { zval *stack_zval_p = zend_vm_stack_pop(TSRMLS_C); zval_ptr_dtor(&stack_zval_p); } for (i=0; ilast_try_catch; i++) { if (EG(active_op_array)->try_catch_array[i].try_op > op_num) { /* further blocks will not be relevant... */ break; } if (op_num >= EG(active_op_array)->try_catch_array[i].try_op && op_num < EG(active_op_array)->try_catch_array[i].catch_op) { catch_op_num = EX(op_array)->try_catch_array[i].catch_op; catched = 1; } } while (EX(fbc)) { EX(called_scope) = (zend_class_entry*)zend_ptr_stack_pop(&EG(arg_types_stack)); if (EX(object)) { if (IS_CTOR_CALL(EX(called_scope))) { if (IS_CTOR_USED(EX(called_scope))) { Z_DELREF_P(EX(object)); } if (Z_REFCOUNT_P(EX(object)) == 1) { zend_object_store_ctor_failed(EX(object) TSRMLS_CC); } } zval_ptr_dtor(&EX(object)); } EX(called_scope) = DECODE_CTOR(EX(called_scope)); zend_arg_types_stack_2_pop(&EG(arg_types_stack), &EX(object), &EX(fbc)); } for (i=0; ilast_brk_cont; i++) { if (EX(op_array)->brk_cont_array[i].start < 0) { continue; } else if (EX(op_array)->brk_cont_array[i].start > op_num) { /* further blocks will not be relevant... */ break; } else if (op_num < EX(op_array)->brk_cont_array[i].brk) { if (!catched || catch_op_num >= EX(op_array)->brk_cont_array[i].brk) { zend_op *brk_opline = &EX(op_array)->opcodes[EX(op_array)->brk_cont_array[i].brk]; switch (brk_opline->opcode) { case ZEND_SWITCH_FREE: if (brk_opline->op1.u.EA.type != EXT_TYPE_FREE_ON_RETURN) { zend_switch_free(&EX_T(brk_opline->op1.u.var), brk_opline->extended_value TSRMLS_CC); } break; case ZEND_FREE: if (brk_opline->op1.u.EA.type != EXT_TYPE_FREE_ON_RETURN) { zendi_zval_dtor(EX_T(brk_opline->op1.u.var).tmp_var); } break; } } } } /* restore previous error_reporting value */ if (!EG(error_reporting) && EX(old_error_reporting) != NULL && Z_LVAL_P(EX(old_error_reporting)) != 0) { Z_TYPE(restored_error_reporting) = IS_LONG; Z_LVAL(restored_error_reporting) = Z_LVAL_P(EX(old_error_reporting)); convert_to_string(&restored_error_reporting); zend_alter_ini_entry_ex("error_reporting", sizeof("error_reporting"), Z_STRVAL(restored_error_reporting), Z_STRLEN(restored_error_reporting), ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME, 1 TSRMLS_CC); zendi_zval_dtor(restored_error_reporting); } EX(old_error_reporting) = NULL; if (!catched) { return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } else { ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[catch_op_num]); ZEND_VM_CONTINUE(); } } static int ZEND_FASTCALL ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_verify_abstract_class(EX_T(EX(opline)->op1.u.var).class_entry TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_USER_OPCODE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { int ret = zend_user_opcode_handlers[EX(opline)->opcode](ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_INTERNAL); switch (ret) { case ZEND_USER_OPCODE_CONTINUE: ZEND_VM_CONTINUE(); case ZEND_USER_OPCODE_RETURN: return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); case ZEND_USER_OPCODE_ENTER: ZEND_VM_ENTER(); case ZEND_USER_OPCODE_LEAVE: ZEND_VM_LEAVE(); case ZEND_USER_OPCODE_DISPATCH: ZEND_VM_DISPATCH(EX(opline)->opcode, EX(opline)); default: ZEND_VM_DISPATCH((zend_uchar)(ret & 0xff), EX(opline)); } } static int ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); if (IS_CONST == IS_UNUSED) { EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } else { zval *class_name = &opline->op2.u.constant; if (IS_CONST != IS_CONST && Z_TYPE_P(class_name) == IS_OBJECT) { EX_T(opline->result.u.var).class_entry = Z_OBJCE_P(class_name); } else if (Z_TYPE_P(class_name) == IS_STRING) { EX_T(opline->result.u.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC); } else { zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string"); } ZEND_VM_NEXT_OPCODE(); } } static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *function_name; char *function_name_strval, *lcname; int function_name_strlen; zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope)); if (IS_CONST == IS_CONST) { if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant)+1, opline->extended_value, (void **) &EX(fbc)) == FAILURE) { zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL(opline->op2.u.constant)); } } else { function_name = &opline->op2.u.constant; if (IS_CONST != IS_CONST && Z_TYPE_P(function_name) == IS_OBJECT && Z_OBJ_HANDLER_P(function_name, get_closure) && Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &EX(called_scope), &EX(fbc), &EX(object) TSRMLS_CC) == SUCCESS) { if (EX(object)) { Z_ADDREF_P(EX(object)); } ZEND_VM_NEXT_OPCODE(); } if (Z_TYPE_P(function_name) != IS_STRING) { zend_error_noreturn(E_ERROR, "Function name must be a string"); } function_name_strval = Z_STRVAL_P(function_name); function_name_strlen = Z_STRLEN_P(function_name); if (function_name_strval[0] == '\\') { function_name_strlen -= 1; lcname = zend_str_tolower_dup(function_name_strval + 1, function_name_strlen); } else { lcname = zend_str_tolower_dup(function_name_strval, function_name_strlen); } if (zend_hash_find(EG(function_table), lcname, function_name_strlen+1, (void **) &EX(fbc)) == FAILURE) { zend_error_noreturn(E_ERROR, "Call to undefined function %s()", function_name_strval); } efree(lcname); } EX(object) = NULL; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_NS_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline + 1; ZEND_VM_INC_OPCODE(); zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope)); if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant)+1, opline->extended_value, (void **) &EX(fbc))==FAILURE) { char *short_name = Z_STRVAL(opline->op1.u.constant)+Z_LVAL(op_data->op1.u.constant); if (zend_hash_quick_find(EG(function_table), short_name, Z_STRLEN(opline->op1.u.constant)-Z_LVAL(op_data->op1.u.constant)+1, op_data->extended_value, (void **) &EX(fbc))==FAILURE) { zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL(opline->op2.u.constant)); } } EX(object) = NULL; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_RECV_INIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *assignment_value; zend_uint arg_num = Z_LVAL(opline->op1.u.constant); zend_free_op free_res; zval **param = zend_vm_stack_get_arg(arg_num TSRMLS_CC); zval **var_ptr; if (param == NULL) { ALLOC_ZVAL(assignment_value); *assignment_value = opline->op2.u.constant; if ((Z_TYPE(opline->op2.u.constant) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT || Z_TYPE(opline->op2.u.constant)==IS_CONSTANT_ARRAY) { Z_SET_REFCOUNT_P(assignment_value, 1); zval_update_constant(&assignment_value, 0 TSRMLS_CC); } else { zval_copy_ctor(assignment_value); } INIT_PZVAL(assignment_value); } else { assignment_value = *param; Z_ADDREF_P(assignment_value); } zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, assignment_value, opline->extended_value TSRMLS_CC); var_ptr = get_zval_ptr_ptr(&opline->result, EX(Ts), &free_res, BP_VAR_W); Z_DELREF_PP(var_ptr); *var_ptr = assignment_value; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BRK_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_brk_cont_element *el; el = zend_brk_cont(&opline->op2.u.constant, opline->op1.u.opline_num, EX(op_array), EX(Ts) TSRMLS_CC); ZEND_VM_JMP(EX(op_array)->opcodes + el->brk); } static int ZEND_FASTCALL ZEND_CONT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_brk_cont_element *el; el = zend_brk_cont(&opline->op2.u.constant, opline->op1.u.opline_num, EX(op_array), EX(Ts) TSRMLS_CC); ZEND_VM_JMP(EX(op_array)->opcodes + el->cont); } static int ZEND_FASTCALL ZEND_GOTO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *brk_opline; zend_op *opline = EX(opline); zend_brk_cont_element *el; el = zend_brk_cont(&opline->op2.u.constant, opline->extended_value, EX(op_array), EX(Ts) TSRMLS_CC); brk_opline = EX(op_array)->opcodes + el->brk; switch (brk_opline->opcode) { case ZEND_SWITCH_FREE: if (brk_opline->op1.u.EA.type != EXT_TYPE_FREE_ON_RETURN) { zend_switch_free(&EX_T(brk_opline->op1.u.var), brk_opline->extended_value TSRMLS_CC); } break; case ZEND_FREE: if (brk_opline->op1.u.EA.type != EXT_TYPE_FREE_ON_RETURN) { zendi_zval_dtor(EX_T(brk_opline->op1.u.var).tmp_var); } break; } ZEND_VM_JMP(opline->op1.u.jmp_addr); } static int ZEND_FASTCALL ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_class_entry *ce = EX_T(opline->op1.u.var).class_entry; zend_class_entry *iface = zend_fetch_class(Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant), opline->extended_value TSRMLS_CC); if (iface) { if (!(iface->ce_flags & ZEND_ACC_INTERFACE)) { zend_error_noreturn(E_ERROR, "%s cannot implement %s - it is not an interface", ce->name, iface->name); } zend_do_implement_interface(ce, iface TSRMLS_CC); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); if (IS_TMP_VAR == IS_UNUSED) { EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } else { zend_free_op free_op2; zval *class_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(class_name) == IS_OBJECT) { EX_T(opline->result.u.var).class_entry = Z_OBJCE_P(class_name); } else if (Z_TYPE_P(class_name) == IS_STRING) { EX_T(opline->result.u.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC); } else { zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string"); } zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } } static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *function_name; char *function_name_strval, *lcname; int function_name_strlen; zend_free_op free_op2; zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope)); if (IS_TMP_VAR == IS_CONST) { if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant)+1, opline->extended_value, (void **) &EX(fbc)) == FAILURE) { zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL(opline->op2.u.constant)); } } else { function_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(function_name) == IS_OBJECT && Z_OBJ_HANDLER_P(function_name, get_closure) && Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &EX(called_scope), &EX(fbc), &EX(object) TSRMLS_CC) == SUCCESS) { if (EX(object)) { Z_ADDREF_P(EX(object)); } zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } if (Z_TYPE_P(function_name) != IS_STRING) { zend_error_noreturn(E_ERROR, "Function name must be a string"); } function_name_strval = Z_STRVAL_P(function_name); function_name_strlen = Z_STRLEN_P(function_name); if (function_name_strval[0] == '\\') { function_name_strlen -= 1; lcname = zend_str_tolower_dup(function_name_strval + 1, function_name_strlen); } else { lcname = zend_str_tolower_dup(function_name_strval, function_name_strlen); } if (zend_hash_find(EG(function_table), lcname, function_name_strlen+1, (void **) &EX(fbc)) == FAILURE) { zend_error_noreturn(E_ERROR, "Call to undefined function %s()", function_name_strval); } efree(lcname); zval_dtor(free_op2.var); } EX(object) = NULL; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BRK_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zend_brk_cont_element *el; el = zend_brk_cont(_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC), opline->op1.u.opline_num, EX(op_array), EX(Ts) TSRMLS_CC); zval_dtor(free_op2.var); ZEND_VM_JMP(EX(op_array)->opcodes + el->brk); } static int ZEND_FASTCALL ZEND_CONT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zend_brk_cont_element *el; el = zend_brk_cont(_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC), opline->op1.u.opline_num, EX(op_array), EX(Ts) TSRMLS_CC); zval_dtor(free_op2.var); ZEND_VM_JMP(EX(op_array)->opcodes + el->cont); } static int ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); if (IS_VAR == IS_UNUSED) { EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } else { zend_free_op free_op2; zval *class_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); if (IS_VAR != IS_CONST && Z_TYPE_P(class_name) == IS_OBJECT) { EX_T(opline->result.u.var).class_entry = Z_OBJCE_P(class_name); } else if (Z_TYPE_P(class_name) == IS_STRING) { EX_T(opline->result.u.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC); } else { zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string"); } if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } } static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *function_name; char *function_name_strval, *lcname; int function_name_strlen; zend_free_op free_op2; zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope)); if (IS_VAR == IS_CONST) { if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant)+1, opline->extended_value, (void **) &EX(fbc)) == FAILURE) { zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL(opline->op2.u.constant)); } } else { function_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); if (IS_VAR != IS_CONST && Z_TYPE_P(function_name) == IS_OBJECT && Z_OBJ_HANDLER_P(function_name, get_closure) && Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &EX(called_scope), &EX(fbc), &EX(object) TSRMLS_CC) == SUCCESS) { if (EX(object)) { Z_ADDREF_P(EX(object)); } if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } if (Z_TYPE_P(function_name) != IS_STRING) { zend_error_noreturn(E_ERROR, "Function name must be a string"); } function_name_strval = Z_STRVAL_P(function_name); function_name_strlen = Z_STRLEN_P(function_name); if (function_name_strval[0] == '\\') { function_name_strlen -= 1; lcname = zend_str_tolower_dup(function_name_strval + 1, function_name_strlen); } else { lcname = zend_str_tolower_dup(function_name_strval, function_name_strlen); } if (zend_hash_find(EG(function_table), lcname, function_name_strlen+1, (void **) &EX(fbc)) == FAILURE) { zend_error_noreturn(E_ERROR, "Call to undefined function %s()", function_name_strval); } efree(lcname); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } EX(object) = NULL; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BRK_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zend_brk_cont_element *el; el = zend_brk_cont(_get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC), opline->op1.u.opline_num, EX(op_array), EX(Ts) TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_JMP(EX(op_array)->opcodes + el->brk); } static int ZEND_FASTCALL ZEND_CONT_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zend_brk_cont_element *el; el = zend_brk_cont(_get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC), opline->op1.u.opline_num, EX(op_array), EX(Ts) TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_JMP(EX(op_array)->opcodes + el->cont); } static int ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); if (IS_UNUSED == IS_UNUSED) { EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } else { zval *class_name = NULL; if (IS_UNUSED != IS_CONST && Z_TYPE_P(class_name) == IS_OBJECT) { EX_T(opline->result.u.var).class_entry = Z_OBJCE_P(class_name); } else if (Z_TYPE_P(class_name) == IS_STRING) { EX_T(opline->result.u.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC); } else { zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string"); } ZEND_VM_NEXT_OPCODE(); } } static int ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); if (IS_CV == IS_UNUSED) { EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } else { zval *class_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); if (IS_CV != IS_CONST && Z_TYPE_P(class_name) == IS_OBJECT) { EX_T(opline->result.u.var).class_entry = Z_OBJCE_P(class_name); } else if (Z_TYPE_P(class_name) == IS_STRING) { EX_T(opline->result.u.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC); } else { zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string"); } ZEND_VM_NEXT_OPCODE(); } } static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *function_name; char *function_name_strval, *lcname; int function_name_strlen; zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope)); if (IS_CV == IS_CONST) { if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant)+1, opline->extended_value, (void **) &EX(fbc)) == FAILURE) { zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL(opline->op2.u.constant)); } } else { function_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); if (IS_CV != IS_CONST && Z_TYPE_P(function_name) == IS_OBJECT && Z_OBJ_HANDLER_P(function_name, get_closure) && Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &EX(called_scope), &EX(fbc), &EX(object) TSRMLS_CC) == SUCCESS) { if (EX(object)) { Z_ADDREF_P(EX(object)); } ZEND_VM_NEXT_OPCODE(); } if (Z_TYPE_P(function_name) != IS_STRING) { zend_error_noreturn(E_ERROR, "Function name must be a string"); } function_name_strval = Z_STRVAL_P(function_name); function_name_strlen = Z_STRLEN_P(function_name); if (function_name_strval[0] == '\\') { function_name_strlen -= 1; lcname = zend_str_tolower_dup(function_name_strval + 1, function_name_strlen); } else { lcname = zend_str_tolower_dup(function_name_strval, function_name_strlen); } if (zend_hash_find(EG(function_table), lcname, function_name_strlen+1, (void **) &EX(fbc)) == FAILURE) { zend_error_noreturn(E_ERROR, "Call to undefined function %s()", function_name_strval); } efree(lcname); } EX(object) = NULL; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CATCH_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_class_entry *ce; /* Check whether an exception has been thrown, if not, jump over code */ zend_exception_restore(TSRMLS_C); if (EG(exception) == NULL) { ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]); ZEND_VM_CONTINUE(); /* CHECK_ME */ } ce = Z_OBJCE_P(EG(exception)); if (ce != EX_T(opline->op1.u.var).class_entry) { if (!instanceof_function(ce, EX_T(opline->op1.u.var).class_entry TSRMLS_CC)) { if (opline->op1.u.EA.type) { zend_throw_exception_internal(NULL TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]); ZEND_VM_CONTINUE(); /* CHECK_ME */ } } if (!EG(active_symbol_table)) { if (EX(CVs)[opline->op2.u.var]) { zval_ptr_dtor(EX(CVs)[opline->op2.u.var]); } EX(CVs)[opline->op2.u.var] = (zval**)EX(CVs) + (EX(op_array)->last_var + opline->op2.u.var); *EX(CVs)[opline->op2.u.var] = EG(exception); } else { zend_compiled_variable *cv = &CV_DEF_OF(opline->op2.u.var); zend_hash_quick_update(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, &EG(exception), sizeof(zval *), (void**)&EX(CVs)[opline->op2.u.var]); } EG(exception) = NULL; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BRK_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_brk_cont_element *el; el = zend_brk_cont(_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC), opline->op1.u.opline_num, EX(op_array), EX(Ts) TSRMLS_CC); ZEND_VM_JMP(EX(op_array)->opcodes + el->brk); } static int ZEND_FASTCALL ZEND_CONT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_brk_cont_element *el; el = zend_brk_cont(_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC), opline->op1.u.opline_num, EX(op_array), EX(Ts) TSRMLS_CC); ZEND_VM_JMP(EX(op_array)->opcodes + el->cont); } static int ZEND_FASTCALL ZEND_BW_NOT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); bitwise_not_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BOOL_NOT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); boolean_not_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval z_copy; zval *z = &opline->op1.u.constant; if (IS_CONST != IS_CONST && Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get_method != NULL && zend_std_cast_object_tostring(z, &z_copy, IS_STRING TSRMLS_CC) == SUCCESS) { zend_print_variable(&z_copy); zval_dtor(&z_copy); } else { zend_print_variable(z); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_PRINT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1; Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_LONG; return ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST(int type, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *varname = &opline->op1.u.constant; zval **retval; zval tmp_varname; HashTable *target_symbol_table; if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) { tmp_varname = *varname; zval_copy_ctor(&tmp_varname); convert_to_string(&tmp_varname); varname = &tmp_varname; } if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC); } else { target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC); /* if (!target_symbol_table) { ZEND_VM_NEXT_OPCODE(); } */ if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &retval) == FAILURE) { switch (type) { case BP_VAR_R: case BP_VAR_UNSET: zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname)); /* break missing intentionally */ case BP_VAR_IS: retval = &EG(uninitialized_zval_ptr); break; case BP_VAR_RW: zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname)); /* break missing intentionally */ case BP_VAR_W: { zval *new_zval = &EG(uninitialized_zval); Z_ADDREF_P(new_zval); zend_hash_update(target_symbol_table, varname->value.str.val, varname->value.str.len+1, &new_zval, sizeof(zval *), (void **) &retval); } break; EMPTY_SWITCH_DEFAULT_CASE() } } switch (opline->op2.u.EA.type) { case ZEND_FETCH_GLOBAL: if (IS_CONST != IS_TMP_VAR) { } break; case ZEND_FETCH_LOCAL: break; case ZEND_FETCH_STATIC: zval_update_constant(retval, (void*) 1 TSRMLS_CC); break; case ZEND_FETCH_GLOBAL_LOCK: if (IS_CONST == IS_VAR && !free_op1.var) { PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr); } break; } } if (IS_CONST != IS_CONST && varname == &tmp_varname) { zval_dtor(varname); } if (!RETURN_VALUE_UNUSED(&opline->result)) { if (opline->extended_value & ZEND_FETCH_MAKE_REF) { SEPARATE_ZVAL_TO_MAKE_IS_REF(retval); } PZVAL_LOCK(*retval); switch (type) { case BP_VAR_R: case BP_VAR_IS: AI_SET_PTR(EX_T(opline->result.u.var).var, *retval); break; case BP_VAR_UNSET: { zend_free_op free_res; EX_T(opline->result.u.var).var.ptr_ptr = retval; PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res); if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr); } PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr); FREE_OP_VAR_PTR(free_res); break; default: EX_T(opline->result.u.var).var.ptr_ptr = retval; break; } } } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_CONST(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_CONST(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_CONST(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_CONST(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), EX(opline)->extended_value)?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_CONST(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_CONST(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_JMPZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *val = &opline->op1.u.constant; int ret; if (IS_CONST == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) { ret = Z_LVAL_P(val); } else { ret = i_zend_is_true(val); if (UNEXPECTED(EG(exception) != NULL)) { ZEND_VM_CONTINUE(); } } if (!ret) { #if DEBUG_ZEND>=2 printf("Conditional jmp to %d\n", opline->op2.u.opline_num); #endif ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr); ZEND_VM_CONTINUE(); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_JMPNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *val = &opline->op1.u.constant; int ret; if (IS_CONST == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) { ret = Z_LVAL_P(val); } else { ret = i_zend_is_true(val); if (UNEXPECTED(EG(exception) != NULL)) { ZEND_VM_CONTINUE(); } } if (ret) { #if DEBUG_ZEND>=2 printf("Conditional jmp to %d\n", opline->op2.u.opline_num); #endif ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr); ZEND_VM_CONTINUE(); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_JMPZNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *val = &opline->op1.u.constant; int retval; if (IS_CONST == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) { retval = Z_LVAL_P(val); } else { retval = i_zend_is_true(val); if (UNEXPECTED(EG(exception) != NULL)) { ZEND_VM_CONTINUE(); } } if (EXPECTED(retval != 0)) { #if DEBUG_ZEND>=2 printf("Conditional jmp on true to %d\n", opline->extended_value); #endif ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]); ZEND_VM_CONTINUE(); /* CHECK_ME */ } else { #if DEBUG_ZEND>=2 printf("Conditional jmp on false to %d\n", opline->op2.u.opline_num); #endif ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.u.opline_num]); ZEND_VM_CONTINUE(); /* CHECK_ME */ } } static int ZEND_FASTCALL ZEND_JMPZ_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *val = &opline->op1.u.constant; int retval; if (IS_CONST == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) { retval = Z_LVAL_P(val); } else { retval = i_zend_is_true(val); if (UNEXPECTED(EG(exception) != NULL)) { ZEND_VM_CONTINUE(); } } Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval; Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; if (!retval) { #if DEBUG_ZEND>=2 printf("Conditional jmp to %d\n", opline->op2.u.opline_num); #endif ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr); ZEND_VM_CONTINUE(); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_JMPNZ_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *val = &opline->op1.u.constant; int retval; if (IS_CONST == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) { retval = Z_LVAL_P(val); } else { retval = i_zend_is_true(val); if (UNEXPECTED(EG(exception) != NULL)) { ZEND_VM_CONTINUE(); } } Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval; Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; if (retval) { #if DEBUG_ZEND>=2 printf("Conditional jmp to %d\n", opline->op2.u.opline_num); #endif ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr); ZEND_VM_CONTINUE(); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_DO_FCALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *fname = &opline->op1.u.constant; zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope)); if (zend_hash_quick_find(EG(function_table), fname->value.str.val, fname->value.str.len+1, Z_LVAL(opline->op2.u.constant), (void **) &EX(function_state).function)==FAILURE) { zend_error_noreturn(E_ERROR, "Call to undefined function %s()", fname->value.str.val); } EX(object) = NULL; return zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_RETURN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *retval_ptr; zval **retval_ptr_ptr; if (EG(active_op_array)->return_reference == ZEND_RETURN_REF) { if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) { /* Not supposed to happen, but we'll allow it */ zend_error(E_NOTICE, "Only variable references should be returned by reference"); goto return_by_value; } retval_ptr_ptr = NULL; if (IS_CONST == IS_VAR && !retval_ptr_ptr) { zend_error_noreturn(E_ERROR, "Cannot return string offsets by reference"); } if (IS_CONST == IS_VAR && !Z_ISREF_PP(retval_ptr_ptr)) { if (opline->extended_value == ZEND_RETURNS_FUNCTION && EX_T(opline->op1.u.var).var.fcall_returned_reference) { } else if (EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) { if (IS_CONST == IS_VAR && !0) { PZVAL_LOCK(*retval_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */ } zend_error(E_NOTICE, "Only variable references should be returned by reference"); goto return_by_value; } } if (EG(return_value_ptr_ptr)) { SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr); Z_ADDREF_PP(retval_ptr_ptr); (*EG(return_value_ptr_ptr)) = (*retval_ptr_ptr); } } else { return_by_value: retval_ptr = &opline->op1.u.constant; if (!EG(return_value_ptr_ptr)) { if (IS_CONST == IS_TMP_VAR) { } } else if (!0) { /* Not a temp var */ if (IS_CONST == IS_CONST || EG(active_op_array)->return_reference == ZEND_RETURN_REF || (PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) { zval *ret; ALLOC_ZVAL(ret); INIT_PZVAL_COPY(ret, retval_ptr); zval_copy_ctor(ret); *EG(return_value_ptr_ptr) = ret; } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && retval_ptr == &EG(uninitialized_zval)) { zval *ret; ALLOC_INIT_ZVAL(ret); *EG(return_value_ptr_ptr) = ret; } else { *EG(return_value_ptr_ptr) = retval_ptr; Z_ADDREF_P(retval_ptr); } } else { zval *ret; ALLOC_ZVAL(ret); INIT_PZVAL_COPY(ret, retval_ptr); *EG(return_value_ptr_ptr) = ret; } } return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_THROW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *value; zval *exception; value = &opline->op1.u.constant; if (IS_CONST == IS_CONST || Z_TYPE_P(value) != IS_OBJECT) { zend_error_noreturn(E_ERROR, "Can only throw objects"); } zend_exception_save(TSRMLS_C); /* Not sure if a complete copy is what we want here */ ALLOC_ZVAL(exception); INIT_PZVAL_COPY(exception, value); if (!0) { zval_copy_ctor(exception); } zend_throw_exception_object(exception TSRMLS_CC); zend_exception_restore(TSRMLS_C); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SEND_VAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); if (opline->extended_value==ZEND_DO_FCALL_BY_NAME && ARG_MUST_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) { zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.u.opline_num); } { zval *valptr; zval *value; value = &opline->op1.u.constant; ALLOC_ZVAL(valptr); INIT_PZVAL_COPY(valptr, value); if (!0) { zval_copy_ctor(valptr); } zend_vm_stack_push(valptr TSRMLS_CC); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BOOL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); /* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */ Z_LVAL(EX_T(opline->result.u.var).tmp_var) = i_zend_is_true(&opline->op1.u.constant); Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CLONE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *obj = &opline->op1.u.constant; zend_class_entry *ce; zend_function *clone; zend_object_clone_obj_t clone_call; if (IS_CONST == IS_CONST || (IS_CONST == IS_VAR && !obj) || Z_TYPE_P(obj) != IS_OBJECT) { zend_error_noreturn(E_ERROR, "__clone method called on non-object"); } ce = Z_OBJCE_P(obj); clone = ce ? ce->clone : NULL; clone_call = Z_OBJ_HT_P(obj)->clone_obj; if (!clone_call) { if (ce) { zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object of class %s", ce->name); } else { zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object"); } } if (ce && clone) { if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) { /* Ensure that if we're calling a private function, we're allowed to do so. */ if (ce != EG(scope)) { zend_error_noreturn(E_ERROR, "Call to private %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : ""); } } else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) { /* Ensure that if we're calling a protected function, we're allowed to do so. */ if (!zend_check_protected(clone->common.scope, EG(scope))) { zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : ""); } } } EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr; if (!EG(exception)) { ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr); Z_OBJVAL_P(EX_T(opline->result.u.var).var.ptr) = clone_call(obj TSRMLS_CC); Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_OBJECT; Z_SET_REFCOUNT_P(EX_T(opline->result.u.var).var.ptr, 1); Z_SET_ISREF_P(EX_T(opline->result.u.var).var.ptr); if (!RETURN_VALUE_USED(opline) || EG(exception)) { zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr); } } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CAST_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *expr = &opline->op1.u.constant; zval *result = &EX_T(opline->result.u.var).tmp_var; if (opline->extended_value != IS_STRING) { *result = *expr; if (!0) { zendi_zval_copy_ctor(*result); } } switch (opline->extended_value) { case IS_NULL: convert_to_null(result); break; case IS_BOOL: convert_to_boolean(result); break; case IS_LONG: convert_to_long(result); break; case IS_DOUBLE: convert_to_double(result); break; case IS_STRING: { zval var_copy; int use_copy; zend_make_printable_zval(expr, &var_copy, &use_copy); if (use_copy) { *result = var_copy; if (0) { } } else { *result = *expr; if (!0) { zendi_zval_copy_ctor(*result); } } break; } case IS_ARRAY: convert_to_array(result); break; case IS_OBJECT: convert_to_object(result); break; } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op_array *new_op_array=NULL; int return_value_used; zval *inc_filename = &opline->op1.u.constant; zval tmp_inc_filename; zend_bool failure_retval=0; if (inc_filename->type!=IS_STRING) { tmp_inc_filename = *inc_filename; zval_copy_ctor(&tmp_inc_filename); convert_to_string(&tmp_inc_filename); inc_filename = &tmp_inc_filename; } return_value_used = RETURN_VALUE_USED(opline); switch (Z_LVAL(opline->op2.u.constant)) { case ZEND_INCLUDE_ONCE: case ZEND_REQUIRE_ONCE: { zend_file_handle file_handle; char *resolved_path; resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC); if (resolved_path) { failure_retval = zend_hash_exists(&EG(included_files), resolved_path, strlen(resolved_path)+1); } else { resolved_path = Z_STRVAL_P(inc_filename); } if (failure_retval) { /* do nothing, file already included */ } else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) { if (!file_handle.opened_path) { file_handle.opened_path = estrdup(resolved_path); } if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) { new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC); zend_destroy_file_handle(&file_handle TSRMLS_CC); } else { zend_file_handle_dtor(&file_handle TSRMLS_CC); failure_retval=1; } } else { if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) { zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC); } else { zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC); } } if (resolved_path != Z_STRVAL_P(inc_filename)) { efree(resolved_path); } } break; case ZEND_INCLUDE: case ZEND_REQUIRE: new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC); break; case ZEND_EVAL: { char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC); new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC); efree(eval_desc); } break; EMPTY_SWITCH_DEFAULT_CASE() } if (inc_filename==&tmp_inc_filename) { zval_dtor(&tmp_inc_filename); } EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr; if (new_op_array && !EG(exception)) { EX(original_return_value) = EG(return_value_ptr_ptr); EG(return_value_ptr_ptr) = return_value_used ? EX_T(opline->result.u.var).var.ptr_ptr : NULL; EG(active_op_array) = new_op_array; EX_T(opline->result.u.var).var.ptr = NULL; EX(current_object) = EX(object); EX(function_state).function = (zend_function *) new_op_array; EX(object) = NULL; if (!EG(active_symbol_table)) { zend_rebuild_symbol_table(TSRMLS_C); } if (zend_execute == execute) { EX(call_opline) = opline; ZEND_VM_ENTER(); } else { zend_execute(new_op_array TSRMLS_CC); } EX(function_state).function = (zend_function *) EX(op_array); EX(object) = EX(current_object); if (return_value_used) { if (!EX_T(opline->result.u.var).var.ptr) { /* there was no return statement */ ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr); INIT_PZVAL(EX_T(opline->result.u.var).var.ptr); Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = 1; Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL; } } EG(opline_ptr) = &EX(opline); EG(active_op_array) = EX(op_array); EG(return_value_ptr_ptr) = EX(original_return_value); destroy_op_array(new_op_array TSRMLS_CC); efree(new_op_array); if (EG(exception)) { zend_throw_exception_internal(NULL TSRMLS_CC); } } else { if (return_value_used) { ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr); INIT_ZVAL(*EX_T(opline->result.u.var).var.ptr); Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = failure_retval; Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL; } } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval tmp, *varname; HashTable *target_symbol_table; if (IS_CONST == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); if (zend_hash_quick_del(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value) == SUCCESS) { while (ex && ex->symbol_table == EG(active_symbol_table)) { int i; if (ex->op_array) { for (i = 0; i < ex->op_array->last_var; i++) { if (ex->op_array->vars[i].hash_value == cv->hash_value && ex->op_array->vars[i].name_len == cv->name_len && !memcmp(ex->op_array->vars[i].name, cv->name, cv->name_len)) { ex->CVs[i] = NULL; break; } } } ex = ex->prev_execute_data; } } EX(CVs)[opline->op1.u.var] = NULL; } else if (EX(CVs)[opline->op1.u.var]) { zval_ptr_dtor(EX(CVs)[opline->op1.u.var]); EX(CVs)[opline->op1.u.var] = NULL; } ZEND_VM_NEXT_OPCODE(); } varname = &opline->op1.u.constant; if (Z_TYPE_P(varname) != IS_STRING) { tmp = *varname; zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) { Z_ADDREF_P(varname); } if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { zend_std_unset_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname) TSRMLS_CC); } else { ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1); target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC); if (zend_hash_quick_del(target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value) == SUCCESS) { zend_execute_data *ex = execute_data; do { int i; if (ex->op_array) { for (i = 0; i < ex->op_array->last_var; i++) { if (ex->op_array->vars[i].hash_value == hash_value && ex->op_array->vars[i].name_len == varname->value.str.len && !memcmp(ex->op_array->vars[i].name, varname->value.str.val, varname->value.str.len)) { ex->CVs[i] = NULL; break; } } } ex = ex->prev_execute_data; } while (ex && ex->symbol_table == target_symbol_table); } } if (varname == &tmp) { zval_dtor(&tmp); } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) { zval_ptr_dtor(&varname); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *array_ptr, **array_ptr_ptr; HashTable *fe_ht; zend_object_iterator *iter = NULL; zend_class_entry *ce = NULL; zend_bool is_empty = 0; if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { array_ptr_ptr = NULL; if (array_ptr_ptr == NULL || array_ptr_ptr == &EG(uninitialized_zval_ptr)) { ALLOC_INIT_ZVAL(array_ptr); } else if (Z_TYPE_PP(array_ptr_ptr) == IS_OBJECT) { if(Z_OBJ_HT_PP(array_ptr_ptr)->get_class_entry == NULL) { zend_error(E_WARNING, "foreach() cannot iterate over objects without PHP class"); ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num); } ce = Z_OBJCE_PP(array_ptr_ptr); if (!ce || ce->get_iterator == NULL) { SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); Z_ADDREF_PP(array_ptr_ptr); } array_ptr = *array_ptr_ptr; } else { if (Z_TYPE_PP(array_ptr_ptr) == IS_ARRAY) { SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); if (opline->extended_value & ZEND_FE_FETCH_BYREF) { Z_SET_ISREF_PP(array_ptr_ptr); } } array_ptr = *array_ptr_ptr; Z_ADDREF_P(array_ptr); } } else { array_ptr = &opline->op1.u.constant; if (0) { /* IS_TMP_VAR */ zval *tmp; ALLOC_ZVAL(tmp); INIT_PZVAL_COPY(tmp, array_ptr); array_ptr = tmp; if (Z_TYPE_P(array_ptr) == IS_OBJECT) { ce = Z_OBJCE_P(array_ptr); if (ce && ce->get_iterator) { Z_DELREF_P(array_ptr); } } } else if (Z_TYPE_P(array_ptr) == IS_OBJECT) { ce = Z_OBJCE_P(array_ptr); if (!ce || !ce->get_iterator) { Z_ADDREF_P(array_ptr); } } else if (IS_CONST == IS_CONST || ((IS_CONST == IS_CV || IS_CONST == IS_VAR) && !Z_ISREF_P(array_ptr) && Z_REFCOUNT_P(array_ptr) > 1)) { zval *tmp; ALLOC_ZVAL(tmp); INIT_PZVAL_COPY(tmp, array_ptr); zval_copy_ctor(tmp); array_ptr = tmp; } else { Z_ADDREF_P(array_ptr); } } if (ce && ce->get_iterator) { iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC); if (iter && !EG(exception)) { array_ptr = zend_iterator_wrap(iter TSRMLS_CC); } else { if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { } else { } if (!EG(exception)) { zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Object of type %s did not create an Iterator", ce->name); } zend_throw_exception_internal(NULL TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } } AI_SET_PTR(EX_T(opline->result.u.var).var, array_ptr); PZVAL_LOCK(array_ptr); if (iter) { iter->index = 0; if (iter->funcs->rewind) { iter->funcs->rewind(iter TSRMLS_CC); if (EG(exception)) { Z_DELREF_P(array_ptr); zval_ptr_dtor(&array_ptr); if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { } else { } ZEND_VM_NEXT_OPCODE(); } } is_empty = iter->funcs->valid(iter TSRMLS_CC) != SUCCESS; if (EG(exception)) { Z_DELREF_P(array_ptr); zval_ptr_dtor(&array_ptr); if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { } else { } ZEND_VM_NEXT_OPCODE(); } iter->index = -1; /* will be set to 0 before using next handler */ } else if ((fe_ht = HASH_OF(array_ptr)) != NULL) { zend_hash_internal_pointer_reset(fe_ht); if (ce) { zend_object *zobj = zend_objects_get_address(array_ptr TSRMLS_CC); while (zend_hash_has_more_elements(fe_ht) == SUCCESS) { char *str_key; uint str_key_len; ulong int_key; zend_uchar key_type; key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL); if (key_type != HASH_KEY_NON_EXISTANT && (key_type == HASH_KEY_IS_LONG || zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) == SUCCESS)) { break; } zend_hash_move_forward(fe_ht); } } is_empty = zend_hash_has_more_elements(fe_ht) != SUCCESS; zend_hash_get_pointer(fe_ht, &EX_T(opline->result.u.var).fe.fe_pos); } else { zend_error(E_WARNING, "Invalid argument supplied for foreach()"); is_empty = 1; } if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { } else { } if (is_empty) { ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num); } else { ZEND_VM_NEXT_OPCODE(); } } static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval **value; zend_bool isset = 1; if (IS_CONST == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) { isset = 0; } } else { isset = 0; } } else { HashTable *target_symbol_table; zval tmp, *varname = &opline->op1.u.constant; if (Z_TYPE_P(varname) != IS_STRING) { tmp = *varname; zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; } if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { value = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1 TSRMLS_CC); if (!value) { isset = 0; } } else { target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC); if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) { isset = 0; } } if (varname == &tmp) { zval_dtor(&tmp); } } Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; } else { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = isset; } break; case ZEND_ISEMPTY: if (!isset || !i_zend_is_true(*value)) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1; } else { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; } break; } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_EXIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { #if 0 || (IS_CONST != IS_UNUSED) zend_op *opline = EX(opline); if (IS_CONST != IS_UNUSED) { zval *ptr = &opline->op1.u.constant; if (Z_TYPE_P(ptr) == IS_LONG) { EG(exit_status) = Z_LVAL_P(ptr); } else { zend_print_variable(ptr); } } #endif zend_bailout(); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_JMP_SET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *value = &opline->op1.u.constant; if (i_zend_is_true(value)) { EX_T(opline->result.u.var).tmp_var = *value; zendi_zval_copy_ctor(EX_T(opline->result.u.var).tmp_var); #if DEBUG_ZEND>=2 printf("Conditional jmp to %d\n", opline->op2.u.opline_num); #endif ZEND_VM_JMP(opline->op2.u.jmp_addr); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *value = &opline->op1.u.constant; EX_T(opline->result.u.var).tmp_var = *value; if (!0) { zval_copy_ctor(&EX_T(opline->result.u.var).tmp_var); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_TICKS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); if (++EG(ticks_count)>=Z_LVAL(opline->op1.u.constant)) { EG(ticks_count)=0; if (zend_ticks_function) { zend_ticks_function(Z_LVAL(opline->op1.u.constant)); } } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ADD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); add_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SUB_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); sub_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_MUL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); mul_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_DIV_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); div_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_MOD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); mod_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); shift_left_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); shift_right_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); concat_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); is_identical_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *result = &EX_T(opline->result.u.var).tmp_var; is_identical_function(result, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); Z_LVAL_P(result) = !Z_LVAL_P(result); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) == 0)); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) != 0)); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) < 0)); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0)); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); bitwise_or_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); bitwise_and_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); boolean_xor_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FETCH_DIM_TMP_VAR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *container = &opline->op1.u.constant; if (Z_TYPE_P(container) != IS_ARRAY) { if (!RETURN_VALUE_UNUSED(&opline->result)) { AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr)); PZVAL_LOCK(EG(uninitialized_zval_ptr)); } } else { zval *dim = &opline->op2.u.constant; AI_SET_PTR(EX_T(opline->result.u.var).var, *zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, BP_VAR_R TSRMLS_CC)); SELECTIVE_PZVAL_LOCK(EX_T(opline->result.u.var).var.ptr, &opline->result); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *function_name; zend_class_entry *ce; zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope)); if (IS_CONST == IS_CONST) { /* no function found. try a static method in class */ ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC); if (!ce) { zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant)); } EX(called_scope) = ce; } else { ce = EX_T(opline->op1.u.var).class_entry; if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) { EX(called_scope) = EG(called_scope); } else { EX(called_scope) = ce; } } if(IS_CONST != IS_UNUSED) { char *function_name_strval = NULL; int function_name_strlen = 0; if (IS_CONST == IS_CONST) { function_name_strval = Z_STRVAL(opline->op2.u.constant); function_name_strlen = Z_STRLEN(opline->op2.u.constant); } else { function_name = &opline->op2.u.constant; if (Z_TYPE_P(function_name) != IS_STRING) { zend_error_noreturn(E_ERROR, "Function name must be a string"); } else { function_name_strval = Z_STRVAL_P(function_name); function_name_strlen = Z_STRLEN_P(function_name); } } if (function_name_strval) { if (ce->get_static_method) { EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); } else { EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); } if (!EX(fbc)) { zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval); } } if (IS_CONST != IS_CONST) { } } else { if(!ce->constructor) { zend_error_noreturn(E_ERROR, "Cannot call constructor"); } if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) { zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name); } EX(fbc) = ce->constructor; } if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) { EX(object) = NULL; } else { if (EG(This) && Z_OBJ_HT_P(EG(This))->get_class_entry && !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) { /* We are calling method of the other (incompatible) class, but passing $this. This is done for compatibility with php-4. */ int severity; char *verb; if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) { severity = E_STRICT; verb = "should not"; } else { /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */ severity = E_ERROR; verb = "cannot"; } zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb); } if ((EX(object) = EG(This))) { Z_ADDREF_P(EX(object)); EX(called_scope) = Z_OBJCE_P(EX(object)); } } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CASE_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); int switch_expr_is_overloaded=0; if (IS_CONST==IS_VAR) { if (EX_T(opline->op1.u.var).var.ptr_ptr) { PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr); } else { switch_expr_is_overloaded = 1; Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str); } } is_equal_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); if (switch_expr_is_overloaded) { /* We only free op1 if this is a string offset, * Since if it is a TMP_VAR, it'll be reused by * other CASE opcodes (whereas string offsets * are allocated at each get_zval_ptr()) */ EX_T(opline->op1.u.var).var.ptr_ptr = NULL; EX_T(opline->op1.u.var).var.ptr = NULL; } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); if (IS_CONST == IS_UNUSED) { /* namespaced constant */ if (!zend_get_constant_ex(Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant), &EX_T(opline->result.u.var).tmp_var, NULL, opline->extended_value TSRMLS_CC)) { if ((opline->extended_value & IS_CONSTANT_UNQUALIFIED) != 0) { char *actual = (char *)zend_memrchr(Z_STRVAL(opline->op2.u.constant), '\\', Z_STRLEN(opline->op2.u.constant)); if(!actual) { actual = Z_STRVAL(opline->op2.u.constant); } else { actual++; } /* non-qualified constant - allow text substitution */ zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'", actual, actual); ZVAL_STRINGL(&EX_T(opline->result.u.var).tmp_var, actual, Z_STRLEN(opline->op2.u.constant)-(actual - Z_STRVAL(opline->op2.u.constant)), 1); } else { zend_error_noreturn(E_ERROR, "Undefined constant '%s'", Z_STRVAL(opline->op2.u.constant), Z_STRVAL(opline->op2.u.constant)); } } ZEND_VM_NEXT_OPCODE(); } else { /* class constant */ zend_class_entry *ce; zval **value; if (IS_CONST == IS_CONST) { ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC); if (!ce) { zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL(opline->op2.u.constant)); } } else { ce = EX_T(opline->op1.u.var).class_entry; } if (zend_hash_find(&ce->constants_table, Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant)+1, (void **) &value) == SUCCESS) { if (Z_TYPE_PP(value) == IS_CONSTANT_ARRAY || (Z_TYPE_PP(value) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT) { zend_class_entry *old_scope = EG(scope); EG(scope) = ce; zval_update_constant(value, (void *) 1 TSRMLS_CC); EG(scope) = old_scope; } EX_T(opline->result.u.var).tmp_var = **value; zval_copy_ctor(&EX_T(opline->result.u.var).tmp_var); } else { zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL(opline->op2.u.constant)); } ZEND_VM_NEXT_OPCODE(); } } static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr; zval *offset=&opline->op2.u.constant; #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV zval **expr_ptr_ptr = NULL; if (opline->extended_value) { expr_ptr_ptr=NULL; expr_ptr = *expr_ptr_ptr; } else { expr_ptr=&opline->op1.u.constant; } #else expr_ptr=&opline->op1.u.constant; #endif if (0) { /* temporary variable */ zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; } else { #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV if (opline->extended_value) { SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr); expr_ptr = *expr_ptr_ptr; Z_ADDREF_P(expr_ptr); } else #endif if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) { zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; zendi_zval_copy_ctor(*expr_ptr); } else { Z_ADDREF_P(expr_ptr); } } if (offset) { switch (Z_TYPE_P(offset)) { case IS_DOUBLE: zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL); break; case IS_LONG: case IS_BOOL: zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL); break; case IS_STRING: zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL); break; case IS_NULL: zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL); break; default: zend_error(E_WARNING, "Illegal offset type"); zval_ptr_dtor(&expr_ptr); /* do nothing */ break; } } else { zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL); } if (opline->extended_value) { } else { } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); array_init(&EX_T(opline->result.u.var).tmp_var); if (IS_CONST == IS_UNUSED) { ZEND_VM_NEXT_OPCODE(); #if 0 || IS_CONST != IS_UNUSED } else { return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); #endif } } static int ZEND_FASTCALL ZEND_DECLARE_CONST_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *name = &opline->op1.u.constant; zval *val = &opline->op2.u.constant; zend_constant c; if ((Z_TYPE_P(val) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT || Z_TYPE_P(val) == IS_CONSTANT_ARRAY) { zval tmp = *val; zval *tmp_ptr = &tmp; if (Z_TYPE_P(val) == IS_CONSTANT_ARRAY) { zval_copy_ctor(&tmp); } INIT_PZVAL(&tmp); zval_update_constant(&tmp_ptr, NULL TSRMLS_CC); c.value = *tmp_ptr; } else { c.value = *val; zval_copy_ctor(&c.value); } c.flags = CONST_CS; /* non persistent, case sensetive */ c.name = zend_strndup(Z_STRVAL_P(name), Z_STRLEN_P(name)); c.name_len = Z_STRLEN_P(name)+1; c.module_number = PHP_USER_CONSTANT; if (zend_register_constant(&c TSRMLS_CC) == FAILURE) { } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_function *op_array; if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), Z_LVAL(opline->op2.u.constant), (void *) &op_array) == FAILURE || op_array->type != ZEND_USER_FUNCTION) { zend_error_noreturn(E_ERROR, "Base lambda function for closure not found"); } zend_create_closure(&EX_T(opline->result.u.var).tmp_var, op_array TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ADD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; add_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SUB_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; sub_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_MUL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; mul_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_DIV_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; div_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_MOD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; mod_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; shift_left_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; shift_right_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; concat_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; is_identical_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; is_identical_function(result, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); Z_LVAL_P(result) = !Z_LVAL_P(result); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) == 0)); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) != 0)); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) < 0)); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0)); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; bitwise_or_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; bitwise_and_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; boolean_xor_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *function_name; zend_class_entry *ce; zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope)); if (IS_CONST == IS_CONST) { /* no function found. try a static method in class */ ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC); if (!ce) { zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant)); } EX(called_scope) = ce; } else { ce = EX_T(opline->op1.u.var).class_entry; if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) { EX(called_scope) = EG(called_scope); } else { EX(called_scope) = ce; } } if(IS_TMP_VAR != IS_UNUSED) { char *function_name_strval = NULL; int function_name_strlen = 0; zend_free_op free_op2; if (IS_TMP_VAR == IS_CONST) { function_name_strval = Z_STRVAL(opline->op2.u.constant); function_name_strlen = Z_STRLEN(opline->op2.u.constant); } else { function_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); if (Z_TYPE_P(function_name) != IS_STRING) { zend_error_noreturn(E_ERROR, "Function name must be a string"); } else { function_name_strval = Z_STRVAL_P(function_name); function_name_strlen = Z_STRLEN_P(function_name); } } if (function_name_strval) { if (ce->get_static_method) { EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); } else { EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); } if (!EX(fbc)) { zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval); } } if (IS_TMP_VAR != IS_CONST) { zval_dtor(free_op2.var); } } else { if(!ce->constructor) { zend_error_noreturn(E_ERROR, "Cannot call constructor"); } if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) { zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name); } EX(fbc) = ce->constructor; } if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) { EX(object) = NULL; } else { if (EG(This) && Z_OBJ_HT_P(EG(This))->get_class_entry && !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) { /* We are calling method of the other (incompatible) class, but passing $this. This is done for compatibility with php-4. */ int severity; char *verb; if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) { severity = E_STRICT; verb = "should not"; } else { /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */ severity = E_ERROR; verb = "cannot"; } zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb); } if ((EX(object) = EG(This))) { Z_ADDREF_P(EX(object)); EX(called_scope) = Z_OBJCE_P(EX(object)); } } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CASE_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); int switch_expr_is_overloaded=0; zend_free_op free_op2; if (IS_CONST==IS_VAR) { if (EX_T(opline->op1.u.var).var.ptr_ptr) { PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr); } else { switch_expr_is_overloaded = 1; Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str); } } is_equal_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op2.var); if (switch_expr_is_overloaded) { /* We only free op1 if this is a string offset, * Since if it is a TMP_VAR, it'll be reused by * other CASE opcodes (whereas string offsets * are allocated at each get_zval_ptr()) */ EX_T(opline->op1.u.var).var.ptr_ptr = NULL; EX_T(opline->op1.u.var).var.ptr = NULL; } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr; zval *offset=_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV zval **expr_ptr_ptr = NULL; if (opline->extended_value) { expr_ptr_ptr=NULL; expr_ptr = *expr_ptr_ptr; } else { expr_ptr=&opline->op1.u.constant; } #else expr_ptr=&opline->op1.u.constant; #endif if (0) { /* temporary variable */ zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; } else { #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV if (opline->extended_value) { SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr); expr_ptr = *expr_ptr_ptr; Z_ADDREF_P(expr_ptr); } else #endif if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) { zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; zendi_zval_copy_ctor(*expr_ptr); } else { Z_ADDREF_P(expr_ptr); } } if (offset) { switch (Z_TYPE_P(offset)) { case IS_DOUBLE: zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL); break; case IS_LONG: case IS_BOOL: zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL); break; case IS_STRING: zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL); break; case IS_NULL: zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL); break; default: zend_error(E_WARNING, "Illegal offset type"); zval_ptr_dtor(&expr_ptr); /* do nothing */ break; } zval_dtor(free_op2.var); } else { zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL); } if (opline->extended_value) { } else { } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); array_init(&EX_T(opline->result.u.var).tmp_var); if (IS_CONST == IS_UNUSED) { ZEND_VM_NEXT_OPCODE(); #if 0 || IS_CONST != IS_UNUSED } else { return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); #endif } } static int ZEND_FASTCALL ZEND_ADD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; add_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SUB_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; sub_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_MUL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; mul_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_DIV_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; div_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_MOD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; mod_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; shift_left_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; shift_right_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; concat_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; is_identical_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; is_identical_function(result, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); Z_LVAL_P(result) = !Z_LVAL_P(result); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) == 0)); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) != 0)); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) < 0)); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0)); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; bitwise_or_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; bitwise_and_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; boolean_xor_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *function_name; zend_class_entry *ce; zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope)); if (IS_CONST == IS_CONST) { /* no function found. try a static method in class */ ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC); if (!ce) { zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant)); } EX(called_scope) = ce; } else { ce = EX_T(opline->op1.u.var).class_entry; if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) { EX(called_scope) = EG(called_scope); } else { EX(called_scope) = ce; } } if(IS_VAR != IS_UNUSED) { char *function_name_strval = NULL; int function_name_strlen = 0; zend_free_op free_op2; if (IS_VAR == IS_CONST) { function_name_strval = Z_STRVAL(opline->op2.u.constant); function_name_strlen = Z_STRLEN(opline->op2.u.constant); } else { function_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); if (Z_TYPE_P(function_name) != IS_STRING) { zend_error_noreturn(E_ERROR, "Function name must be a string"); } else { function_name_strval = Z_STRVAL_P(function_name); function_name_strlen = Z_STRLEN_P(function_name); } } if (function_name_strval) { if (ce->get_static_method) { EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); } else { EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); } if (!EX(fbc)) { zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval); } } if (IS_VAR != IS_CONST) { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } } else { if(!ce->constructor) { zend_error_noreturn(E_ERROR, "Cannot call constructor"); } if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) { zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name); } EX(fbc) = ce->constructor; } if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) { EX(object) = NULL; } else { if (EG(This) && Z_OBJ_HT_P(EG(This))->get_class_entry && !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) { /* We are calling method of the other (incompatible) class, but passing $this. This is done for compatibility with php-4. */ int severity; char *verb; if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) { severity = E_STRICT; verb = "should not"; } else { /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */ severity = E_ERROR; verb = "cannot"; } zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb); } if ((EX(object) = EG(This))) { Z_ADDREF_P(EX(object)); EX(called_scope) = Z_OBJCE_P(EX(object)); } } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CASE_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); int switch_expr_is_overloaded=0; zend_free_op free_op2; if (IS_CONST==IS_VAR) { if (EX_T(opline->op1.u.var).var.ptr_ptr) { PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr); } else { switch_expr_is_overloaded = 1; Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str); } } is_equal_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; if (switch_expr_is_overloaded) { /* We only free op1 if this is a string offset, * Since if it is a TMP_VAR, it'll be reused by * other CASE opcodes (whereas string offsets * are allocated at each get_zval_ptr()) */ EX_T(opline->op1.u.var).var.ptr_ptr = NULL; EX_T(opline->op1.u.var).var.ptr = NULL; } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr; zval *offset=_get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV zval **expr_ptr_ptr = NULL; if (opline->extended_value) { expr_ptr_ptr=NULL; expr_ptr = *expr_ptr_ptr; } else { expr_ptr=&opline->op1.u.constant; } #else expr_ptr=&opline->op1.u.constant; #endif if (0) { /* temporary variable */ zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; } else { #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV if (opline->extended_value) { SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr); expr_ptr = *expr_ptr_ptr; Z_ADDREF_P(expr_ptr); } else #endif if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) { zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; zendi_zval_copy_ctor(*expr_ptr); } else { Z_ADDREF_P(expr_ptr); } } if (offset) { switch (Z_TYPE_P(offset)) { case IS_DOUBLE: zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL); break; case IS_LONG: case IS_BOOL: zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL); break; case IS_STRING: zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL); break; case IS_NULL: zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL); break; default: zend_error(E_WARNING, "Illegal offset type"); zval_ptr_dtor(&expr_ptr); /* do nothing */ break; } if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } else { zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL); } if (opline->extended_value) { } else { } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); array_init(&EX_T(opline->result.u.var).tmp_var); if (IS_CONST == IS_UNUSED) { ZEND_VM_NEXT_OPCODE(); #if 0 || IS_CONST != IS_UNUSED } else { return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); #endif } } static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *function_name; zend_class_entry *ce; zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope)); if (IS_CONST == IS_CONST) { /* no function found. try a static method in class */ ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC); if (!ce) { zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant)); } EX(called_scope) = ce; } else { ce = EX_T(opline->op1.u.var).class_entry; if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) { EX(called_scope) = EG(called_scope); } else { EX(called_scope) = ce; } } if(IS_UNUSED != IS_UNUSED) { char *function_name_strval = NULL; int function_name_strlen = 0; if (IS_UNUSED == IS_CONST) { function_name_strval = Z_STRVAL(opline->op2.u.constant); function_name_strlen = Z_STRLEN(opline->op2.u.constant); } else { function_name = NULL; if (Z_TYPE_P(function_name) != IS_STRING) { zend_error_noreturn(E_ERROR, "Function name must be a string"); } else { function_name_strval = Z_STRVAL_P(function_name); function_name_strlen = Z_STRLEN_P(function_name); } } if (function_name_strval) { if (ce->get_static_method) { EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); } else { EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); } if (!EX(fbc)) { zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval); } } if (IS_UNUSED != IS_CONST) { } } else { if(!ce->constructor) { zend_error_noreturn(E_ERROR, "Cannot call constructor"); } if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) { zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name); } EX(fbc) = ce->constructor; } if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) { EX(object) = NULL; } else { if (EG(This) && Z_OBJ_HT_P(EG(This))->get_class_entry && !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) { /* We are calling method of the other (incompatible) class, but passing $this. This is done for compatibility with php-4. */ int severity; char *verb; if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) { severity = E_STRICT; verb = "should not"; } else { /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */ severity = E_ERROR; verb = "cannot"; } zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb); } if ((EX(object) = EG(This))) { Z_ADDREF_P(EX(object)); EX(called_scope) = Z_OBJCE_P(EX(object)); } } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr; zval *offset=NULL; #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV zval **expr_ptr_ptr = NULL; if (opline->extended_value) { expr_ptr_ptr=NULL; expr_ptr = *expr_ptr_ptr; } else { expr_ptr=&opline->op1.u.constant; } #else expr_ptr=&opline->op1.u.constant; #endif if (0) { /* temporary variable */ zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; } else { #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV if (opline->extended_value) { SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr); expr_ptr = *expr_ptr_ptr; Z_ADDREF_P(expr_ptr); } else #endif if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) { zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; zendi_zval_copy_ctor(*expr_ptr); } else { Z_ADDREF_P(expr_ptr); } } if (offset) { switch (Z_TYPE_P(offset)) { case IS_DOUBLE: zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL); break; case IS_LONG: case IS_BOOL: zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL); break; case IS_STRING: zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL); break; case IS_NULL: zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL); break; default: zend_error(E_WARNING, "Illegal offset type"); zval_ptr_dtor(&expr_ptr); /* do nothing */ break; } } else { zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL); } if (opline->extended_value) { } else { } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); array_init(&EX_T(opline->result.u.var).tmp_var); if (IS_CONST == IS_UNUSED) { ZEND_VM_NEXT_OPCODE(); #if 0 || IS_CONST != IS_UNUSED } else { return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); #endif } } static int ZEND_FASTCALL ZEND_ADD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); add_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SUB_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); sub_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_MUL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); mul_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_DIV_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); div_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_MOD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); mod_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); shift_left_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); shift_right_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); concat_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); is_identical_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *result = &EX_T(opline->result.u.var).tmp_var; is_identical_function(result, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); Z_LVAL_P(result) = !Z_LVAL_P(result); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) == 0)); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) != 0)); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) < 0)); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0)); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); bitwise_or_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); bitwise_and_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); boolean_xor_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *function_name; zend_class_entry *ce; zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope)); if (IS_CONST == IS_CONST) { /* no function found. try a static method in class */ ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC); if (!ce) { zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant)); } EX(called_scope) = ce; } else { ce = EX_T(opline->op1.u.var).class_entry; if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) { EX(called_scope) = EG(called_scope); } else { EX(called_scope) = ce; } } if(IS_CV != IS_UNUSED) { char *function_name_strval = NULL; int function_name_strlen = 0; if (IS_CV == IS_CONST) { function_name_strval = Z_STRVAL(opline->op2.u.constant); function_name_strlen = Z_STRLEN(opline->op2.u.constant); } else { function_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); if (Z_TYPE_P(function_name) != IS_STRING) { zend_error_noreturn(E_ERROR, "Function name must be a string"); } else { function_name_strval = Z_STRVAL_P(function_name); function_name_strlen = Z_STRLEN_P(function_name); } } if (function_name_strval) { if (ce->get_static_method) { EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); } else { EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); } if (!EX(fbc)) { zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval); } } if (IS_CV != IS_CONST) { } } else { if(!ce->constructor) { zend_error_noreturn(E_ERROR, "Cannot call constructor"); } if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) { zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name); } EX(fbc) = ce->constructor; } if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) { EX(object) = NULL; } else { if (EG(This) && Z_OBJ_HT_P(EG(This))->get_class_entry && !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) { /* We are calling method of the other (incompatible) class, but passing $this. This is done for compatibility with php-4. */ int severity; char *verb; if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) { severity = E_STRICT; verb = "should not"; } else { /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */ severity = E_ERROR; verb = "cannot"; } zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb); } if ((EX(object) = EG(This))) { Z_ADDREF_P(EX(object)); EX(called_scope) = Z_OBJCE_P(EX(object)); } } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CASE_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); int switch_expr_is_overloaded=0; if (IS_CONST==IS_VAR) { if (EX_T(opline->op1.u.var).var.ptr_ptr) { PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr); } else { switch_expr_is_overloaded = 1; Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str); } } is_equal_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); if (switch_expr_is_overloaded) { /* We only free op1 if this is a string offset, * Since if it is a TMP_VAR, it'll be reused by * other CASE opcodes (whereas string offsets * are allocated at each get_zval_ptr()) */ EX_T(opline->op1.u.var).var.ptr_ptr = NULL; EX_T(opline->op1.u.var).var.ptr = NULL; } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr; zval *offset=_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV zval **expr_ptr_ptr = NULL; if (opline->extended_value) { expr_ptr_ptr=NULL; expr_ptr = *expr_ptr_ptr; } else { expr_ptr=&opline->op1.u.constant; } #else expr_ptr=&opline->op1.u.constant; #endif if (0) { /* temporary variable */ zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; } else { #if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV if (opline->extended_value) { SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr); expr_ptr = *expr_ptr_ptr; Z_ADDREF_P(expr_ptr); } else #endif if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) { zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; zendi_zval_copy_ctor(*expr_ptr); } else { Z_ADDREF_P(expr_ptr); } } if (offset) { switch (Z_TYPE_P(offset)) { case IS_DOUBLE: zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL); break; case IS_LONG: case IS_BOOL: zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL); break; case IS_STRING: zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL); break; case IS_NULL: zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL); break; default: zend_error(E_WARNING, "Illegal offset type"); zval_ptr_dtor(&expr_ptr); /* do nothing */ break; } } else { zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL); } if (opline->extended_value) { } else { } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); array_init(&EX_T(opline->result.u.var).tmp_var); if (IS_CONST == IS_UNUSED) { ZEND_VM_NEXT_OPCODE(); #if 0 || IS_CONST != IS_UNUSED } else { return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); #endif } } static int ZEND_FASTCALL ZEND_BW_NOT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; bitwise_not_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BOOL_NOT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; boolean_not_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ECHO_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval z_copy; zval *z = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get_method != NULL && zend_std_cast_object_tostring(z, &z_copy, IS_STRING TSRMLS_CC) == SUCCESS) { zend_print_variable(&z_copy); zval_dtor(&z_copy); } else { zend_print_variable(z); } zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_PRINT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1; Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_LONG; return ZEND_ECHO_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMP(int type, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *varname = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zval **retval; zval tmp_varname; HashTable *target_symbol_table; if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) { tmp_varname = *varname; zval_copy_ctor(&tmp_varname); convert_to_string(&tmp_varname); varname = &tmp_varname; } if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC); zval_dtor(free_op1.var); } else { target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC); /* if (!target_symbol_table) { ZEND_VM_NEXT_OPCODE(); } */ if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &retval) == FAILURE) { switch (type) { case BP_VAR_R: case BP_VAR_UNSET: zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname)); /* break missing intentionally */ case BP_VAR_IS: retval = &EG(uninitialized_zval_ptr); break; case BP_VAR_RW: zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname)); /* break missing intentionally */ case BP_VAR_W: { zval *new_zval = &EG(uninitialized_zval); Z_ADDREF_P(new_zval); zend_hash_update(target_symbol_table, varname->value.str.val, varname->value.str.len+1, &new_zval, sizeof(zval *), (void **) &retval); } break; EMPTY_SWITCH_DEFAULT_CASE() } } switch (opline->op2.u.EA.type) { case ZEND_FETCH_GLOBAL: if (IS_TMP_VAR != IS_TMP_VAR) { zval_dtor(free_op1.var); } break; case ZEND_FETCH_LOCAL: zval_dtor(free_op1.var); break; case ZEND_FETCH_STATIC: zval_update_constant(retval, (void*) 1 TSRMLS_CC); break; case ZEND_FETCH_GLOBAL_LOCK: if (IS_TMP_VAR == IS_VAR && !free_op1.var) { PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr); } break; } } if (IS_TMP_VAR != IS_CONST && varname == &tmp_varname) { zval_dtor(varname); } if (!RETURN_VALUE_UNUSED(&opline->result)) { if (opline->extended_value & ZEND_FETCH_MAKE_REF) { SEPARATE_ZVAL_TO_MAKE_IS_REF(retval); } PZVAL_LOCK(*retval); switch (type) { case BP_VAR_R: case BP_VAR_IS: AI_SET_PTR(EX_T(opline->result.u.var).var, *retval); break; case BP_VAR_UNSET: { zend_free_op free_res; EX_T(opline->result.u.var).var.ptr_ptr = retval; PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res); if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr); } PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr); FREE_OP_VAR_PTR(free_res); break; default: EX_T(opline->result.u.var).var.ptr_ptr = retval; break; } } } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_TMP(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_TMP(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_TMP(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_TMP(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), EX(opline)->extended_value)?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_TMP(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_TMP(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_JMPZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *val = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); int ret; if (IS_TMP_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) { ret = Z_LVAL_P(val); } else { ret = i_zend_is_true(val); zval_dtor(free_op1.var); if (UNEXPECTED(EG(exception) != NULL)) { ZEND_VM_CONTINUE(); } } if (!ret) { #if DEBUG_ZEND>=2 printf("Conditional jmp to %d\n", opline->op2.u.opline_num); #endif ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr); ZEND_VM_CONTINUE(); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_JMPNZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *val = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); int ret; if (IS_TMP_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) { ret = Z_LVAL_P(val); } else { ret = i_zend_is_true(val); zval_dtor(free_op1.var); if (UNEXPECTED(EG(exception) != NULL)) { ZEND_VM_CONTINUE(); } } if (ret) { #if DEBUG_ZEND>=2 printf("Conditional jmp to %d\n", opline->op2.u.opline_num); #endif ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr); ZEND_VM_CONTINUE(); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_JMPZNZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *val = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); int retval; if (IS_TMP_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) { retval = Z_LVAL_P(val); } else { retval = i_zend_is_true(val); zval_dtor(free_op1.var); if (UNEXPECTED(EG(exception) != NULL)) { ZEND_VM_CONTINUE(); } } if (EXPECTED(retval != 0)) { #if DEBUG_ZEND>=2 printf("Conditional jmp on true to %d\n", opline->extended_value); #endif ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]); ZEND_VM_CONTINUE(); /* CHECK_ME */ } else { #if DEBUG_ZEND>=2 printf("Conditional jmp on false to %d\n", opline->op2.u.opline_num); #endif ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.u.opline_num]); ZEND_VM_CONTINUE(); /* CHECK_ME */ } } static int ZEND_FASTCALL ZEND_JMPZ_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *val = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); int retval; if (IS_TMP_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) { retval = Z_LVAL_P(val); } else { retval = i_zend_is_true(val); zval_dtor(free_op1.var); if (UNEXPECTED(EG(exception) != NULL)) { ZEND_VM_CONTINUE(); } } Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval; Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; if (!retval) { #if DEBUG_ZEND>=2 printf("Conditional jmp to %d\n", opline->op2.u.opline_num); #endif ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr); ZEND_VM_CONTINUE(); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_JMPNZ_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *val = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); int retval; if (IS_TMP_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) { retval = Z_LVAL_P(val); } else { retval = i_zend_is_true(val); zval_dtor(free_op1.var); if (UNEXPECTED(EG(exception) != NULL)) { ZEND_VM_CONTINUE(); } } Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval; Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; if (retval) { #if DEBUG_ZEND>=2 printf("Conditional jmp to %d\n", opline->op2.u.opline_num); #endif ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr); ZEND_VM_CONTINUE(); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FREE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zendi_zval_dtor(EX_T(EX(opline)->op1.u.var).tmp_var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_RETURN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *retval_ptr; zval **retval_ptr_ptr; zend_free_op free_op1; if (EG(active_op_array)->return_reference == ZEND_RETURN_REF) { if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) { /* Not supposed to happen, but we'll allow it */ zend_error(E_NOTICE, "Only variable references should be returned by reference"); goto return_by_value; } retval_ptr_ptr = NULL; if (IS_TMP_VAR == IS_VAR && !retval_ptr_ptr) { zend_error_noreturn(E_ERROR, "Cannot return string offsets by reference"); } if (IS_TMP_VAR == IS_VAR && !Z_ISREF_PP(retval_ptr_ptr)) { if (opline->extended_value == ZEND_RETURNS_FUNCTION && EX_T(opline->op1.u.var).var.fcall_returned_reference) { } else if (EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) { if (IS_TMP_VAR == IS_VAR && !1) { PZVAL_LOCK(*retval_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */ } zend_error(E_NOTICE, "Only variable references should be returned by reference"); goto return_by_value; } } if (EG(return_value_ptr_ptr)) { SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr); Z_ADDREF_PP(retval_ptr_ptr); (*EG(return_value_ptr_ptr)) = (*retval_ptr_ptr); } } else { return_by_value: retval_ptr = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (!EG(return_value_ptr_ptr)) { if (IS_TMP_VAR == IS_TMP_VAR) { zval_dtor(free_op1.var); } } else if (!1) { /* Not a temp var */ if (IS_TMP_VAR == IS_CONST || EG(active_op_array)->return_reference == ZEND_RETURN_REF || (PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) { zval *ret; ALLOC_ZVAL(ret); INIT_PZVAL_COPY(ret, retval_ptr); zval_copy_ctor(ret); *EG(return_value_ptr_ptr) = ret; } else if ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) && retval_ptr == &EG(uninitialized_zval)) { zval *ret; ALLOC_INIT_ZVAL(ret); *EG(return_value_ptr_ptr) = ret; } else { *EG(return_value_ptr_ptr) = retval_ptr; Z_ADDREF_P(retval_ptr); } } else { zval *ret; ALLOC_ZVAL(ret); INIT_PZVAL_COPY(ret, retval_ptr); *EG(return_value_ptr_ptr) = ret; } } return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_THROW_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *value; zval *exception; zend_free_op free_op1; value = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_TMP_VAR == IS_CONST || Z_TYPE_P(value) != IS_OBJECT) { zend_error_noreturn(E_ERROR, "Can only throw objects"); } zend_exception_save(TSRMLS_C); /* Not sure if a complete copy is what we want here */ ALLOC_ZVAL(exception); INIT_PZVAL_COPY(exception, value); if (!1) { zval_copy_ctor(exception); } zend_throw_exception_object(exception TSRMLS_CC); zend_exception_restore(TSRMLS_C); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SEND_VAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); if (opline->extended_value==ZEND_DO_FCALL_BY_NAME && ARG_MUST_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) { zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.u.opline_num); } { zval *valptr; zval *value; zend_free_op free_op1; value = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); ALLOC_ZVAL(valptr); INIT_PZVAL_COPY(valptr, value); if (!1) { zval_copy_ctor(valptr); } zend_vm_stack_push(valptr TSRMLS_CC); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BOOL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; /* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */ Z_LVAL(EX_T(opline->result.u.var).tmp_var) = i_zend_is_true(_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC)); Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CLONE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *obj = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zend_class_entry *ce; zend_function *clone; zend_object_clone_obj_t clone_call; if (IS_TMP_VAR == IS_CONST || (IS_TMP_VAR == IS_VAR && !obj) || Z_TYPE_P(obj) != IS_OBJECT) { zend_error_noreturn(E_ERROR, "__clone method called on non-object"); } ce = Z_OBJCE_P(obj); clone = ce ? ce->clone : NULL; clone_call = Z_OBJ_HT_P(obj)->clone_obj; if (!clone_call) { if (ce) { zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object of class %s", ce->name); } else { zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object"); } } if (ce && clone) { if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) { /* Ensure that if we're calling a private function, we're allowed to do so. */ if (ce != EG(scope)) { zend_error_noreturn(E_ERROR, "Call to private %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : ""); } } else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) { /* Ensure that if we're calling a protected function, we're allowed to do so. */ if (!zend_check_protected(clone->common.scope, EG(scope))) { zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : ""); } } } EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr; if (!EG(exception)) { ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr); Z_OBJVAL_P(EX_T(opline->result.u.var).var.ptr) = clone_call(obj TSRMLS_CC); Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_OBJECT; Z_SET_REFCOUNT_P(EX_T(opline->result.u.var).var.ptr, 1); Z_SET_ISREF_P(EX_T(opline->result.u.var).var.ptr); if (!RETURN_VALUE_USED(opline) || EG(exception)) { zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr); } } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CAST_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *expr = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zval *result = &EX_T(opline->result.u.var).tmp_var; if (opline->extended_value != IS_STRING) { *result = *expr; if (!1) { zendi_zval_copy_ctor(*result); } } switch (opline->extended_value) { case IS_NULL: convert_to_null(result); break; case IS_BOOL: convert_to_boolean(result); break; case IS_LONG: convert_to_long(result); break; case IS_DOUBLE: convert_to_double(result); break; case IS_STRING: { zval var_copy; int use_copy; zend_make_printable_zval(expr, &var_copy, &use_copy); if (use_copy) { *result = var_copy; if (1) { zval_dtor(free_op1.var); } } else { *result = *expr; if (!1) { zendi_zval_copy_ctor(*result); } } break; } case IS_ARRAY: convert_to_array(result); break; case IS_OBJECT: convert_to_object(result); break; } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op_array *new_op_array=NULL; int return_value_used; zend_free_op free_op1; zval *inc_filename = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zval tmp_inc_filename; zend_bool failure_retval=0; if (inc_filename->type!=IS_STRING) { tmp_inc_filename = *inc_filename; zval_copy_ctor(&tmp_inc_filename); convert_to_string(&tmp_inc_filename); inc_filename = &tmp_inc_filename; } return_value_used = RETURN_VALUE_USED(opline); switch (Z_LVAL(opline->op2.u.constant)) { case ZEND_INCLUDE_ONCE: case ZEND_REQUIRE_ONCE: { zend_file_handle file_handle; char *resolved_path; resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC); if (resolved_path) { failure_retval = zend_hash_exists(&EG(included_files), resolved_path, strlen(resolved_path)+1); } else { resolved_path = Z_STRVAL_P(inc_filename); } if (failure_retval) { /* do nothing, file already included */ } else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) { if (!file_handle.opened_path) { file_handle.opened_path = estrdup(resolved_path); } if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) { new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC); zend_destroy_file_handle(&file_handle TSRMLS_CC); } else { zend_file_handle_dtor(&file_handle TSRMLS_CC); failure_retval=1; } } else { if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) { zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC); } else { zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC); } } if (resolved_path != Z_STRVAL_P(inc_filename)) { efree(resolved_path); } } break; case ZEND_INCLUDE: case ZEND_REQUIRE: new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC); break; case ZEND_EVAL: { char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC); new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC); efree(eval_desc); } break; EMPTY_SWITCH_DEFAULT_CASE() } if (inc_filename==&tmp_inc_filename) { zval_dtor(&tmp_inc_filename); } zval_dtor(free_op1.var); EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr; if (new_op_array && !EG(exception)) { EX(original_return_value) = EG(return_value_ptr_ptr); EG(return_value_ptr_ptr) = return_value_used ? EX_T(opline->result.u.var).var.ptr_ptr : NULL; EG(active_op_array) = new_op_array; EX_T(opline->result.u.var).var.ptr = NULL; EX(current_object) = EX(object); EX(function_state).function = (zend_function *) new_op_array; EX(object) = NULL; if (!EG(active_symbol_table)) { zend_rebuild_symbol_table(TSRMLS_C); } if (zend_execute == execute) { EX(call_opline) = opline; ZEND_VM_ENTER(); } else { zend_execute(new_op_array TSRMLS_CC); } EX(function_state).function = (zend_function *) EX(op_array); EX(object) = EX(current_object); if (return_value_used) { if (!EX_T(opline->result.u.var).var.ptr) { /* there was no return statement */ ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr); INIT_PZVAL(EX_T(opline->result.u.var).var.ptr); Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = 1; Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL; } } EG(opline_ptr) = &EX(opline); EG(active_op_array) = EX(op_array); EG(return_value_ptr_ptr) = EX(original_return_value); destroy_op_array(new_op_array TSRMLS_CC); efree(new_op_array); if (EG(exception)) { zend_throw_exception_internal(NULL TSRMLS_CC); } } else { if (return_value_used) { ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr); INIT_ZVAL(*EX_T(opline->result.u.var).var.ptr); Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = failure_retval; Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL; } } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval tmp, *varname; HashTable *target_symbol_table; zend_free_op free_op1; if (IS_TMP_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); if (zend_hash_quick_del(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value) == SUCCESS) { while (ex && ex->symbol_table == EG(active_symbol_table)) { int i; if (ex->op_array) { for (i = 0; i < ex->op_array->last_var; i++) { if (ex->op_array->vars[i].hash_value == cv->hash_value && ex->op_array->vars[i].name_len == cv->name_len && !memcmp(ex->op_array->vars[i].name, cv->name, cv->name_len)) { ex->CVs[i] = NULL; break; } } } ex = ex->prev_execute_data; } } EX(CVs)[opline->op1.u.var] = NULL; } else if (EX(CVs)[opline->op1.u.var]) { zval_ptr_dtor(EX(CVs)[opline->op1.u.var]); EX(CVs)[opline->op1.u.var] = NULL; } ZEND_VM_NEXT_OPCODE(); } varname = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (Z_TYPE_P(varname) != IS_STRING) { tmp = *varname; zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) { Z_ADDREF_P(varname); } if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { zend_std_unset_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname) TSRMLS_CC); } else { ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1); target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC); if (zend_hash_quick_del(target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value) == SUCCESS) { zend_execute_data *ex = execute_data; do { int i; if (ex->op_array) { for (i = 0; i < ex->op_array->last_var; i++) { if (ex->op_array->vars[i].hash_value == hash_value && ex->op_array->vars[i].name_len == varname->value.str.len && !memcmp(ex->op_array->vars[i].name, varname->value.str.val, varname->value.str.len)) { ex->CVs[i] = NULL; break; } } } ex = ex->prev_execute_data; } while (ex && ex->symbol_table == target_symbol_table); } } if (varname == &tmp) { zval_dtor(&tmp); } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) { zval_ptr_dtor(&varname); } zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *array_ptr, **array_ptr_ptr; HashTable *fe_ht; zend_object_iterator *iter = NULL; zend_class_entry *ce = NULL; zend_bool is_empty = 0; if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { array_ptr_ptr = NULL; if (array_ptr_ptr == NULL || array_ptr_ptr == &EG(uninitialized_zval_ptr)) { ALLOC_INIT_ZVAL(array_ptr); } else if (Z_TYPE_PP(array_ptr_ptr) == IS_OBJECT) { if(Z_OBJ_HT_PP(array_ptr_ptr)->get_class_entry == NULL) { zend_error(E_WARNING, "foreach() cannot iterate over objects without PHP class"); ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num); } ce = Z_OBJCE_PP(array_ptr_ptr); if (!ce || ce->get_iterator == NULL) { SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); Z_ADDREF_PP(array_ptr_ptr); } array_ptr = *array_ptr_ptr; } else { if (Z_TYPE_PP(array_ptr_ptr) == IS_ARRAY) { SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); if (opline->extended_value & ZEND_FE_FETCH_BYREF) { Z_SET_ISREF_PP(array_ptr_ptr); } } array_ptr = *array_ptr_ptr; Z_ADDREF_P(array_ptr); } } else { array_ptr = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (1) { /* IS_TMP_VAR */ zval *tmp; ALLOC_ZVAL(tmp); INIT_PZVAL_COPY(tmp, array_ptr); array_ptr = tmp; if (Z_TYPE_P(array_ptr) == IS_OBJECT) { ce = Z_OBJCE_P(array_ptr); if (ce && ce->get_iterator) { Z_DELREF_P(array_ptr); } } } else if (Z_TYPE_P(array_ptr) == IS_OBJECT) { ce = Z_OBJCE_P(array_ptr); if (!ce || !ce->get_iterator) { Z_ADDREF_P(array_ptr); } } else if (IS_TMP_VAR == IS_CONST || ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) && !Z_ISREF_P(array_ptr) && Z_REFCOUNT_P(array_ptr) > 1)) { zval *tmp; ALLOC_ZVAL(tmp); INIT_PZVAL_COPY(tmp, array_ptr); zval_copy_ctor(tmp); array_ptr = tmp; } else { Z_ADDREF_P(array_ptr); } } if (ce && ce->get_iterator) { iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC); if (iter && !EG(exception)) { array_ptr = zend_iterator_wrap(iter TSRMLS_CC); } else { if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { } else { } if (!EG(exception)) { zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Object of type %s did not create an Iterator", ce->name); } zend_throw_exception_internal(NULL TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } } AI_SET_PTR(EX_T(opline->result.u.var).var, array_ptr); PZVAL_LOCK(array_ptr); if (iter) { iter->index = 0; if (iter->funcs->rewind) { iter->funcs->rewind(iter TSRMLS_CC); if (EG(exception)) { Z_DELREF_P(array_ptr); zval_ptr_dtor(&array_ptr); if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { } else { } ZEND_VM_NEXT_OPCODE(); } } is_empty = iter->funcs->valid(iter TSRMLS_CC) != SUCCESS; if (EG(exception)) { Z_DELREF_P(array_ptr); zval_ptr_dtor(&array_ptr); if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { } else { } ZEND_VM_NEXT_OPCODE(); } iter->index = -1; /* will be set to 0 before using next handler */ } else if ((fe_ht = HASH_OF(array_ptr)) != NULL) { zend_hash_internal_pointer_reset(fe_ht); if (ce) { zend_object *zobj = zend_objects_get_address(array_ptr TSRMLS_CC); while (zend_hash_has_more_elements(fe_ht) == SUCCESS) { char *str_key; uint str_key_len; ulong int_key; zend_uchar key_type; key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL); if (key_type != HASH_KEY_NON_EXISTANT && (key_type == HASH_KEY_IS_LONG || zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) == SUCCESS)) { break; } zend_hash_move_forward(fe_ht); } } is_empty = zend_hash_has_more_elements(fe_ht) != SUCCESS; zend_hash_get_pointer(fe_ht, &EX_T(opline->result.u.var).fe.fe_pos); } else { zend_error(E_WARNING, "Invalid argument supplied for foreach()"); is_empty = 1; } if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { } else { } if (is_empty) { ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num); } else { ZEND_VM_NEXT_OPCODE(); } } static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval **value; zend_bool isset = 1; if (IS_TMP_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) { isset = 0; } } else { isset = 0; } } else { HashTable *target_symbol_table; zend_free_op free_op1; zval tmp, *varname = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (Z_TYPE_P(varname) != IS_STRING) { tmp = *varname; zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; } if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { value = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1 TSRMLS_CC); if (!value) { isset = 0; } } else { target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC); if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) { isset = 0; } } if (varname == &tmp) { zval_dtor(&tmp); } zval_dtor(free_op1.var); } Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; } else { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = isset; } break; case ZEND_ISEMPTY: if (!isset || !i_zend_is_true(*value)) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1; } else { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; } break; } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_EXIT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { #if 0 || (IS_TMP_VAR != IS_UNUSED) zend_op *opline = EX(opline); if (IS_TMP_VAR != IS_UNUSED) { zend_free_op free_op1; zval *ptr = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (Z_TYPE_P(ptr) == IS_LONG) { EG(exit_status) = Z_LVAL_P(ptr); } else { zend_print_variable(ptr); } zval_dtor(free_op1.var); } #endif zend_bailout(); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_END_SILENCE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval restored_error_reporting; if (!EG(error_reporting) && Z_LVAL(EX_T(opline->op1.u.var).tmp_var) != 0) { Z_TYPE(restored_error_reporting) = IS_LONG; Z_LVAL(restored_error_reporting) = Z_LVAL(EX_T(opline->op1.u.var).tmp_var); convert_to_string(&restored_error_reporting); zend_alter_ini_entry_ex("error_reporting", sizeof("error_reporting"), Z_STRVAL(restored_error_reporting), Z_STRLEN(restored_error_reporting), ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME, 1 TSRMLS_CC); zendi_zval_dtor(restored_error_reporting); } if (EX(old_error_reporting) == &EX_T(opline->op1.u.var).tmp_var) { EX(old_error_reporting) = NULL; } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_JMP_SET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *value = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (i_zend_is_true(value)) { EX_T(opline->result.u.var).tmp_var = *value; zendi_zval_copy_ctor(EX_T(opline->result.u.var).tmp_var); zval_dtor(free_op1.var); #if DEBUG_ZEND>=2 printf("Conditional jmp to %d\n", opline->op2.u.opline_num); #endif ZEND_VM_JMP(opline->op2.u.jmp_addr); } zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *value = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); EX_T(opline->result.u.var).tmp_var = *value; if (!1) { zval_copy_ctor(&EX_T(opline->result.u.var).tmp_var); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INSTANCEOF_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *expr = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zend_bool result; if (Z_TYPE_P(expr) == IS_OBJECT && Z_OBJ_HT_P(expr)->get_class_entry) { result = instanceof_function(Z_OBJCE_P(expr), EX_T(opline->op2.u.var).class_entry TSRMLS_CC); } else { result = 0; } ZVAL_BOOL(&EX_T(opline->result.u.var).tmp_var, result); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ADD_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; add_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SUB_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; sub_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_MUL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; mul_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_DIV_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; div_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_MOD_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; mod_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; shift_left_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; shift_right_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CONCAT_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; concat_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; is_identical_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *result = &EX_T(opline->result.u.var).tmp_var; is_identical_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); Z_LVAL_P(result) = !Z_LVAL_P(result); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) == 0)); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) != 0)); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) < 0)); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0)); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_OR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; bitwise_or_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_AND_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; bitwise_and_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; boolean_xor_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FETCH_DIM_TMP_VAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *container = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (Z_TYPE_P(container) != IS_ARRAY) { if (!RETURN_VALUE_UNUSED(&opline->result)) { AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr)); PZVAL_LOCK(EG(uninitialized_zval_ptr)); } } else { zval *dim = &opline->op2.u.constant; AI_SET_PTR(EX_T(opline->result.u.var).var, *zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, BP_VAR_R TSRMLS_CC)); SELECTIVE_PZVAL_LOCK(EX_T(opline->result.u.var).var.ptr, &opline->result); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ADD_CHAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *str = &EX_T(opline->result.u.var).tmp_var; if (IS_TMP_VAR == IS_UNUSED) { /* Initialize for erealloc in add_char_to_string */ Z_STRVAL_P(str) = NULL; Z_STRLEN_P(str) = 0; Z_TYPE_P(str) = IS_STRING; INIT_PZVAL(str); } add_char_to_string(str, str, &opline->op2.u.constant); /* FREE_OP is missing intentionally here - we're always working on the same temporary variable */ ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ADD_STRING_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *str = &EX_T(opline->result.u.var).tmp_var; if (IS_TMP_VAR == IS_UNUSED) { /* Initialize for erealloc in add_string_to_string */ Z_STRVAL_P(str) = NULL; Z_STRLEN_P(str) = 0; Z_TYPE_P(str) = IS_STRING; INIT_PZVAL(str); } add_string_to_string(str, str, &opline->op2.u.constant); /* FREE_OP is missing intentionally here - we're always working on the same temporary variable */ ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *function_name; char *function_name_strval; int function_name_strlen; zend_free_op free_op1; zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope)); function_name = &opline->op2.u.constant; if (Z_TYPE_P(function_name)!=IS_STRING) { zend_error_noreturn(E_ERROR, "Method name must be a string"); } function_name_strval = Z_STRVAL_P(function_name); function_name_strlen = Z_STRLEN_P(function_name); EX(object) = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) { if (Z_OBJ_HT_P(EX(object))->get_method == NULL) { zend_error_noreturn(E_ERROR, "Object does not support method calls"); } /* First, locate the function. */ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC); if (!EX(fbc)) { zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval); } EX(called_scope) = Z_OBJCE_P(EX(object)); } else { zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); } if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) { EX(object) = NULL; } else { if (!PZVAL_IS_REF(EX(object))) { Z_ADDREF_P(EX(object)); /* For $this pointer */ } else { zval *this_ptr; ALLOC_ZVAL(this_ptr); INIT_PZVAL_COPY(this_ptr, EX(object)); zval_copy_ctor(this_ptr); EX(object) = this_ptr; } } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CASE_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); int switch_expr_is_overloaded=0; zend_free_op free_op1; if (IS_TMP_VAR==IS_VAR) { if (EX_T(opline->op1.u.var).var.ptr_ptr) { PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr); } else { switch_expr_is_overloaded = 1; Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str); } } is_equal_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); if (switch_expr_is_overloaded) { /* We only free op1 if this is a string offset, * Since if it is a TMP_VAR, it'll be reused by * other CASE opcodes (whereas string offsets * are allocated at each get_zval_ptr()) */ zval_dtor(free_op1.var); EX_T(opline->op1.u.var).var.ptr_ptr = NULL; EX_T(opline->op1.u.var).var.ptr = NULL; } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr; zval *offset=&opline->op2.u.constant; #if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV zval **expr_ptr_ptr = NULL; if (opline->extended_value) { expr_ptr_ptr=NULL; expr_ptr = *expr_ptr_ptr; } else { expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); } #else expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); #endif if (1) { /* temporary variable */ zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; } else { #if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV if (opline->extended_value) { SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr); expr_ptr = *expr_ptr_ptr; Z_ADDREF_P(expr_ptr); } else #endif if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) { zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; zendi_zval_copy_ctor(*expr_ptr); } else { Z_ADDREF_P(expr_ptr); } } if (offset) { switch (Z_TYPE_P(offset)) { case IS_DOUBLE: zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL); break; case IS_LONG: case IS_BOOL: zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL); break; case IS_STRING: zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL); break; case IS_NULL: zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL); break; default: zend_error(E_WARNING, "Illegal offset type"); zval_ptr_dtor(&expr_ptr); /* do nothing */ break; } } else { zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL); } if (opline->extended_value) { } else { } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); array_init(&EX_T(opline->result.u.var).tmp_var); if (IS_TMP_VAR == IS_UNUSED) { ZEND_VM_NEXT_OPCODE(); #if 0 || IS_TMP_VAR != IS_UNUSED } else { return ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); #endif } } static int ZEND_FASTCALL ZEND_ADD_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; add_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SUB_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; sub_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_MUL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; mul_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_DIV_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; div_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_MOD_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; mod_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; shift_left_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; shift_right_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CONCAT_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; concat_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; is_identical_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; is_identical_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); Z_LVAL_P(result) = !Z_LVAL_P(result); zval_dtor(free_op1.var); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) == 0)); zval_dtor(free_op1.var); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) != 0)); zval_dtor(free_op1.var); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) < 0)); zval_dtor(free_op1.var); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0)); zval_dtor(free_op1.var); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_OR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; bitwise_or_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_AND_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; bitwise_and_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; boolean_xor_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval *str = &EX_T(opline->result.u.var).tmp_var; zval *var = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); zval var_copy; int use_copy = 0; if (IS_TMP_VAR == IS_UNUSED) { /* Initialize for erealloc in add_string_to_string */ Z_STRVAL_P(str) = NULL; Z_STRLEN_P(str) = 0; Z_TYPE_P(str) = IS_STRING; INIT_PZVAL(str); } if (Z_TYPE_P(var) != IS_STRING) { zend_make_printable_zval(var, &var_copy, &use_copy); if (use_copy) { var = &var_copy; } } add_string_to_string(str, str, var); if (use_copy) { zval_dtor(var); } /* original comment, possibly problematic: * FREE_OP is missing intentionally here - we're always working on the same temporary variable * (Zeev): I don't think it's problematic, we only use variables * which aren't affected by FREE_OP(Ts, )'s anyway, unless they're * string offsets or overloaded objects */ zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *function_name; char *function_name_strval; int function_name_strlen; zend_free_op free_op1, free_op2; zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope)); function_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); if (Z_TYPE_P(function_name)!=IS_STRING) { zend_error_noreturn(E_ERROR, "Method name must be a string"); } function_name_strval = Z_STRVAL_P(function_name); function_name_strlen = Z_STRLEN_P(function_name); EX(object) = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) { if (Z_OBJ_HT_P(EX(object))->get_method == NULL) { zend_error_noreturn(E_ERROR, "Object does not support method calls"); } /* First, locate the function. */ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC); if (!EX(fbc)) { zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval); } EX(called_scope) = Z_OBJCE_P(EX(object)); } else { zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); } if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) { EX(object) = NULL; } else { if (!PZVAL_IS_REF(EX(object))) { Z_ADDREF_P(EX(object)); /* For $this pointer */ } else { zval *this_ptr; ALLOC_ZVAL(this_ptr); INIT_PZVAL_COPY(this_ptr, EX(object)); zval_copy_ctor(this_ptr); EX(object) = this_ptr; } } zval_dtor(free_op2.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CASE_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); int switch_expr_is_overloaded=0; zend_free_op free_op1, free_op2; if (IS_TMP_VAR==IS_VAR) { if (EX_T(opline->op1.u.var).var.ptr_ptr) { PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr); } else { switch_expr_is_overloaded = 1; Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str); } } is_equal_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op2.var); if (switch_expr_is_overloaded) { /* We only free op1 if this is a string offset, * Since if it is a TMP_VAR, it'll be reused by * other CASE opcodes (whereas string offsets * are allocated at each get_zval_ptr()) */ zval_dtor(free_op1.var); EX_T(opline->op1.u.var).var.ptr_ptr = NULL; EX_T(opline->op1.u.var).var.ptr = NULL; } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr; zval *offset=_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); #if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV zval **expr_ptr_ptr = NULL; if (opline->extended_value) { expr_ptr_ptr=NULL; expr_ptr = *expr_ptr_ptr; } else { expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); } #else expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); #endif if (1) { /* temporary variable */ zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; } else { #if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV if (opline->extended_value) { SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr); expr_ptr = *expr_ptr_ptr; Z_ADDREF_P(expr_ptr); } else #endif if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) { zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; zendi_zval_copy_ctor(*expr_ptr); } else { Z_ADDREF_P(expr_ptr); } } if (offset) { switch (Z_TYPE_P(offset)) { case IS_DOUBLE: zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL); break; case IS_LONG: case IS_BOOL: zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL); break; case IS_STRING: zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL); break; case IS_NULL: zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL); break; default: zend_error(E_WARNING, "Illegal offset type"); zval_ptr_dtor(&expr_ptr); /* do nothing */ break; } zval_dtor(free_op2.var); } else { zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL); } if (opline->extended_value) { } else { } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); array_init(&EX_T(opline->result.u.var).tmp_var); if (IS_TMP_VAR == IS_UNUSED) { ZEND_VM_NEXT_OPCODE(); #if 0 || IS_TMP_VAR != IS_UNUSED } else { return ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); #endif } } static int ZEND_FASTCALL ZEND_ADD_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; add_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SUB_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; sub_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_MUL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; mul_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_DIV_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; div_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_MOD_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; mod_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; shift_left_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; shift_right_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CONCAT_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; concat_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; is_identical_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; is_identical_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); Z_LVAL_P(result) = !Z_LVAL_P(result); zval_dtor(free_op1.var); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) == 0)); zval_dtor(free_op1.var); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) != 0)); zval_dtor(free_op1.var); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) < 0)); zval_dtor(free_op1.var); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0)); zval_dtor(free_op1.var); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_OR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; bitwise_or_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_AND_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; bitwise_and_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; boolean_xor_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval *str = &EX_T(opline->result.u.var).tmp_var; zval *var = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); zval var_copy; int use_copy = 0; if (IS_TMP_VAR == IS_UNUSED) { /* Initialize for erealloc in add_string_to_string */ Z_STRVAL_P(str) = NULL; Z_STRLEN_P(str) = 0; Z_TYPE_P(str) = IS_STRING; INIT_PZVAL(str); } if (Z_TYPE_P(var) != IS_STRING) { zend_make_printable_zval(var, &var_copy, &use_copy); if (use_copy) { var = &var_copy; } } add_string_to_string(str, str, var); if (use_copy) { zval_dtor(var); } /* original comment, possibly problematic: * FREE_OP is missing intentionally here - we're always working on the same temporary variable * (Zeev): I don't think it's problematic, we only use variables * which aren't affected by FREE_OP(Ts, )'s anyway, unless they're * string offsets or overloaded objects */ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *function_name; char *function_name_strval; int function_name_strlen; zend_free_op free_op1, free_op2; zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope)); function_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); if (Z_TYPE_P(function_name)!=IS_STRING) { zend_error_noreturn(E_ERROR, "Method name must be a string"); } function_name_strval = Z_STRVAL_P(function_name); function_name_strlen = Z_STRLEN_P(function_name); EX(object) = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) { if (Z_OBJ_HT_P(EX(object))->get_method == NULL) { zend_error_noreturn(E_ERROR, "Object does not support method calls"); } /* First, locate the function. */ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC); if (!EX(fbc)) { zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval); } EX(called_scope) = Z_OBJCE_P(EX(object)); } else { zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); } if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) { EX(object) = NULL; } else { if (!PZVAL_IS_REF(EX(object))) { Z_ADDREF_P(EX(object)); /* For $this pointer */ } else { zval *this_ptr; ALLOC_ZVAL(this_ptr); INIT_PZVAL_COPY(this_ptr, EX(object)); zval_copy_ctor(this_ptr); EX(object) = this_ptr; } } if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CASE_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); int switch_expr_is_overloaded=0; zend_free_op free_op1, free_op2; if (IS_TMP_VAR==IS_VAR) { if (EX_T(opline->op1.u.var).var.ptr_ptr) { PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr); } else { switch_expr_is_overloaded = 1; Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str); } } is_equal_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; if (switch_expr_is_overloaded) { /* We only free op1 if this is a string offset, * Since if it is a TMP_VAR, it'll be reused by * other CASE opcodes (whereas string offsets * are allocated at each get_zval_ptr()) */ zval_dtor(free_op1.var); EX_T(opline->op1.u.var).var.ptr_ptr = NULL; EX_T(opline->op1.u.var).var.ptr = NULL; } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr; zval *offset=_get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); #if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV zval **expr_ptr_ptr = NULL; if (opline->extended_value) { expr_ptr_ptr=NULL; expr_ptr = *expr_ptr_ptr; } else { expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); } #else expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); #endif if (1) { /* temporary variable */ zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; } else { #if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV if (opline->extended_value) { SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr); expr_ptr = *expr_ptr_ptr; Z_ADDREF_P(expr_ptr); } else #endif if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) { zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; zendi_zval_copy_ctor(*expr_ptr); } else { Z_ADDREF_P(expr_ptr); } } if (offset) { switch (Z_TYPE_P(offset)) { case IS_DOUBLE: zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL); break; case IS_LONG: case IS_BOOL: zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL); break; case IS_STRING: zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL); break; case IS_NULL: zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL); break; default: zend_error(E_WARNING, "Illegal offset type"); zval_ptr_dtor(&expr_ptr); /* do nothing */ break; } if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } else { zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL); } if (opline->extended_value) { } else { } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); array_init(&EX_T(opline->result.u.var).tmp_var); if (IS_TMP_VAR == IS_UNUSED) { ZEND_VM_NEXT_OPCODE(); #if 0 || IS_TMP_VAR != IS_UNUSED } else { return ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); #endif } } static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr; zval *offset=NULL; #if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV zval **expr_ptr_ptr = NULL; if (opline->extended_value) { expr_ptr_ptr=NULL; expr_ptr = *expr_ptr_ptr; } else { expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); } #else expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); #endif if (1) { /* temporary variable */ zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; } else { #if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV if (opline->extended_value) { SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr); expr_ptr = *expr_ptr_ptr; Z_ADDREF_P(expr_ptr); } else #endif if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) { zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; zendi_zval_copy_ctor(*expr_ptr); } else { Z_ADDREF_P(expr_ptr); } } if (offset) { switch (Z_TYPE_P(offset)) { case IS_DOUBLE: zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL); break; case IS_LONG: case IS_BOOL: zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL); break; case IS_STRING: zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL); break; case IS_NULL: zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL); break; default: zend_error(E_WARNING, "Illegal offset type"); zval_ptr_dtor(&expr_ptr); /* do nothing */ break; } } else { zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL); } if (opline->extended_value) { } else { } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); array_init(&EX_T(opline->result.u.var).tmp_var); if (IS_TMP_VAR == IS_UNUSED) { ZEND_VM_NEXT_OPCODE(); #if 0 || IS_TMP_VAR != IS_UNUSED } else { return ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); #endif } } static int ZEND_FASTCALL ZEND_ADD_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; add_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SUB_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; sub_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_MUL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; mul_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_DIV_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; div_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_MOD_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; mod_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; shift_left_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SR_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; shift_right_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CONCAT_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; concat_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; is_identical_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *result = &EX_T(opline->result.u.var).tmp_var; is_identical_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); Z_LVAL_P(result) = !Z_LVAL_P(result); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) == 0)); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) != 0)); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) < 0)); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0)); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_OR_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; bitwise_or_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_AND_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; bitwise_and_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; boolean_xor_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); zval_dtor(free_op1.var); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *str = &EX_T(opline->result.u.var).tmp_var; zval *var = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); zval var_copy; int use_copy = 0; if (IS_TMP_VAR == IS_UNUSED) { /* Initialize for erealloc in add_string_to_string */ Z_STRVAL_P(str) = NULL; Z_STRLEN_P(str) = 0; Z_TYPE_P(str) = IS_STRING; INIT_PZVAL(str); } if (Z_TYPE_P(var) != IS_STRING) { zend_make_printable_zval(var, &var_copy, &use_copy); if (use_copy) { var = &var_copy; } } add_string_to_string(str, str, var); if (use_copy) { zval_dtor(var); } /* original comment, possibly problematic: * FREE_OP is missing intentionally here - we're always working on the same temporary variable * (Zeev): I don't think it's problematic, we only use variables * which aren't affected by FREE_OP(Ts, )'s anyway, unless they're * string offsets or overloaded objects */ ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *function_name; char *function_name_strval; int function_name_strlen; zend_free_op free_op1; zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope)); function_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); if (Z_TYPE_P(function_name)!=IS_STRING) { zend_error_noreturn(E_ERROR, "Method name must be a string"); } function_name_strval = Z_STRVAL_P(function_name); function_name_strlen = Z_STRLEN_P(function_name); EX(object) = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) { if (Z_OBJ_HT_P(EX(object))->get_method == NULL) { zend_error_noreturn(E_ERROR, "Object does not support method calls"); } /* First, locate the function. */ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC); if (!EX(fbc)) { zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval); } EX(called_scope) = Z_OBJCE_P(EX(object)); } else { zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); } if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) { EX(object) = NULL; } else { if (!PZVAL_IS_REF(EX(object))) { Z_ADDREF_P(EX(object)); /* For $this pointer */ } else { zval *this_ptr; ALLOC_ZVAL(this_ptr); INIT_PZVAL_COPY(this_ptr, EX(object)); zval_copy_ctor(this_ptr); EX(object) = this_ptr; } } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CASE_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); int switch_expr_is_overloaded=0; zend_free_op free_op1; if (IS_TMP_VAR==IS_VAR) { if (EX_T(opline->op1.u.var).var.ptr_ptr) { PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr); } else { switch_expr_is_overloaded = 1; Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str); } } is_equal_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); if (switch_expr_is_overloaded) { /* We only free op1 if this is a string offset, * Since if it is a TMP_VAR, it'll be reused by * other CASE opcodes (whereas string offsets * are allocated at each get_zval_ptr()) */ zval_dtor(free_op1.var); EX_T(opline->op1.u.var).var.ptr_ptr = NULL; EX_T(opline->op1.u.var).var.ptr = NULL; } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr; zval *offset=_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); #if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV zval **expr_ptr_ptr = NULL; if (opline->extended_value) { expr_ptr_ptr=NULL; expr_ptr = *expr_ptr_ptr; } else { expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); } #else expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); #endif if (1) { /* temporary variable */ zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; } else { #if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV if (opline->extended_value) { SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr); expr_ptr = *expr_ptr_ptr; Z_ADDREF_P(expr_ptr); } else #endif if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) { zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; zendi_zval_copy_ctor(*expr_ptr); } else { Z_ADDREF_P(expr_ptr); } } if (offset) { switch (Z_TYPE_P(offset)) { case IS_DOUBLE: zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL); break; case IS_LONG: case IS_BOOL: zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL); break; case IS_STRING: zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL); break; case IS_NULL: zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL); break; default: zend_error(E_WARNING, "Illegal offset type"); zval_ptr_dtor(&expr_ptr); /* do nothing */ break; } } else { zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL); } if (opline->extended_value) { } else { } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); array_init(&EX_T(opline->result.u.var).tmp_var); if (IS_TMP_VAR == IS_UNUSED) { ZEND_VM_NEXT_OPCODE(); #if 0 || IS_TMP_VAR != IS_UNUSED } else { return ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); #endif } } static int ZEND_FASTCALL ZEND_BW_NOT_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; bitwise_not_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC) TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BOOL_NOT_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; boolean_not_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC) TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_PRE_INC_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval **var_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR == IS_VAR && !var_ptr) { zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets"); } if (IS_VAR == IS_VAR && *var_ptr == EG(error_zval_ptr)) { if (!RETURN_VALUE_UNUSED(&opline->result)) { AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr)); PZVAL_LOCK(EG(uninitialized_zval_ptr)); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } SEPARATE_ZVAL_IF_NOT_REF(var_ptr); if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get) && Z_OBJ_HANDLER_PP(var_ptr, set)) { /* proxy object */ zval *val = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC); Z_ADDREF_P(val); increment_function(val); Z_OBJ_HANDLER_PP(var_ptr, set)(var_ptr, val TSRMLS_CC); zval_ptr_dtor(&val); } else { increment_function(*var_ptr); } if (!RETURN_VALUE_UNUSED(&opline->result)) { AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr); PZVAL_LOCK(*var_ptr); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_PRE_DEC_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval **var_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR == IS_VAR && !var_ptr) { zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets"); } if (IS_VAR == IS_VAR && *var_ptr == EG(error_zval_ptr)) { if (!RETURN_VALUE_UNUSED(&opline->result)) { AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr)); PZVAL_LOCK(EG(uninitialized_zval_ptr)); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } SEPARATE_ZVAL_IF_NOT_REF(var_ptr); if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get) && Z_OBJ_HANDLER_PP(var_ptr, set)) { /* proxy object */ zval *val = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC); Z_ADDREF_P(val); decrement_function(val); Z_OBJ_HANDLER_PP(var_ptr, set)(var_ptr, val TSRMLS_CC); zval_ptr_dtor(&val); } else { decrement_function(*var_ptr); } if (!RETURN_VALUE_UNUSED(&opline->result)) { AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr); PZVAL_LOCK(*var_ptr); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_POST_INC_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval **var_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR == IS_VAR && !var_ptr) { zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets"); } if (IS_VAR == IS_VAR && *var_ptr == EG(error_zval_ptr)) { if (!RETURN_VALUE_UNUSED(&opline->result)) { EX_T(opline->result.u.var).tmp_var = *EG(uninitialized_zval_ptr); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } EX_T(opline->result.u.var).tmp_var = **var_ptr; zendi_zval_copy_ctor(EX_T(opline->result.u.var).tmp_var); SEPARATE_ZVAL_IF_NOT_REF(var_ptr); if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get) && Z_OBJ_HANDLER_PP(var_ptr, set)) { /* proxy object */ zval *val = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC); Z_ADDREF_P(val); increment_function(val); Z_OBJ_HANDLER_PP(var_ptr, set)(var_ptr, val TSRMLS_CC); zval_ptr_dtor(&val); } else { increment_function(*var_ptr); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_POST_DEC_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval **var_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR == IS_VAR && !var_ptr) { zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets"); } if (IS_VAR == IS_VAR && *var_ptr == EG(error_zval_ptr)) { if (!RETURN_VALUE_UNUSED(&opline->result)) { EX_T(opline->result.u.var).tmp_var = *EG(uninitialized_zval_ptr); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } EX_T(opline->result.u.var).tmp_var = **var_ptr; zendi_zval_copy_ctor(EX_T(opline->result.u.var).tmp_var); SEPARATE_ZVAL_IF_NOT_REF(var_ptr); if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get) && Z_OBJ_HANDLER_PP(var_ptr, set)) { /* proxy object */ zval *val = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC); Z_ADDREF_P(val); decrement_function(val); Z_OBJ_HANDLER_PP(var_ptr, set)(var_ptr, val TSRMLS_CC); zval_ptr_dtor(&val); } else { decrement_function(*var_ptr); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ECHO_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval z_copy; zval *z = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR != IS_CONST && Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get_method != NULL && zend_std_cast_object_tostring(z, &z_copy, IS_STRING TSRMLS_CC) == SUCCESS) { zend_print_variable(&z_copy); zval_dtor(&z_copy); } else { zend_print_variable(z); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_PRINT_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1; Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_LONG; return ZEND_ECHO_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_VAR(int type, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *varname = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zval **retval; zval tmp_varname; HashTable *target_symbol_table; if (IS_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) { tmp_varname = *varname; zval_copy_ctor(&tmp_varname); convert_to_string(&tmp_varname); varname = &tmp_varname; } if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; } else { target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC); /* if (!target_symbol_table) { ZEND_VM_NEXT_OPCODE(); } */ if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &retval) == FAILURE) { switch (type) { case BP_VAR_R: case BP_VAR_UNSET: zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname)); /* break missing intentionally */ case BP_VAR_IS: retval = &EG(uninitialized_zval_ptr); break; case BP_VAR_RW: zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname)); /* break missing intentionally */ case BP_VAR_W: { zval *new_zval = &EG(uninitialized_zval); Z_ADDREF_P(new_zval); zend_hash_update(target_symbol_table, varname->value.str.val, varname->value.str.len+1, &new_zval, sizeof(zval *), (void **) &retval); } break; EMPTY_SWITCH_DEFAULT_CASE() } } switch (opline->op2.u.EA.type) { case ZEND_FETCH_GLOBAL: if (IS_VAR != IS_TMP_VAR) { if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; } break; case ZEND_FETCH_LOCAL: if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; break; case ZEND_FETCH_STATIC: zval_update_constant(retval, (void*) 1 TSRMLS_CC); break; case ZEND_FETCH_GLOBAL_LOCK: if (IS_VAR == IS_VAR && !free_op1.var) { PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr); } break; } } if (IS_VAR != IS_CONST && varname == &tmp_varname) { zval_dtor(varname); } if (!RETURN_VALUE_UNUSED(&opline->result)) { if (opline->extended_value & ZEND_FETCH_MAKE_REF) { SEPARATE_ZVAL_TO_MAKE_IS_REF(retval); } PZVAL_LOCK(*retval); switch (type) { case BP_VAR_R: case BP_VAR_IS: AI_SET_PTR(EX_T(opline->result.u.var).var, *retval); break; case BP_VAR_UNSET: { zend_free_op free_res; EX_T(opline->result.u.var).var.ptr_ptr = retval; PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res); if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr); } PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr); FREE_OP_VAR_PTR(free_res); break; default: EX_T(opline->result.u.var).var.ptr_ptr = retval; break; } } } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_VAR(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_VAR(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_VAR(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_VAR(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), EX(opline)->extended_value)?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_VAR(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_VAR(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_JMPZ_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *val = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); int ret; if (IS_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) { ret = Z_LVAL_P(val); } else { ret = i_zend_is_true(val); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; if (UNEXPECTED(EG(exception) != NULL)) { ZEND_VM_CONTINUE(); } } if (!ret) { #if DEBUG_ZEND>=2 printf("Conditional jmp to %d\n", opline->op2.u.opline_num); #endif ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr); ZEND_VM_CONTINUE(); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_JMPNZ_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *val = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); int ret; if (IS_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) { ret = Z_LVAL_P(val); } else { ret = i_zend_is_true(val); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; if (UNEXPECTED(EG(exception) != NULL)) { ZEND_VM_CONTINUE(); } } if (ret) { #if DEBUG_ZEND>=2 printf("Conditional jmp to %d\n", opline->op2.u.opline_num); #endif ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr); ZEND_VM_CONTINUE(); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_JMPZNZ_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *val = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); int retval; if (IS_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) { retval = Z_LVAL_P(val); } else { retval = i_zend_is_true(val); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; if (UNEXPECTED(EG(exception) != NULL)) { ZEND_VM_CONTINUE(); } } if (EXPECTED(retval != 0)) { #if DEBUG_ZEND>=2 printf("Conditional jmp on true to %d\n", opline->extended_value); #endif ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]); ZEND_VM_CONTINUE(); /* CHECK_ME */ } else { #if DEBUG_ZEND>=2 printf("Conditional jmp on false to %d\n", opline->op2.u.opline_num); #endif ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.u.opline_num]); ZEND_VM_CONTINUE(); /* CHECK_ME */ } } static int ZEND_FASTCALL ZEND_JMPZ_EX_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *val = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); int retval; if (IS_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) { retval = Z_LVAL_P(val); } else { retval = i_zend_is_true(val); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; if (UNEXPECTED(EG(exception) != NULL)) { ZEND_VM_CONTINUE(); } } Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval; Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; if (!retval) { #if DEBUG_ZEND>=2 printf("Conditional jmp to %d\n", opline->op2.u.opline_num); #endif ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr); ZEND_VM_CONTINUE(); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_JMPNZ_EX_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *val = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); int retval; if (IS_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) { retval = Z_LVAL_P(val); } else { retval = i_zend_is_true(val); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; if (UNEXPECTED(EG(exception) != NULL)) { ZEND_VM_CONTINUE(); } } Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval; Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; if (retval) { #if DEBUG_ZEND>=2 printf("Conditional jmp to %d\n", opline->op2.u.opline_num); #endif ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr); ZEND_VM_CONTINUE(); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_RETURN_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *retval_ptr; zval **retval_ptr_ptr; zend_free_op free_op1; if (EG(active_op_array)->return_reference == ZEND_RETURN_REF) { if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) { /* Not supposed to happen, but we'll allow it */ zend_error(E_NOTICE, "Only variable references should be returned by reference"); goto return_by_value; } retval_ptr_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR == IS_VAR && !retval_ptr_ptr) { zend_error_noreturn(E_ERROR, "Cannot return string offsets by reference"); } if (IS_VAR == IS_VAR && !Z_ISREF_PP(retval_ptr_ptr)) { if (opline->extended_value == ZEND_RETURNS_FUNCTION && EX_T(opline->op1.u.var).var.fcall_returned_reference) { } else if (EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) { if (IS_VAR == IS_VAR && !(free_op1.var != NULL)) { PZVAL_LOCK(*retval_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */ } zend_error(E_NOTICE, "Only variable references should be returned by reference"); goto return_by_value; } } if (EG(return_value_ptr_ptr)) { SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr); Z_ADDREF_PP(retval_ptr_ptr); (*EG(return_value_ptr_ptr)) = (*retval_ptr_ptr); } } else { return_by_value: retval_ptr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (!EG(return_value_ptr_ptr)) { if (IS_VAR == IS_TMP_VAR) { if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; } } else if (!0) { /* Not a temp var */ if (IS_VAR == IS_CONST || EG(active_op_array)->return_reference == ZEND_RETURN_REF || (PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) { zval *ret; ALLOC_ZVAL(ret); INIT_PZVAL_COPY(ret, retval_ptr); zval_copy_ctor(ret); *EG(return_value_ptr_ptr) = ret; } else if ((IS_VAR == IS_CV || IS_VAR == IS_VAR) && retval_ptr == &EG(uninitialized_zval)) { zval *ret; ALLOC_INIT_ZVAL(ret); *EG(return_value_ptr_ptr) = ret; } else { *EG(return_value_ptr_ptr) = retval_ptr; Z_ADDREF_P(retval_ptr); } } else { zval *ret; ALLOC_ZVAL(ret); INIT_PZVAL_COPY(ret, retval_ptr); *EG(return_value_ptr_ptr) = ret; } } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_THROW_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *value; zval *exception; zend_free_op free_op1; value = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR == IS_CONST || Z_TYPE_P(value) != IS_OBJECT) { zend_error_noreturn(E_ERROR, "Can only throw objects"); } zend_exception_save(TSRMLS_C); /* Not sure if a complete copy is what we want here */ ALLOC_ZVAL(exception); INIT_PZVAL_COPY(exception, value); if (!0) { zval_copy_ctor(exception); } zend_throw_exception_object(exception TSRMLS_CC); zend_exception_restore(TSRMLS_C); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SEND_VAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); if (opline->extended_value==ZEND_DO_FCALL_BY_NAME && ARG_MUST_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) { zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.u.opline_num); } { zval *valptr; zval *value; zend_free_op free_op1; value = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); ALLOC_ZVAL(valptr); INIT_PZVAL_COPY(valptr, value); if (!0) { zval_copy_ctor(valptr); } zend_vm_stack_push(valptr TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *varptr; zend_free_op free_op1; varptr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (varptr == &EG(uninitialized_zval)) { ALLOC_ZVAL(varptr); INIT_ZVAL(*varptr); Z_SET_REFCOUNT_P(varptr, 0); } else if (PZVAL_IS_REF(varptr)) { zval *original_var = varptr; ALLOC_ZVAL(varptr); *varptr = *original_var; Z_UNSET_ISREF_P(varptr); Z_SET_REFCOUNT_P(varptr, 0); zval_copy_ctor(varptr); } Z_ADDREF_P(varptr); zend_vm_stack_push(varptr TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; /* for string offsets */ ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *varptr; if (opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) { /* Had function_ptr at compile_time */ if (!(opline->extended_value & ZEND_ARG_SEND_BY_REF)) { return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } } else if (!ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) { return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } if (IS_VAR == IS_VAR && (opline->extended_value & ZEND_ARG_SEND_FUNCTION) && EX_T(opline->op1.u.var).var.fcall_returned_reference && EX_T(opline->op1.u.var).var.ptr) { varptr = EX_T(opline->op1.u.var).var.ptr; PZVAL_UNLOCK_EX(varptr, &free_op1, 0); } else { varptr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); } if ((!(opline->extended_value & ZEND_ARG_SEND_FUNCTION) || EX_T(opline->op1.u.var).var.fcall_returned_reference) && varptr != &EG(uninitialized_zval) && (PZVAL_IS_REF(varptr) || (Z_REFCOUNT_P(varptr) == 1 && (IS_VAR == IS_CV || free_op1.var)))) { Z_SET_ISREF_P(varptr); Z_ADDREF_P(varptr); zend_vm_stack_push(varptr TSRMLS_CC); } else { zval *valptr; if ((opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) ? !(opline->extended_value & ZEND_ARG_SEND_SILENT) : !ARG_MAY_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) { zend_error(E_STRICT, "Only variables should be passed by reference"); } ALLOC_ZVAL(valptr); INIT_PZVAL_COPY(valptr, varptr); if (!0) { zval_copy_ctor(valptr); } zend_vm_stack_push(valptr TSRMLS_CC); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval **varptr_ptr; zval *varptr; varptr_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR == IS_VAR && !varptr_ptr) { zend_error_noreturn(E_ERROR, "Only variables can be passed by reference"); } if (IS_VAR == IS_VAR && *varptr_ptr == EG(error_zval_ptr)) { ALLOC_INIT_ZVAL(varptr); zend_vm_stack_push(varptr TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) { return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } SEPARATE_ZVAL_TO_MAKE_IS_REF(varptr_ptr); varptr = *varptr_ptr; Z_ADDREF_P(varptr); zend_vm_stack_push(varptr TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SEND_VAR_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); if ((opline->extended_value == ZEND_DO_FCALL_BY_NAME) && ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) { return ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_BOOL_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; /* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */ Z_LVAL(EX_T(opline->result.u.var).tmp_var) = i_zend_is_true(_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC)); Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SWITCH_FREE_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_switch_free(&EX_T(opline->op1.u.var), opline->extended_value TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CLONE_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *obj = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zend_class_entry *ce; zend_function *clone; zend_object_clone_obj_t clone_call; if (IS_VAR == IS_CONST || (IS_VAR == IS_VAR && !obj) || Z_TYPE_P(obj) != IS_OBJECT) { zend_error_noreturn(E_ERROR, "__clone method called on non-object"); } ce = Z_OBJCE_P(obj); clone = ce ? ce->clone : NULL; clone_call = Z_OBJ_HT_P(obj)->clone_obj; if (!clone_call) { if (ce) { zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object of class %s", ce->name); } else { zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object"); } } if (ce && clone) { if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) { /* Ensure that if we're calling a private function, we're allowed to do so. */ if (ce != EG(scope)) { zend_error_noreturn(E_ERROR, "Call to private %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : ""); } } else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) { /* Ensure that if we're calling a protected function, we're allowed to do so. */ if (!zend_check_protected(clone->common.scope, EG(scope))) { zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : ""); } } } EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr; if (!EG(exception)) { ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr); Z_OBJVAL_P(EX_T(opline->result.u.var).var.ptr) = clone_call(obj TSRMLS_CC); Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_OBJECT; Z_SET_REFCOUNT_P(EX_T(opline->result.u.var).var.ptr, 1); Z_SET_ISREF_P(EX_T(opline->result.u.var).var.ptr); if (!RETURN_VALUE_USED(opline) || EG(exception)) { zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr); } } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CAST_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *expr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zval *result = &EX_T(opline->result.u.var).tmp_var; if (opline->extended_value != IS_STRING) { *result = *expr; if (!0) { zendi_zval_copy_ctor(*result); } } switch (opline->extended_value) { case IS_NULL: convert_to_null(result); break; case IS_BOOL: convert_to_boolean(result); break; case IS_LONG: convert_to_long(result); break; case IS_DOUBLE: convert_to_double(result); break; case IS_STRING: { zval var_copy; int use_copy; zend_make_printable_zval(expr, &var_copy, &use_copy); if (use_copy) { *result = var_copy; if (0) { if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; } } else { *result = *expr; if (!0) { zendi_zval_copy_ctor(*result); } } break; } case IS_ARRAY: convert_to_array(result); break; case IS_OBJECT: convert_to_object(result); break; } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op_array *new_op_array=NULL; int return_value_used; zend_free_op free_op1; zval *inc_filename = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zval tmp_inc_filename; zend_bool failure_retval=0; if (inc_filename->type!=IS_STRING) { tmp_inc_filename = *inc_filename; zval_copy_ctor(&tmp_inc_filename); convert_to_string(&tmp_inc_filename); inc_filename = &tmp_inc_filename; } return_value_used = RETURN_VALUE_USED(opline); switch (Z_LVAL(opline->op2.u.constant)) { case ZEND_INCLUDE_ONCE: case ZEND_REQUIRE_ONCE: { zend_file_handle file_handle; char *resolved_path; resolved_path = zend_resolve_path(Z_STRVAL_P(inc_filename), Z_STRLEN_P(inc_filename) TSRMLS_CC); if (resolved_path) { failure_retval = zend_hash_exists(&EG(included_files), resolved_path, strlen(resolved_path)+1); } else { resolved_path = Z_STRVAL_P(inc_filename); } if (failure_retval) { /* do nothing, file already included */ } else if (SUCCESS == zend_stream_open(resolved_path, &file_handle TSRMLS_CC)) { if (!file_handle.opened_path) { file_handle.opened_path = estrdup(resolved_path); } if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) { new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC); zend_destroy_file_handle(&file_handle TSRMLS_CC); } else { zend_file_handle_dtor(&file_handle TSRMLS_CC); failure_retval=1; } } else { if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) { zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC); } else { zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC); } } if (resolved_path != Z_STRVAL_P(inc_filename)) { efree(resolved_path); } } break; case ZEND_INCLUDE: case ZEND_REQUIRE: new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC); break; case ZEND_EVAL: { char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC); new_op_array = zend_compile_string(inc_filename, eval_desc TSRMLS_CC); efree(eval_desc); } break; EMPTY_SWITCH_DEFAULT_CASE() } if (inc_filename==&tmp_inc_filename) { zval_dtor(&tmp_inc_filename); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr; if (new_op_array && !EG(exception)) { EX(original_return_value) = EG(return_value_ptr_ptr); EG(return_value_ptr_ptr) = return_value_used ? EX_T(opline->result.u.var).var.ptr_ptr : NULL; EG(active_op_array) = new_op_array; EX_T(opline->result.u.var).var.ptr = NULL; EX(current_object) = EX(object); EX(function_state).function = (zend_function *) new_op_array; EX(object) = NULL; if (!EG(active_symbol_table)) { zend_rebuild_symbol_table(TSRMLS_C); } if (zend_execute == execute) { EX(call_opline) = opline; ZEND_VM_ENTER(); } else { zend_execute(new_op_array TSRMLS_CC); } EX(function_state).function = (zend_function *) EX(op_array); EX(object) = EX(current_object); if (return_value_used) { if (!EX_T(opline->result.u.var).var.ptr) { /* there was no return statement */ ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr); INIT_PZVAL(EX_T(opline->result.u.var).var.ptr); Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = 1; Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL; } } EG(opline_ptr) = &EX(opline); EG(active_op_array) = EX(op_array); EG(return_value_ptr_ptr) = EX(original_return_value); destroy_op_array(new_op_array TSRMLS_CC); efree(new_op_array); if (EG(exception)) { zend_throw_exception_internal(NULL TSRMLS_CC); } } else { if (return_value_used) { ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr); INIT_ZVAL(*EX_T(opline->result.u.var).var.ptr); Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = failure_retval; Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL; } } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval tmp, *varname; HashTable *target_symbol_table; zend_free_op free_op1; if (IS_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EG(active_symbol_table)) { zend_execute_data *ex = EX(prev_execute_data); zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); if (zend_hash_quick_del(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value) == SUCCESS) { while (ex && ex->symbol_table == EG(active_symbol_table)) { int i; if (ex->op_array) { for (i = 0; i < ex->op_array->last_var; i++) { if (ex->op_array->vars[i].hash_value == cv->hash_value && ex->op_array->vars[i].name_len == cv->name_len && !memcmp(ex->op_array->vars[i].name, cv->name, cv->name_len)) { ex->CVs[i] = NULL; break; } } } ex = ex->prev_execute_data; } } EX(CVs)[opline->op1.u.var] = NULL; } else if (EX(CVs)[opline->op1.u.var]) { zval_ptr_dtor(EX(CVs)[opline->op1.u.var]); EX(CVs)[opline->op1.u.var] = NULL; } ZEND_VM_NEXT_OPCODE(); } varname = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (Z_TYPE_P(varname) != IS_STRING) { tmp = *varname; zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; } else if (IS_VAR == IS_VAR || IS_VAR == IS_CV) { Z_ADDREF_P(varname); } if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { zend_std_unset_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname) TSRMLS_CC); } else { ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1); target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC); if (zend_hash_quick_del(target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value) == SUCCESS) { zend_execute_data *ex = execute_data; do { int i; if (ex->op_array) { for (i = 0; i < ex->op_array->last_var; i++) { if (ex->op_array->vars[i].hash_value == hash_value && ex->op_array->vars[i].name_len == varname->value.str.len && !memcmp(ex->op_array->vars[i].name, varname->value.str.val, varname->value.str.len)) { ex->CVs[i] = NULL; break; } } } ex = ex->prev_execute_data; } while (ex && ex->symbol_table == target_symbol_table); } } if (varname == &tmp) { zval_dtor(&tmp); } else if (IS_VAR == IS_VAR || IS_VAR == IS_CV) { zval_ptr_dtor(&varname); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *array_ptr, **array_ptr_ptr; HashTable *fe_ht; zend_object_iterator *iter = NULL; zend_class_entry *ce = NULL; zend_bool is_empty = 0; if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { array_ptr_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (array_ptr_ptr == NULL || array_ptr_ptr == &EG(uninitialized_zval_ptr)) { ALLOC_INIT_ZVAL(array_ptr); } else if (Z_TYPE_PP(array_ptr_ptr) == IS_OBJECT) { if(Z_OBJ_HT_PP(array_ptr_ptr)->get_class_entry == NULL) { zend_error(E_WARNING, "foreach() cannot iterate over objects without PHP class"); ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num); } ce = Z_OBJCE_PP(array_ptr_ptr); if (!ce || ce->get_iterator == NULL) { SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); Z_ADDREF_PP(array_ptr_ptr); } array_ptr = *array_ptr_ptr; } else { if (Z_TYPE_PP(array_ptr_ptr) == IS_ARRAY) { SEPARATE_ZVAL_IF_NOT_REF(array_ptr_ptr); if (opline->extended_value & ZEND_FE_FETCH_BYREF) { Z_SET_ISREF_PP(array_ptr_ptr); } } array_ptr = *array_ptr_ptr; Z_ADDREF_P(array_ptr); } } else { array_ptr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (0) { /* IS_TMP_VAR */ zval *tmp; ALLOC_ZVAL(tmp); INIT_PZVAL_COPY(tmp, array_ptr); array_ptr = tmp; if (Z_TYPE_P(array_ptr) == IS_OBJECT) { ce = Z_OBJCE_P(array_ptr); if (ce && ce->get_iterator) { Z_DELREF_P(array_ptr); } } } else if (Z_TYPE_P(array_ptr) == IS_OBJECT) { ce = Z_OBJCE_P(array_ptr); if (!ce || !ce->get_iterator) { Z_ADDREF_P(array_ptr); } } else if (IS_VAR == IS_CONST || ((IS_VAR == IS_CV || IS_VAR == IS_VAR) && !Z_ISREF_P(array_ptr) && Z_REFCOUNT_P(array_ptr) > 1)) { zval *tmp; ALLOC_ZVAL(tmp); INIT_PZVAL_COPY(tmp, array_ptr); zval_copy_ctor(tmp); array_ptr = tmp; } else { Z_ADDREF_P(array_ptr); } } if (ce && ce->get_iterator) { iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC); if (iter && !EG(exception)) { array_ptr = zend_iterator_wrap(iter TSRMLS_CC); } else { if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; } else { if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; } if (!EG(exception)) { zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Object of type %s did not create an Iterator", ce->name); } zend_throw_exception_internal(NULL TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } } AI_SET_PTR(EX_T(opline->result.u.var).var, array_ptr); PZVAL_LOCK(array_ptr); if (iter) { iter->index = 0; if (iter->funcs->rewind) { iter->funcs->rewind(iter TSRMLS_CC); if (EG(exception)) { Z_DELREF_P(array_ptr); zval_ptr_dtor(&array_ptr); if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; } else { if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; } ZEND_VM_NEXT_OPCODE(); } } is_empty = iter->funcs->valid(iter TSRMLS_CC) != SUCCESS; if (EG(exception)) { Z_DELREF_P(array_ptr); zval_ptr_dtor(&array_ptr); if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; } else { if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; } ZEND_VM_NEXT_OPCODE(); } iter->index = -1; /* will be set to 0 before using next handler */ } else if ((fe_ht = HASH_OF(array_ptr)) != NULL) { zend_hash_internal_pointer_reset(fe_ht); if (ce) { zend_object *zobj = zend_objects_get_address(array_ptr TSRMLS_CC); while (zend_hash_has_more_elements(fe_ht) == SUCCESS) { char *str_key; uint str_key_len; ulong int_key; zend_uchar key_type; key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL); if (key_type != HASH_KEY_NON_EXISTANT && (key_type == HASH_KEY_IS_LONG || zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) == SUCCESS)) { break; } zend_hash_move_forward(fe_ht); } } is_empty = zend_hash_has_more_elements(fe_ht) != SUCCESS; zend_hash_get_pointer(fe_ht, &EX_T(opline->result.u.var).fe.fe_pos); } else { zend_error(E_WARNING, "Invalid argument supplied for foreach()"); is_empty = 1; } if (opline->extended_value & ZEND_FE_RESET_VARIABLE) { if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; } else { if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; } if (is_empty) { ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num); } else { ZEND_VM_NEXT_OPCODE(); } } static int ZEND_FASTCALL ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *array = EX_T(opline->op1.u.var).var.ptr; zval **value; char *str_key; uint str_key_len; ulong int_key; HashTable *fe_ht; zend_object_iterator *iter = NULL; int key_type = 0; zend_bool use_key = (zend_bool)(opline->extended_value & ZEND_FE_FETCH_WITH_KEY); switch (zend_iterator_unwrap(array, &iter TSRMLS_CC)) { default: case ZEND_ITER_INVALID: zend_error(E_WARNING, "Invalid argument supplied for foreach()"); ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num); case ZEND_ITER_PLAIN_OBJECT: { char *class_name, *prop_name; zend_object *zobj = zend_objects_get_address(array TSRMLS_CC); fe_ht = HASH_OF(array); zend_hash_set_pointer(fe_ht, &EX_T(opline->op1.u.var).fe.fe_pos); do { if (zend_hash_get_current_data(fe_ht, (void **) &value)==FAILURE) { /* reached end of iteration */ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num); } key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL); zend_hash_move_forward(fe_ht); } while (key_type == HASH_KEY_NON_EXISTANT || (key_type != HASH_KEY_IS_LONG && zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) != SUCCESS)); zend_hash_get_pointer(fe_ht, &EX_T(opline->op1.u.var).fe.fe_pos); if (use_key && key_type != HASH_KEY_IS_LONG) { zend_unmangle_property_name(str_key, str_key_len-1, &class_name, &prop_name); str_key_len = strlen(prop_name); str_key = estrndup(prop_name, str_key_len); str_key_len++; } break; } case ZEND_ITER_PLAIN_ARRAY: fe_ht = HASH_OF(array); zend_hash_set_pointer(fe_ht, &EX_T(opline->op1.u.var).fe.fe_pos); if (zend_hash_get_current_data(fe_ht, (void **) &value)==FAILURE) { /* reached end of iteration */ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num); } if (use_key) { key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 1, NULL); } zend_hash_move_forward(fe_ht); zend_hash_get_pointer(fe_ht, &EX_T(opline->op1.u.var).fe.fe_pos); break; case ZEND_ITER_OBJECT: /* !iter happens from exception */ if (iter && ++iter->index > 0) { /* This could cause an endless loop if index becomes zero again. * In case that ever happens we need an additional flag. */ iter->funcs->move_forward(iter TSRMLS_CC); if (EG(exception)) { Z_DELREF_P(array); zval_ptr_dtor(&array); ZEND_VM_NEXT_OPCODE(); } } /* If index is zero we come from FE_RESET and checked valid() already. */ if (!iter || (iter->index > 0 && iter->funcs->valid(iter TSRMLS_CC) == FAILURE)) { /* reached end of iteration */ if (EG(exception)) { Z_DELREF_P(array); zval_ptr_dtor(&array); ZEND_VM_NEXT_OPCODE(); } ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num); } iter->funcs->get_current_data(iter, &value TSRMLS_CC); if (EG(exception)) { Z_DELREF_P(array); zval_ptr_dtor(&array); ZEND_VM_NEXT_OPCODE(); } if (!value) { /* failure in get_current_data */ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num); } if (use_key) { if (iter->funcs->get_current_key) { key_type = iter->funcs->get_current_key(iter, &str_key, &str_key_len, &int_key TSRMLS_CC); if (EG(exception)) { Z_DELREF_P(array); zval_ptr_dtor(&array); ZEND_VM_NEXT_OPCODE(); } } else { key_type = HASH_KEY_IS_LONG; int_key = iter->index; } } break; } if (opline->extended_value & ZEND_FE_FETCH_BYREF) { SEPARATE_ZVAL_IF_NOT_REF(value); Z_SET_ISREF_PP(value); EX_T(opline->result.u.var).var.ptr_ptr = value; Z_ADDREF_PP(value); } else { AI_SET_PTR(EX_T(opline->result.u.var).var, *value); PZVAL_LOCK(*value); } if (use_key) { zend_op *op_data = opline+1; zval *key = &EX_T(op_data->result.u.var).tmp_var; switch (key_type) { case HASH_KEY_IS_STRING: Z_STRVAL_P(key) = str_key; Z_STRLEN_P(key) = str_key_len-1; Z_TYPE_P(key) = IS_STRING; break; case HASH_KEY_IS_LONG: Z_LVAL_P(key) = int_key; Z_TYPE_P(key) = IS_LONG; break; default: case HASH_KEY_NON_EXISTANT: ZVAL_NULL(key); break; } } ZEND_VM_INC_OPCODE(); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval **value; zend_bool isset = 1; if (IS_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) { if (EX(CVs)[opline->op1.u.var]) { value = EX(CVs)[opline->op1.u.var]; } else if (EG(active_symbol_table)) { zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var); if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) { isset = 0; } } else { isset = 0; } } else { HashTable *target_symbol_table; zend_free_op free_op1; zval tmp, *varname = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (Z_TYPE_P(varname) != IS_STRING) { tmp = *varname; zval_copy_ctor(&tmp); convert_to_string(&tmp); varname = &tmp; } if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { value = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1 TSRMLS_CC); if (!value) { isset = 0; } } else { target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC); if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) { isset = 0; } } if (varname == &tmp) { zval_dtor(&tmp); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; } Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL; switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; } else { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = isset; } break; case ZEND_ISEMPTY: if (!isset || !i_zend_is_true(*value)) { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1; } else { Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0; } break; } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_EXIT_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { #if 0 || (IS_VAR != IS_UNUSED) zend_op *opline = EX(opline); if (IS_VAR != IS_UNUSED) { zend_free_op free_op1; zval *ptr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (Z_TYPE_P(ptr) == IS_LONG) { EG(exit_status) = Z_LVAL_P(ptr); } else { zend_print_variable(ptr); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; } #endif zend_bailout(); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_JMP_SET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *value = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (i_zend_is_true(value)) { EX_T(opline->result.u.var).tmp_var = *value; zendi_zval_copy_ctor(EX_T(opline->result.u.var).tmp_var); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; #if DEBUG_ZEND>=2 printf("Conditional jmp to %d\n", opline->op2.u.opline_num); #endif ZEND_VM_JMP(opline->op2.u.jmp_addr); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *value = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); EX_T(opline->result.u.var).tmp_var = *value; if (!0) { zval_copy_ctor(&EX_T(opline->result.u.var).tmp_var); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INSTANCEOF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *expr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zend_bool result; if (Z_TYPE_P(expr) == IS_OBJECT && Z_OBJ_HT_P(expr)->get_class_entry) { result = instanceof_function(Z_OBJCE_P(expr), EX_T(opline->op2.u.var).class_entry TSRMLS_CC); } else { result = 0; } ZVAL_BOOL(&EX_T(opline->result.u.var).tmp_var, result); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ADD_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; add_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SUB_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; sub_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_MUL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; mul_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_DIV_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; div_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_MOD_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; mod_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; shift_left_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_SR_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; shift_right_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CONCAT_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; concat_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; is_identical_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *result = &EX_T(opline->result.u.var).tmp_var; is_identical_function(result, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); Z_LVAL_P(result) = !Z_LVAL_P(result); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) == 0)); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) != 0)); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) < 0)); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0)); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_OR_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; bitwise_or_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_AND_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; bitwise_and_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; boolean_xor_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; zend_free_op free_op1, free_op_data1; zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zval *object; zval *property = &opline->op2.u.constant; zval *value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R); znode *result = &opline->result; int have_get_ptr = 0; if (IS_VAR == IS_VAR && !object_ptr) { zend_error_noreturn(E_ERROR, "Cannot use string offset as an object"); } EX_T(result->u.var).var.ptr_ptr = NULL; make_real_object(object_ptr TSRMLS_CC); object = *object_ptr; if (Z_TYPE_P(object) != IS_OBJECT) { zend_error(E_WARNING, "Attempt to assign property of non-object"); FREE_OP(free_op_data1); if (!RETURN_VALUE_UNUSED(result)) { EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr); EX_T(result->u.var).var.ptr_ptr = NULL; PZVAL_LOCK(EG(uninitialized_zval_ptr)); } } else { /* here we are sure we are dealing with an object */ if (0) { MAKE_REAL_ZVAL_PTR(property); } /* here property is a string */ if (opline->extended_value == ZEND_ASSIGN_OBJ && Z_OBJ_HT_P(object)->get_property_ptr_ptr) { zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC); if (zptr != NULL) { /* NULL means no success in getting PTR */ SEPARATE_ZVAL_IF_NOT_REF(zptr); have_get_ptr = 1; binary_op(*zptr, *zptr, value TSRMLS_CC); if (!RETURN_VALUE_UNUSED(result)) { EX_T(result->u.var).var.ptr = *zptr; EX_T(result->u.var).var.ptr_ptr = NULL; PZVAL_LOCK(*zptr); } } } if (!have_get_ptr) { zval *z = NULL; if (opline->extended_value == ZEND_ASSIGN_OBJ) { if (Z_OBJ_HT_P(object)->read_property) { z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC); } } else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ { if (Z_OBJ_HT_P(object)->read_dimension) { z = Z_OBJ_HT_P(object)->read_dimension(object, property, BP_VAR_R TSRMLS_CC); } } if (z) { if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) { zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC); if (Z_REFCOUNT_P(z) == 0) { GC_REMOVE_ZVAL_FROM_BUFFER(z); zval_dtor(z); FREE_ZVAL(z); } z = value; } Z_ADDREF_P(z); SEPARATE_ZVAL_IF_NOT_REF(&z); binary_op(z, z, value TSRMLS_CC); if (opline->extended_value == ZEND_ASSIGN_OBJ) { Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC); } else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ { Z_OBJ_HT_P(object)->write_dimension(object, property, z TSRMLS_CC); } if (!RETURN_VALUE_UNUSED(result)) { EX_T(result->u.var).var.ptr = z; EX_T(result->u.var).var.ptr_ptr = NULL; PZVAL_LOCK(z); } zval_ptr_dtor(&z); } else { zend_error(E_WARNING, "Attempt to assign property of non-object"); if (!RETURN_VALUE_UNUSED(result)) { EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr); EX_T(result->u.var).var.ptr_ptr = NULL; PZVAL_LOCK(EG(uninitialized_zval_ptr)); } } } if (0) { zval_ptr_dtor(&property); } else { } FREE_OP(free_op_data1); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; /* assign_obj has two opcodes! */ ZEND_VM_INC_OPCODE(); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_VAR_CONST(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op_data2, free_op_data1; zval **var_ptr; zval *value; switch (opline->extended_value) { case ZEND_ASSIGN_OBJ: return zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); break; case ZEND_ASSIGN_DIM: { zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR == IS_VAR && !container) { zend_error_noreturn(E_ERROR, "Cannot use string offset as an array"); } else if (Z_TYPE_PP(container) == IS_OBJECT) { if (IS_VAR == IS_VAR && !(free_op1.var != NULL)) { Z_ADDREF_PP(container); /* undo the effect of get_obj_zval_ptr_ptr() */ } return zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } else { zend_op *op_data = opline+1; zval *dim = &opline->op2.u.constant; zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC); value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R); var_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC); ZEND_VM_INC_OPCODE(); } } break; default: value = &opline->op2.u.constant; var_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); /* do nothing */ break; } if (!var_ptr) { zend_error_noreturn(E_ERROR, "Cannot use assign-op operators with overloaded objects nor string offsets"); } if (*var_ptr == EG(error_zval_ptr)) { if (!RETURN_VALUE_UNUSED(&opline->result)) { AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr)); PZVAL_LOCK(EG(uninitialized_zval_ptr)); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } SEPARATE_ZVAL_IF_NOT_REF(var_ptr); if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get) && Z_OBJ_HANDLER_PP(var_ptr, set)) { /* proxy object */ zval *objval = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC); Z_ADDREF_P(objval); binary_op(objval, objval, value TSRMLS_CC); Z_OBJ_HANDLER_PP(var_ptr, set)(var_ptr, objval TSRMLS_CC); zval_ptr_dtor(&objval); } else { binary_op(*var_ptr, *var_ptr, value TSRMLS_CC); } if (!RETURN_VALUE_UNUSED(&opline->result)) { AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr); PZVAL_LOCK(*var_ptr); } if (opline->extended_value == ZEND_ASSIGN_DIM) { FREE_OP(free_op_data1); FREE_OP_VAR_PTR(free_op_data2); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ASSIGN_ADD_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_binary_assign_op_helper_SPEC_VAR_CONST(add_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_ASSIGN_SUB_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_binary_assign_op_helper_SPEC_VAR_CONST(sub_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_ASSIGN_MUL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_binary_assign_op_helper_SPEC_VAR_CONST(mul_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_ASSIGN_DIV_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_binary_assign_op_helper_SPEC_VAR_CONST(div_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_ASSIGN_MOD_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_binary_assign_op_helper_SPEC_VAR_CONST(mod_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_ASSIGN_SL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_binary_assign_op_helper_SPEC_VAR_CONST(shift_left_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_ASSIGN_SR_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_binary_assign_op_helper_SPEC_VAR_CONST(shift_right_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_ASSIGN_CONCAT_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_binary_assign_op_helper_SPEC_VAR_CONST(concat_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_ASSIGN_BW_OR_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_binary_assign_op_helper_SPEC_VAR_CONST(bitwise_or_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_ASSIGN_BW_AND_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_binary_assign_op_helper_SPEC_VAR_CONST(bitwise_and_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_binary_assign_op_helper_SPEC_VAR_CONST(bitwise_xor_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CONST(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zval *object; zval *property = &opline->op2.u.constant; zval **retval = &EX_T(opline->result.u.var).var.ptr; int have_get_ptr = 0; if (IS_VAR == IS_VAR && !object_ptr) { zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets"); } make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */ object = *object_ptr; if (Z_TYPE_P(object) != IS_OBJECT) { zend_error(E_WARNING, "Attempt to increment/decrement property of non-object"); if (!RETURN_VALUE_UNUSED(&opline->result)) { *retval = EG(uninitialized_zval_ptr); PZVAL_LOCK(*retval); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } /* here we are sure we are dealing with an object */ if (0) { MAKE_REAL_ZVAL_PTR(property); } if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) { zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC); if (zptr != NULL) { /* NULL means no success in getting PTR */ SEPARATE_ZVAL_IF_NOT_REF(zptr); have_get_ptr = 1; incdec_op(*zptr); if (!RETURN_VALUE_UNUSED(&opline->result)) { *retval = *zptr; PZVAL_LOCK(*retval); } } } if (!have_get_ptr) { if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) { zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC); if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) { zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC); if (Z_REFCOUNT_P(z) == 0) { GC_REMOVE_ZVAL_FROM_BUFFER(z); zval_dtor(z); FREE_ZVAL(z); } z = value; } Z_ADDREF_P(z); SEPARATE_ZVAL_IF_NOT_REF(&z); incdec_op(z); *retval = z; Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC); SELECTIVE_PZVAL_LOCK(*retval, &opline->result); zval_ptr_dtor(&z); } else { zend_error(E_WARNING, "Attempt to increment/decrement property of non-object"); if (!RETURN_VALUE_UNUSED(&opline->result)) { *retval = EG(uninitialized_zval_ptr); PZVAL_LOCK(*retval); } } } if (0) { zval_ptr_dtor(&property); } else { } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_PRE_INC_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_pre_incdec_property_helper_SPEC_VAR_CONST(increment_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_pre_incdec_property_helper_SPEC_VAR_CONST(decrement_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CONST(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zval *object; zval *property = &opline->op2.u.constant; zval *retval = &EX_T(opline->result.u.var).tmp_var; int have_get_ptr = 0; if (IS_VAR == IS_VAR && !object_ptr) { zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets"); } make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */ object = *object_ptr; if (Z_TYPE_P(object) != IS_OBJECT) { zend_error(E_WARNING, "Attempt to increment/decrement property of non-object"); *retval = *EG(uninitialized_zval_ptr); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } /* here we are sure we are dealing with an object */ if (0) { MAKE_REAL_ZVAL_PTR(property); } if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) { zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC); if (zptr != NULL) { /* NULL means no success in getting PTR */ have_get_ptr = 1; SEPARATE_ZVAL_IF_NOT_REF(zptr); *retval = **zptr; zendi_zval_copy_ctor(*retval); incdec_op(*zptr); } } if (!have_get_ptr) { if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) { zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC); zval *z_copy; if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) { zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC); if (Z_REFCOUNT_P(z) == 0) { GC_REMOVE_ZVAL_FROM_BUFFER(z); zval_dtor(z); FREE_ZVAL(z); } z = value; } *retval = *z; zendi_zval_copy_ctor(*retval); ALLOC_ZVAL(z_copy); *z_copy = *z; zendi_zval_copy_ctor(*z_copy); INIT_PZVAL(z_copy); incdec_op(z_copy); Z_ADDREF_P(z); Z_OBJ_HT_P(object)->write_property(object, property, z_copy TSRMLS_CC); zval_ptr_dtor(&z_copy); zval_ptr_dtor(&z); } else { zend_error(E_WARNING, "Attempt to increment/decrement property of non-object"); *retval = *EG(uninitialized_zval_ptr); } } if (0) { zval_ptr_dtor(&property); } else { } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_POST_INC_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_post_incdec_property_helper_SPEC_VAR_CONST(increment_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_post_incdec_property_helper_SPEC_VAR_CONST(decrement_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *dim = &opline->op2.u.constant; zval **container; if (opline->extended_value == ZEND_FETCH_ADD_LOCK && IS_VAR != IS_CV && EX_T(opline->op1.u.var).var.ptr_ptr) { PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr); } container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR == IS_VAR && !container) { zend_error_noreturn(E_ERROR, "Cannot use string offset as an array"); } zend_fetch_dimension_address_read(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_R TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *dim = &opline->op2.u.constant; zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR == IS_VAR && !container) { zend_error_noreturn(E_ERROR, "Cannot use string offset as an array"); } zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_W TSRMLS_CC); if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) { AI_USE_PTR(EX_T(opline->result.u.var).var); if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) && Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) { SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr); } } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; /* We are going to assign the result by reference */ if (opline->extended_value && EX_T(opline->result.u.var).var.ptr_ptr) { Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr); SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr); Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *dim = &opline->op2.u.constant; zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR == IS_VAR && !container) { zend_error_noreturn(E_ERROR, "Cannot use string offset as an array"); } zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC); if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) { AI_USE_PTR(EX_T(opline->result.u.var).var); if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) && Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) { SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr); } } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *dim = &opline->op2.u.constant; zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR == IS_VAR && !container) { zend_error_noreturn(E_ERROR, "Cannot use string offset as an array"); } zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_IS TSRMLS_CC); if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *dim = &opline->op2.u.constant; zval **container; if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) { container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR == IS_VAR && !container) { zend_error_noreturn(E_ERROR, "Cannot use string offset as an array"); } zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_W TSRMLS_CC); if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) { AI_USE_PTR(EX_T(opline->result.u.var).var); if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) && Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) { SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr); } } } else { if (IS_CONST == IS_UNUSED) { zend_error_noreturn(E_ERROR, "Cannot use [] for reading"); } container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR == IS_VAR && !container) { zend_error_noreturn(E_ERROR, "Cannot use string offset as an array"); } zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_R TSRMLS_CC); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zval *dim = &opline->op2.u.constant; /* Not needed in DIM_UNSET if (opline->extended_value == ZEND_FETCH_ADD_LOCK) { PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr); } */ if (IS_VAR == IS_CV) { if (container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } } if (IS_VAR == IS_VAR && !container) { zend_error_noreturn(E_ERROR, "Cannot use string offset as an array"); } zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_UNSET TSRMLS_CC); if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) { AI_USE_PTR(EX_T(opline->result.u.var).var); if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) && Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) { SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr); } } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) { zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); } else { zend_free_op free_res; PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res); if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr); } PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr); FREE_OP_VAR_PTR(free_res); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_CONST(int type, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *container = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zval *offset = &opline->op2.u.constant; if (Z_TYPE_P(container) != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) { if (type != BP_VAR_IS) { zend_error(E_NOTICE, "Trying to get property of non-object"); } if (!RETURN_VALUE_UNUSED(&opline->result)) { AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr)); PZVAL_LOCK(EG(uninitialized_zval_ptr)); } } else { zval *retval; if (0) { MAKE_REAL_ZVAL_PTR(offset); } /* here we are sure we are dealing with an object */ retval = Z_OBJ_HT_P(container)->read_property(container, offset, type TSRMLS_CC); if (RETURN_VALUE_UNUSED(&opline->result)) { if (Z_REFCOUNT_P(retval) == 0) { GC_REMOVE_ZVAL_FROM_BUFFER(retval); zval_dtor(retval); FREE_ZVAL(retval); } } else { AI_SET_PTR(EX_T(opline->result.u.var).var, retval); PZVAL_LOCK(retval); } if (0) { zval_ptr_dtor(&offset); } else { } } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_property_address_read_helper_SPEC_VAR_CONST(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *property = &opline->op2.u.constant; zval **container; if (IS_VAR == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) { PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr); EX_T(opline->op1.u.var).var.ptr = *EX_T(opline->op1.u.var).var.ptr_ptr; } if (0) { MAKE_REAL_ZVAL_PTR(property); } container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR == IS_VAR && !container) { zend_error_noreturn(E_ERROR, "Cannot use string offset as an object"); } zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC); if (0) { zval_ptr_dtor(&property); } else { } if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) { AI_USE_PTR(EX_T(opline->result.u.var).var); if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) && Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) { SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr); } } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; /* We are going to assign the result by reference */ if (opline->extended_value & ZEND_FETCH_MAKE_REF) { Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr); SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr); Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr); } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *property = &opline->op2.u.constant; zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (0) { MAKE_REAL_ZVAL_PTR(property); } if (IS_VAR == IS_VAR && !container) { zend_error_noreturn(E_ERROR, "Cannot use string offset as an object"); } zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_RW TSRMLS_CC); if (0) { zval_ptr_dtor(&property); } else { } if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) { AI_USE_PTR(EX_T(opline->result.u.var).var); if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) && Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) { SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr); } } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_property_address_read_helper_SPEC_VAR_CONST(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) { /* Behave like FETCH_OBJ_W */ zend_free_op free_op1; zval *property = &opline->op2.u.constant; zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (0) { MAKE_REAL_ZVAL_PTR(property); } if (IS_VAR == IS_VAR && !container) { zend_error_noreturn(E_ERROR, "Cannot use string offset as an object"); } zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC); if (0) { zval_ptr_dtor(&property); } else { } if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) { AI_USE_PTR(EX_T(opline->result.u.var).var); if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) && Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) { SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr); } } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } else { return zend_fetch_property_address_read_helper_SPEC_VAR_CONST(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); } } static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_res; zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zval *property = &opline->op2.u.constant; if (IS_VAR == IS_CV) { if (container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } } if (0) { MAKE_REAL_ZVAL_PTR(property); } if (IS_VAR == IS_VAR && !container) { zend_error_noreturn(E_ERROR, "Cannot use string offset as an object"); } zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_UNSET TSRMLS_CC); if (0) { zval_ptr_dtor(&property); } else { } if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) { AI_USE_PTR(EX_T(opline->result.u.var).var); if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) && Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) { SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr); } } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res); if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr); } PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr); FREE_OP_VAR_PTR(free_res); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; zend_free_op free_op1; zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zval *property_name = &opline->op2.u.constant; if (0) { MAKE_REAL_ZVAL_PTR(property_name); } if (IS_VAR == IS_VAR && !object_ptr) { zend_error_noreturn(E_ERROR, "Cannot use string offset as an array"); } zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC); if (0) { zval_ptr_dtor(&property_name); } else { } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; /* assign_obj has two opcodes! */ ZEND_VM_INC_OPCODE(); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_op *op_data = opline+1; zend_free_op free_op1; zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR == IS_VAR && !object_ptr) { zend_error_noreturn(E_ERROR, "Cannot use string offset as an array"); } if (Z_TYPE_PP(object_ptr) == IS_OBJECT) { zval *property_name = &opline->op2.u.constant; if (0) { MAKE_REAL_ZVAL_PTR(property_name); } zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_DIM TSRMLS_CC); if (0) { zval_ptr_dtor(&property_name); } else { } } else { zend_free_op free_op_data1, free_op_data2; zval *value; zval *dim = &opline->op2.u.constant; zval **variable_ptr_ptr; zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), object_ptr, dim, 0, BP_VAR_W TSRMLS_CC); value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R); variable_ptr_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC); if (!variable_ptr_ptr) { if (zend_assign_to_string_offset(&EX_T(op_data->op2.u.var), value, op_data->op1.op_type TSRMLS_CC)) { if (!RETURN_VALUE_UNUSED(&opline->result)) { EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr; ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr); INIT_PZVAL(EX_T(opline->result.u.var).var.ptr); ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(op_data->op2.u.var).str_offset.str)+EX_T(op_data->op2.u.var).str_offset.offset, 1, 1); } } else if (!RETURN_VALUE_UNUSED(&opline->result)) { AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr)); PZVAL_LOCK(EG(uninitialized_zval_ptr)); } } else { value = zend_assign_to_variable(variable_ptr_ptr, value, IS_TMP_FREE(free_op_data1) TSRMLS_CC); if (!RETURN_VALUE_UNUSED(&opline->result)) { AI_SET_PTR(EX_T(opline->result.u.var).var, value); PZVAL_LOCK(value); } } FREE_OP_VAR_PTR(free_op_data2); FREE_OP_IF_VAR(free_op_data1); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; /* assign_dim has two opcodes! */ ZEND_VM_INC_OPCODE(); ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *value = &opline->op2.u.constant; zval **variable_ptr_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (IS_VAR == IS_VAR && !variable_ptr_ptr) { if (zend_assign_to_string_offset(&EX_T(opline->op1.u.var), value, IS_CONST TSRMLS_CC)) { if (!RETURN_VALUE_UNUSED(&opline->result)) { EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr; ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr); INIT_PZVAL(EX_T(opline->result.u.var).var.ptr); ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(opline->op1.u.var).str_offset.str)+EX_T(opline->op1.u.var).str_offset.offset, 1, 1); } } else if (!RETURN_VALUE_UNUSED(&opline->result)) { AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr)); PZVAL_LOCK(EG(uninitialized_zval_ptr)); } } else { value = zend_assign_to_variable(variable_ptr_ptr, value, 0 TSRMLS_CC); if (!RETURN_VALUE_UNUSED(&opline->result)) { AI_SET_PTR(EX_T(opline->result.u.var).var, value); PZVAL_LOCK(value); } } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; /* zend_assign_to_variable() always takes care of op2, never free it! */ ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *function_name; char *function_name_strval; int function_name_strlen; zend_free_op free_op1; zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope)); function_name = &opline->op2.u.constant; if (Z_TYPE_P(function_name)!=IS_STRING) { zend_error_noreturn(E_ERROR, "Method name must be a string"); } function_name_strval = Z_STRVAL_P(function_name); function_name_strlen = Z_STRLEN_P(function_name); EX(object) = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) { if (Z_OBJ_HT_P(EX(object))->get_method == NULL) { zend_error_noreturn(E_ERROR, "Object does not support method calls"); } /* First, locate the function. */ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC); if (!EX(fbc)) { zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval); } EX(called_scope) = Z_OBJCE_P(EX(object)); } else { zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); } if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) { EX(object) = NULL; } else { if (!PZVAL_IS_REF(EX(object))) { Z_ADDREF_P(EX(object)); /* For $this pointer */ } else { zval *this_ptr; ALLOC_ZVAL(this_ptr); INIT_PZVAL_COPY(this_ptr, EX(object)); zval_copy_ctor(this_ptr); EX(object) = this_ptr; } } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval *function_name; zend_class_entry *ce; zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope)); if (IS_VAR == IS_CONST) { /* no function found. try a static method in class */ ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC); if (!ce) { zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant)); } EX(called_scope) = ce; } else { ce = EX_T(opline->op1.u.var).class_entry; if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) { EX(called_scope) = EG(called_scope); } else { EX(called_scope) = ce; } } if(IS_CONST != IS_UNUSED) { char *function_name_strval = NULL; int function_name_strlen = 0; if (IS_CONST == IS_CONST) { function_name_strval = Z_STRVAL(opline->op2.u.constant); function_name_strlen = Z_STRLEN(opline->op2.u.constant); } else { function_name = &opline->op2.u.constant; if (Z_TYPE_P(function_name) != IS_STRING) { zend_error_noreturn(E_ERROR, "Function name must be a string"); } else { function_name_strval = Z_STRVAL_P(function_name); function_name_strlen = Z_STRLEN_P(function_name); } } if (function_name_strval) { if (ce->get_static_method) { EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); } else { EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC); } if (!EX(fbc)) { zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval); } } if (IS_CONST != IS_CONST) { } } else { if(!ce->constructor) { zend_error_noreturn(E_ERROR, "Cannot call constructor"); } if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) { zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name); } EX(fbc) = ce->constructor; } if (EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) { EX(object) = NULL; } else { if (EG(This) && Z_OBJ_HT_P(EG(This))->get_class_entry && !instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) { /* We are calling method of the other (incompatible) class, but passing $this. This is done for compatibility with php-4. */ int severity; char *verb; if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) { severity = E_STRICT; verb = "should not"; } else { /* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */ severity = E_ERROR; verb = "cannot"; } zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb); } if ((EX(object) = EG(This))) { Z_ADDREF_P(EX(object)); EX(called_scope) = Z_OBJCE_P(EX(object)); } } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_CASE_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); int switch_expr_is_overloaded=0; zend_free_op free_op1; if (IS_VAR==IS_VAR) { if (EX_T(opline->op1.u.var).var.ptr_ptr) { PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr); } else { switch_expr_is_overloaded = 1; Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str); } } is_equal_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); if (switch_expr_is_overloaded) { /* We only free op1 if this is a string offset, * Since if it is a TMP_VAR, it'll be reused by * other CASE opcodes (whereas string offsets * are allocated at each get_zval_ptr()) */ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; EX_T(opline->op1.u.var).var.ptr_ptr = NULL; EX_T(opline->op1.u.var).var.ptr = NULL; } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); if (IS_VAR == IS_UNUSED) { /* namespaced constant */ if (!zend_get_constant_ex(Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant), &EX_T(opline->result.u.var).tmp_var, NULL, opline->extended_value TSRMLS_CC)) { if ((opline->extended_value & IS_CONSTANT_UNQUALIFIED) != 0) { char *actual = (char *)zend_memrchr(Z_STRVAL(opline->op2.u.constant), '\\', Z_STRLEN(opline->op2.u.constant)); if(!actual) { actual = Z_STRVAL(opline->op2.u.constant); } else { actual++; } /* non-qualified constant - allow text substitution */ zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'", actual, actual); ZVAL_STRINGL(&EX_T(opline->result.u.var).tmp_var, actual, Z_STRLEN(opline->op2.u.constant)-(actual - Z_STRVAL(opline->op2.u.constant)), 1); } else { zend_error_noreturn(E_ERROR, "Undefined constant '%s'", Z_STRVAL(opline->op2.u.constant), Z_STRVAL(opline->op2.u.constant)); } } ZEND_VM_NEXT_OPCODE(); } else { /* class constant */ zend_class_entry *ce; zval **value; if (IS_VAR == IS_CONST) { ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC); if (!ce) { zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL(opline->op2.u.constant)); } } else { ce = EX_T(opline->op1.u.var).class_entry; } if (zend_hash_find(&ce->constants_table, Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant)+1, (void **) &value) == SUCCESS) { if (Z_TYPE_PP(value) == IS_CONSTANT_ARRAY || (Z_TYPE_PP(value) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT) { zend_class_entry *old_scope = EG(scope); EG(scope) = ce; zval_update_constant(value, (void *) 1 TSRMLS_CC); EG(scope) = old_scope; } EX_T(opline->result.u.var).tmp_var = **value; zval_copy_ctor(&EX_T(opline->result.u.var).tmp_var); } else { zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL(opline->op2.u.constant)); } ZEND_VM_NEXT_OPCODE(); } } static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr; zval *offset=&opline->op2.u.constant; #if 0 || IS_VAR == IS_VAR || IS_VAR == IS_CV zval **expr_ptr_ptr = NULL; if (opline->extended_value) { expr_ptr_ptr=_get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); expr_ptr = *expr_ptr_ptr; } else { expr_ptr=_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); } #else expr_ptr=_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); #endif if (0) { /* temporary variable */ zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; } else { #if 0 || IS_VAR == IS_VAR || IS_VAR == IS_CV if (opline->extended_value) { SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr); expr_ptr = *expr_ptr_ptr; Z_ADDREF_P(expr_ptr); } else #endif if (IS_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) { zval *new_expr; ALLOC_ZVAL(new_expr); INIT_PZVAL_COPY(new_expr, expr_ptr); expr_ptr = new_expr; zendi_zval_copy_ctor(*expr_ptr); } else { Z_ADDREF_P(expr_ptr); } } if (offset) { switch (Z_TYPE_P(offset)) { case IS_DOUBLE: zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL); break; case IS_LONG: case IS_BOOL: zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL); break; case IS_STRING: zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL); break; case IS_NULL: zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL); break; default: zend_error(E_WARNING, "Illegal offset type"); zval_ptr_dtor(&expr_ptr); /* do nothing */ break; } } else { zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL); } if (opline->extended_value) { if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; } else { if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; } ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); array_init(&EX_T(opline->result.u.var).tmp_var); if (IS_VAR == IS_UNUSED) { ZEND_VM_NEXT_OPCODE(); #if 0 || IS_VAR != IS_UNUSED } else { return ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); #endif } } static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zval *offset = &opline->op2.u.constant; if (IS_VAR != IS_VAR || container) { if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } switch (Z_TYPE_PP(container)) { case IS_ARRAY: { HashTable *ht = Z_ARRVAL_PP(container); switch (Z_TYPE_P(offset)) { case IS_DOUBLE: zend_hash_index_del(ht, zend_dval_to_lval(Z_DVAL_P(offset))); break; case IS_RESOURCE: case IS_BOOL: case IS_LONG: zend_hash_index_del(ht, Z_LVAL_P(offset)); break; case IS_STRING: if (IS_CONST == IS_CV || IS_CONST == IS_VAR) { Z_ADDREF_P(offset); } if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS && ht == &EG(symbol_table)) { zend_execute_data *ex; ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1); for (ex = execute_data; ex; ex = ex->prev_execute_data) { if (ex->op_array && ex->symbol_table == ht) { int i; for (i = 0; i < ex->op_array->last_var; i++) { if (ex->op_array->vars[i].hash_value == hash_value && ex->op_array->vars[i].name_len == offset->value.str.len && !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) { ex->CVs[i] = NULL; break; } } } } } if (IS_CONST == IS_CV || IS_CONST == IS_VAR) { zval_ptr_dtor(&offset); } break; case IS_NULL: zend_hash_del(ht, "", sizeof("")); break; default: zend_error(E_WARNING, "Illegal offset type in unset"); break; } break; } case IS_OBJECT: if (!Z_OBJ_HT_P(*container)->unset_dimension) { zend_error_noreturn(E_ERROR, "Cannot use object as array"); } if (0) { MAKE_REAL_ZVAL_PTR(offset); } Z_OBJ_HT_P(*container)->unset_dimension(*container, offset TSRMLS_CC); if (0) { zval_ptr_dtor(&offset); } else { } break; case IS_STRING: zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); ZEND_VM_CONTINUE(); /* bailed out before */ default: break; } } else { } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zval *offset = &opline->op2.u.constant; if (IS_VAR != IS_VAR || container) { if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) { SEPARATE_ZVAL_IF_NOT_REF(container); } if (Z_TYPE_PP(container) == IS_OBJECT) { if (0) { MAKE_REAL_ZVAL_PTR(offset); } if (Z_OBJ_HT_P(*container)->unset_property) { Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); } else { zend_error(E_NOTICE, "Trying to unset property of non-object"); } if (0) { zval_ptr_dtor(&offset); } else { } } else { } } else { } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_CONST(int prop_dim, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zval **value = NULL; int result = 0; if (IS_VAR != IS_VAR || container) { zval *offset = &opline->op2.u.constant; if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) { HashTable *ht; int isset = 0; ht = Z_ARRVAL_PP(container); switch (Z_TYPE_P(offset)) { case IS_DOUBLE: if (zend_hash_index_find(ht, zend_dval_to_lval(Z_DVAL_P(offset)), (void **) &value) == SUCCESS) { isset = 1; } break; case IS_RESOURCE: case IS_BOOL: case IS_LONG: if (zend_hash_index_find(ht, Z_LVAL_P(offset), (void **) &value) == SUCCESS) { isset = 1; } break; case IS_STRING: if (zend_symtable_find(ht, offset->value.str.val, offset->value.str.len+1, (void **) &value) == SUCCESS) { isset = 1; } break; case IS_NULL: if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) { isset = 1; } break; default: zend_error(E_WARNING, "Illegal offset type in isset or empty"); break; } switch (opline->extended_value) { case ZEND_ISSET: if (isset && Z_TYPE_PP(value) == IS_NULL) { result = 0; } else { result = isset; } break; case ZEND_ISEMPTY: if