Commit Graph

166 Commits

Author SHA1 Message Date
Andi Gutmans
f30b51f5b9 - Fix crash:
<?php
class ResourceFormat
{
     const IMG           = 1;
}

class Image
{
     const RESOURCE_FORMAT   = ResourceFormat::IMG;
}

print_r(constant('Image::RESOURCE_FORMAT'));
?>
2004-03-09 15:37:18 +00:00
foobar
ccfc46b0aa - Happy new year and PHP 5 for rest of the files too..
# Should the LICENSE and Zend/LICENSE dates be updated too?
2004-01-08 17:33:29 +00:00
Ilia Alshanetsky
7f9d1a1f6b Do not copy extra byte. 2003-12-12 00:16:58 +00:00
Andi Gutmans
d0d7badfb9 - Fix overallocation (thanks to Ilia) 2003-12-09 08:56:04 +00:00
Andi Gutmans
bc4d0082d6 - Fix newly introduced bug which stopped class constants from working.
- Thanks to Jan Lehnardt for reporting it.
2003-11-24 20:47:53 +00:00
Andi Gutmans
d344648b07 - Fix __autoload() to preserve class case.
- Heads up, this patch might break stuff so please let me know if you
- bump into any problems.
2003-11-24 18:13:29 +00:00
Andi Gutmans
c0df450203 - Add E_STRICT, to be used to warn purists (like Jani :) 2003-11-18 09:25:04 +00:00
Stanislav Malyshev
5724c7a66c fix leaks with class constants (bug #24699) 2003-07-27 12:03:54 +00:00
Andi Gutmans
288dacca0c - ZE coding style requires if ( instead of if( 2003-06-30 20:22:35 +00:00
Stanislav Malyshev
f57ac82bb0 support for self:: and parent:: constants 2003-06-16 10:16:50 +00:00
Sebastian Bergmann
2c7ebe557f Fix ZTS build. 2003-06-15 15:34:00 +00:00
Stanislav Malyshev
4a8c31d6c9 set ending \0 for string 2003-06-15 14:40:38 +00:00
Stanislav Malyshev
8cd9792375 Fix bug #23384 - static class::constant constants should now
work in static & array expressions.
2003-06-15 13:58:50 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Stanislav Malyshev
f7f5a5ea6b MEGA-patch: namespaces are R.I.P. 2003-06-02 12:13:11 +00:00
Marcus Boerger
53dae40d5a Do it correct always 2003-06-01 16:20:23 +00:00
Marcus Boerger
5457e34273 Fix constants (noticed by David Brown <dave@codewhore.org>) 2003-05-31 17:24:20 +00:00
Marcus Boerger
05a217707f c->name_len already contains the '\0' 2003-05-31 15:57:59 +00:00
Marcus Boerger
66b9125968 Make use optimized string lowering 2003-05-21 22:57:51 +00:00
Stanislav Malyshev
a4c3b2ce80 Namespace patch. Big changes:
1. Nested classes are gone.
2. New syntax for namespaces:
namespace foo {
	class X { ... }
	function bar { ... }
	var x = 1;
	const ZZ = 2;
}
3. Namespaced symbol access: $x = new foo::X; - etc.
For now, namespaces are case insensitive, just like classes.
Also, there can be no global class and namespace with the same name
(to avoid ambiguities in :: resolution).
2003-02-16 11:12:43 +00:00
foobar
333406bdc2 - Added some missing CVS $Id$ tags, headers and footers. 2003-02-01 01:49:15 +00:00
Sebastian Bergmann
2c5d4b8c23 Bump year. 2002-12-31 15:59:15 +00:00
Ilia Alshanetsky
d3617c51b8 MFZE1 zend_str_tolower issue. 2002-10-09 14:21:40 +00:00
Ilia Alshanetsky
ee7b8f906d MFZE1 2002-09-26 18:56:11 +00:00
Zeev Suraski
f2aa45d234 Remove dead code 2002-09-18 22:15:02 +00:00
Andi Gutmans
b53569c9e8 - Nuke persist_alloc(). 2002-06-22 13:52:07 +00:00
Andi Gutmans
70de1bd5bb - Fix problem where you couldn't define constants with different cases but
- the same name.
2002-06-19 04:13:12 +00:00
Sebastian Bergmann
62dc854bb0 Happy New Year. 2002-01-06 15:21:36 +00:00
Andi Gutmans
ce98c73f82 - Infrastructure changes for allowing to access the global scope from
- within a class scope.
- Fix the Zend.dsp project a bit. It seems someone pretty much killed it
- when commiting their own personal configuration. Please be careful in
- future.
2001-12-12 20:45:38 +00:00
Sebastian Bergmann
d863d52a5d Update headers. 2001-12-11 15:16:21 +00:00
Andi Gutmans
bb9a36cad1 - Use alloca() when possible. 2001-12-01 08:33:48 +00:00
Zeev Suraski
aecd5b89ee MFZE1 2001-10-23 01:23:36 +00:00
Zeev Suraski
f72d907105 MFZE1 2001-08-14 15:24:20 +00:00
Zeev Suraski
ac0bee7ec9 MFZE1 2001-08-14 15:22:34 +00:00
Zeev Suraski
4f6c95d17a Whitespace 2001-08-11 15:56:40 +00:00
Zeev Suraski
c14baeece3 Avoid going over huge lists of functions, classes and constants.
Special thanks to the guys from the MS lab for the profiling tools :)
2001-08-02 07:00:43 +00:00
Zeev Suraski
d76cf1da18 More TSRMLS_FETCH work 2001-07-31 04:53:54 +00:00
Zeev Suraski
4187439cff More TSRMLS_FETCH work 2001-07-30 07:43:02 +00:00
Zeev Suraski
b57703825b Avoid TSRMLS_FETCH()'s (still lots of work left) 2001-07-30 01:48:22 +00:00
Zeev Suraski
2c254ba762 Get rid of ELS_*(), and use TSRMLS_*() instead.
This patch is *bound* to break some files, as I must have had typos somewhere.
If you use any uncommon extension, please try to build it...
2001-07-27 10:10:39 +00:00
Sascha Schumann
2c4e1e84ce Fix a memory leak which occured upon registering an already existing
constant.
2001-05-11 19:18:24 +00:00
Andi Gutmans
d2c9e8074c - Update copyright year 2001-02-26 05:43:27 +00:00
Stanislav Malyshev
2c95b113bd Make define return false and issue E_NOTICE when trying to redefine constant
@- Make define return false and issue E_NOTICE when trying to redefine constant (Stas)
2000-07-28 09:44:46 +00:00
Zeev Suraski
8e45536cf4 Make it possible to detect whether we're thread safe or not from PHP scripts and the php.ini
file
2000-06-26 18:15:33 +00:00
Zeev Suraski
a51d3058f7 - Renamed get_used_files() to get_required_files() for consistency
- Documented some functions
- Added user-level warning messages
- Added user_error()
2000-04-19 13:15:13 +00:00
Zeev Suraski
5e55e47f7f It's official now... 2000-03-06 05:26:39 +00:00
Zeev Suraski
0ac9536d99 (c) patch 2000-02-19 22:46:42 +00:00
Zeev Suraski
603aca0bb3 Fix a memory leak 2000-02-13 22:15:06 +00:00
Zeev Suraski
80bdd19e03 Fine tune Andi's patch 2000-02-11 15:59:30 +00:00
Andi Gutmans
bc5c9d8d7b - Finally beautify those WIN32|WINNT checks 2000-02-10 17:03:53 +00:00
Zeev Suraski
9f51f154aa - Stop passing list/plist to internal functions
- Add a typedef for the pCopyConstructor function pointer
- Minor hacks
2000-02-05 15:11:24 +00:00
Zeev Suraski
62114c1806 Destructors no longer return ints, the low level problem it was intended to solve is long gone now... 2000-01-17 17:33:37 +00:00
Andi Gutmans
bdefd5da15 - Change IS_UNSET -> IS_NULL 2000-01-04 13:22:58 +00:00
Zeev Suraski
f2d703e916 - Nuke undefined_variable_string
- Introduce IS_UNSET
1999-12-31 13:56:59 +00:00
Thies C. Arntzen
546af70783 new constant: SQL_NULL
new macros: RETURN_SQLNULL,RETVAL_SQLNULL,IS_SQLNULL
1999-12-28 12:05:48 +00:00
Zeev Suraski
71dddd7db7 - Made PHP_VERSION and PHP_OS work again
- More php3_ cleanup
@- Restored the PHP_VERSION and PHP_OS constants (Zeev)
1999-12-17 20:01:47 +00:00
Zeev Suraski
6313238c63 Fix for Thies's UMR 1999-08-20 17:02:11 +00:00
Andi Gutmans
28f9dc6e56 - Got rid of the C++ comments. 1999-08-10 15:43:32 +00:00
Zeev Suraski
5bae591f88 New constants 1999-07-22 22:17:49 +00:00
Zeev Suraski
8d1de13aef 0.91 update 1999-07-19 20:02:12 +00:00
Zeev Suraski
b5b1117760 License update 1999-07-16 14:58:16 +00:00
Andi Gutmans
fec59d3b4d - License update
- Fix multithreaded constants startup
1999-07-14 16:00:47 +00:00
Zeev Suraski
81d901b14d Step 1 in nuking the garbage collector:
- Change the hash destructor to return int
- Don't kill the bucket on hash_destroy if the destructor returns 0
1999-07-09 17:24:47 +00:00
Zeev Suraski
a9f9ae7920 Thread safety patch. It works now with 'just in time' resource initialization! 1999-04-21 17:26:37 +00:00
Zeev Suraski
7a87fcbbda Thread safety patch. We're still not quite there but it compiles again, and
more logic has been implemented.
1999-04-21 03:49:09 +00:00
Andi Gutmans
573b46022c Zend Library 1999-04-07 18:10:10 +00:00