Stanislav Malyshev
b4fcdaedee
fix non-ZTS build
2003-06-04 09:09:47 +00:00
Sebastian Bergmann
f26c5f9ce4
Fix segfault. Again.
2003-06-04 08:52:43 +00:00
Stanislav Malyshev
039c174337
rm namespace leftovers
2003-06-04 08:16:55 +00:00
Sebastian Bergmann
d74d05f431
Fix segfault. #Hopefully not a Voodoo Fix[TM].
2003-06-04 07:46:22 +00:00
Sebastian Bergmann
1fe874fbb8
Leftover.
2003-06-02 15:42:34 +00:00
Stanislav Malyshev
f7f5a5ea6b
MEGA-patch: namespaces are R.I.P.
2003-06-02 12:13:11 +00:00
Marcus Boerger
9e4286112e
Fix init shutdown
2003-05-31 19:21:52 +00:00
Sterling Hughes
ae2bfb7880
Assume lazy consensus regarding the cast_object() patch. *Only* implemented
...
from a internals perspective. This callback has been very useful for both
ext/mono and ext/simplexml
2003-05-27 18:52:25 +00:00
Marcus Boerger
e6d0c8c237
Fix bug #23162 user_error() crashs if > 1024 bytes (Marcus, Moriyoshi)
2003-05-04 18:21:32 +00:00
Stanislav Malyshev
ad01495a48
Change get_class() so that it returns qualified names for namespaced
...
classes.
*HEADS UP*: get_class_name() handler interface is changed, now it should
allocate the space it returns with emalloc, and the users free it. If
anyone has problems with it or has suggestions how to do it without this -
please tell.
Also: make function_exists() understand namespaces.
2003-04-21 17:01:34 +00:00
Sebastian Bergmann
a17d2f37ea
Corrected patch by Marcus Börger <helly@php.net>.
2003-04-19 09:04:15 +00:00
Sterling Hughes
48b3303217
Patch by Marcus Börger to fix some memleaks
2003-04-18 18:40:53 +00:00
Sebastian Bergmann
5be2fe410e
Patch by Marcus Börger <helly@php.net>.
2003-04-17 14:33:38 +00:00
Andrei Zmievski
91eff553e3
Initialize all relevant zend_class_entry fields to avoid accidental
...
crashes.
2003-04-03 14:44:41 +00:00
Stanislav Malyshev
26c51b73f1
Use strncpy instead of sprintf
2003-03-31 07:34:05 +00:00
Stanislav Malyshev
f008808c82
Try to report class name of the exception
2003-03-30 13:19:00 +00:00
Sterling Hughes
05dfd313fb
remove unused variable
2003-03-29 05:19:27 +00:00
Sebastian Bergmann
3fc852824f
Eliminate TSRMLS_FETCH() calls in destroy_op_array() and zend_get_class_entry().
2003-03-26 07:44:11 +00:00
Andi Gutmans
eba65486ad
- Fix win32 build
2003-03-23 21:27:22 +00:00
Stanislav Malyshev
5f47d77b42
resore namespace on shutdown - since some functions use
...
EG() and CG() pointers
2003-03-23 18:13:49 +00:00
Sterling Hughes
e6dfbc9565
add a standard Exception class.
2003-03-23 04:32:24 +00:00
Zeev Suraski
f7b7800479
Add infrastructure for JIT initialization of auto globals
2003-03-02 10:04:53 +00:00
Wez Furlong
e52aac940f
Implement simple stream support in the ZE scanners.
2003-02-18 09:37:54 +00:00
Zeev Suraski
372e08772d
Fix initialization
2003-02-16 18:17:19 +00:00
Sebastian Bergmann
6d300baf84
ZTS fixes
2003-02-16 11:34:49 +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
Zeev Suraski
c17c7a2bfa
Centralize class initialization
2003-02-10 16:11:24 +00:00
Zeev Suraski
17439aa9c4
Rework static class properties - now supports access restrictions
2003-02-05 13:35:52 +00:00
Zeev Suraski
471947b188
Reimplement PPP properties
2003-02-04 12:12:34 +00:00
foobar
333406bdc2
- Added some missing CVS $Id$ tags, headers and footers.
2003-02-01 01:49:15 +00:00
Stanislav Malyshev
f30f3590a1
ws
2003-01-14 12:13:51 +00:00
Stanislav Malyshev
d48ffd97d6
RIP handle_* functions. ZE2 will use __ handlers instead.
...
# Yes, I know this will break some things. I will fix those I can find shortly.
2003-01-12 17:16:07 +00:00
Sebastian Bergmann
24db7f182a
ZTS fixes.
2003-01-12 14:25:58 +00:00
Stanislav Malyshev
9bba373a17
Use generic handlers instead of Z_OBJ
2003-01-12 13:45:50 +00:00
Zeev Suraski
424e98f4e2
Implemented compatibility mode
...
To enable - zend2.implicit_clone = on in php.ini or using ini_set()
2003-01-12 12:39:06 +00:00
Derick Rethans
2c44fab3a0
- Ported the zend_execute_internal hook to ZendEngine2.
2003-01-11 16:12:44 +00:00
Zeev Suraski
b817dab206
Fix leak
2003-01-09 09:22:44 +00:00
Sebastian Bergmann
2c5d4b8c23
Bump year.
2002-12-31 15:59:15 +00:00
Zeev Suraski
e062dffe6c
- Implement public/protected/private methods.
...
- Prevent instantiation of classes with abstract methods.
Based in part on Marcus's patch.
2002-12-06 17:09:44 +00:00
Andi Gutmans
27de54b0df
- MFZE1
2002-12-01 19:47:02 +00:00
Andi Gutmans
f222884e2d
- Revert as the patch doesn't compile
2002-12-01 19:22:30 +00:00
Andi Gutmans
b6ecd6704c
- MFZE1
2002-12-01 19:07:07 +00:00
Andi Gutmans
671fff2fde
h WHitespace
2002-11-30 11:20:25 +00:00
Andi Gutmans
2de45bec65
- Initialize constants_updated (by Marcus)
2002-11-29 16:35:46 +00:00
Andi Gutmans
5cb8fabb7d
- Fix crash
2002-11-24 20:15:56 +00:00
Zeev Suraski
4be862b02c
MFZE1 - error_reporting fix
2002-11-19 17:51:30 +00:00
Stig Bakken
b899f9bf63
Fixed some special cases that were crashing for the exception default
...
handler.
2002-11-05 06:10:05 +00:00
Derick Rethans
e6054d2857
- MFZE1
2002-11-02 09:05:18 +00:00
Andi Gutmans
cf36abb2eb
- Change opcode dispatch mechanism to use a function per opcode and use
...
- a lookup table using the opcode # to call the correct function.
- Still have lots of tuning to do.
2002-10-18 21:19:27 +00:00
Ilia Alshanetsky
e842ef9f4b
MFZE1 (floats & locale issue)
2002-10-12 21:15:35 +00:00
Andi Gutmans
7cba0254e7
- Allow access to private/protected variables of $clone inside the __clone()
...
- method
2002-10-07 21:20:23 +00:00
Zeev Suraski
bd115087e3
MFZE1 - connection_status() fix
2002-09-19 15:58:01 +00:00
Zeev Suraski
8a003f8021
Fix non ZTS build
2002-09-19 15:15:39 +00:00
Zeev Suraski
c29f5d6e9d
Fix that obscure crash in Debug_TS mode
2002-09-19 15:12:20 +00:00
Zeev Suraski
5fcae67e9d
Fix the thread-safe initialization of the ZE2. This should solve some
...
sporadic crashes, as well as the problem with the built-in constants.
2002-09-18 22:16:22 +00:00
Zeev Suraski
71126a21bc
ZE2 fix
2002-09-17 12:44:10 +00:00
Zeev Suraski
711be83d49
MFZE1 - threading fix
2002-09-17 12:42:11 +00:00
Ilia Alshanetsky
1074fca0ae
Make zend return a proper exit error code when it encounters a parse error.
2002-09-15 23:34:03 +00:00
Zeev Suraski
e801a99a50
MFZE1
2002-09-03 10:25:06 +00:00
Thies C. Arntzen
bdc35c9f2e
clear current_execute_data on bailout as it would point into some freed area
...
on the stack.
2002-08-28 14:43:32 +00:00
Derick Rethans
a9d819818b
- MFZE1
2002-08-28 09:49:40 +00:00
Stig Bakken
5a41ced0d7
* append emacs footer
2002-08-16 10:12:17 +00:00
Stig Bakken
bd7105f731
* remove builtin exception class
2002-08-16 10:11:32 +00:00
Andi Gutmans
38eea2e817
- Fix whitespace
2002-08-16 07:11:37 +00:00
Stig Bakken
04788f9503
@- Added set_exception_handler() function for registering a global,
...
@ catch-all exception handling function (Stig)
- Added set_exception_handler() function for registering a global,
catch-all exception handling function (Stig)
2002-08-16 00:41:37 +00:00
Zeev Suraski
0bb780b384
MFZE1
2002-08-15 00:25:27 +00:00
Andi Gutmans
41e3f4f0c3
- Fix problem with debug_backtrace() reported by Stig. We weren't reporting
...
- global function information because it wasn't available. We have to do
- an additional assignment per-function call so that it'll be available.
- Also don't define the global scope as function name _main_ but leave it
- empty so that frameworks like Pear can decide what they want to do.
2002-07-26 10:38:25 +00:00
Andi Gutmans
bc5ea87e28
- Commit patch to support protected member variables (by Timm Friebe w/
...
- some fixes by me).
- You can't access protected variables from outside the object. If you want
- to see a protected member from your ancestors you need to declare the
- member as protected in the class you want to use it in. You can't
- redeclare a protected variable as private nor the other way around.
2002-07-15 18:09:56 +00:00
Derick Rethans
d4acdd349f
- MFZE1
2002-06-18 17:36:33 +00:00
Andi Gutmans
b66c89c47a
- More debug backtrace work. It still doesn't work very well...
2002-05-07 18:42:13 +00:00
Andi Gutmans
fb6976e46d
- Another couple of indirection fixes.
...
- Make class_entry->refcount be part of the structure and not allocated.
2002-03-12 19:22:29 +00:00
Stanislav Malyshev
92dd5e611b
- make class tables contain class_entry *, not class_entry
...
- fix isset($this)
2002-03-12 10:08:47 +00:00
Andi Gutmans
7df1601239
- MFZE1
2002-02-26 19:17:26 +00:00
Andi Gutmans
00e90f2ff3
- Experimental support for private members.
...
<?
class MyClass {
private $Hello = "Hello, World!\n";
function printHello()
{
print $this->Hello;
}
}
class MyClass2 extends MyClass {
function printHello()
{
MyClass::printHello(); /* Should print */
print $this->Hello; /* Shouldn't print out anything */
}
}
$obj = new MyClass();
print $obj->Hello; /* Shouldn't print out anything */
$obj->printHello(); /* Should print */
$obj = new MyClass2();
print $obj->Hello; /* Shouldn't print out anything */
$obj->printHello();
?>
2002-02-21 11:50:44 +00:00
Andi Gutmans
b9355b9a11
- Output error when there's an uncaught exception (by Timm Friebe)
2002-01-06 20:30:41 +00:00
Sebastian Bergmann
62dc854bb0
Happy New Year.
2002-01-06 15:21:36 +00:00
Andi Gutmans
73b159e056
- Experimental support for destructors. We need to see if destructors
...
- will actually work well in the context of PHP so we should consider this
- as experimental. Possible problems might be that when the constructor is
- run PHP might not be in a stable state.
2001-12-27 14:35:09 +00:00
Andi Gutmans
b04acdadf4
- Print out object id for easier debugging
2001-12-26 20:06:06 +00:00
Andi Gutmans
29ea3da2f8
- Pretty much finish _clone() support
2001-12-26 19:54:20 +00:00
Andi Gutmans
76b9acc165
- Fix crash correctly.
2001-12-26 11:18:00 +00:00
Andi Gutmans
ee44180fc6
- Fix a crash (not a thorough fix).
...
- Commented old code
2001-12-25 16:51:37 +00:00
Andi Gutmans
3458373ed6
- Fix a bug where function's didn't work anymore in multi-threaded
...
- servers after the latest startup changes.
2001-12-23 18:39:52 +00:00
Andi Gutmans
f4b832d277
- Fix crash bug in startup code.
...
- Start work on being able to reference global and local scope
2001-12-13 16:55:04 +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
Andi Gutmans
4214a056a1
- Merge from ZE1
2001-12-11 18:51:02 +00:00
Andi Gutmans
4cb97fa3b9
- Rename zend_class_entry.constants -> zend_class_entry.constants_table
2001-12-11 18:46:43 +00:00
Sebastian Bergmann
d863d52a5d
Update headers.
2001-12-11 15:16:21 +00:00
Andi Gutmans
8460372395
- Fix crash with unhandled exceptions
2001-12-08 20:58:20 +00:00
Andi Gutmans
fe94f59427
- Nuke the namespace work I did. It'll be redone differently.
2001-12-06 17:23:08 +00:00
Andi Gutmans
e858d27888
- Initial support for class constants. There are still a few semantic
...
- issues which need to be looked into but basically it seems to work.
- Example:
<?php
class foo
{
const hey = "hello";
}
print foo::hey;
?>
2001-11-30 16:29:47 +00:00
Andi Gutmans
0d559f17cd
- Fix crash and leak
2001-11-25 12:29:08 +00:00
Andi Gutmans
d2da63f629
- Support static members. The following script works:
...
<?
class foo
{
class bar
{
function init_values()
{
for ($i=1; $i<10; $i++) {
foo::bar::$hello[$i] = $i*$i;
}
}
function print_values()
{
for ($i=1; $i<10; $i++) {
print foo::bar::$hello[$i] . "\n";
}
}
}
}
foo::bar::init_values();
foo::bar::print_values();
for ($i=1; $i<10; $i++) {
print $hello[$i]?"Shouldn't be printed\n":"";
}
?>
2001-11-25 08:49:09 +00:00
Andi Gutmans
2eccd95ca4
- Add some initializations
2001-11-03 12:19:52 +00:00
Andi Gutmans
2eabb14dc7
- Merge the NAMESPACES_BRANCH. It wasn't a good idea to have a branch when
...
- the whole CVS tree is work in progress
2001-09-30 17:29:55 +00:00
Zeev Suraski
17352812a3
MFZE1
2001-09-22 00:09:24 +00:00
Zeev Suraski
483fc4c73a
MFZE1
2001-09-19 22:34:11 +00:00
Zeev Suraski
b06440bceb
MFZE1 (support return value in execute_scripts)
2001-09-10 00:07:32 +00:00
Zeev Suraski
819ea51d00
MFZE1
2001-08-31 13:11:52 +00:00
Zeev Suraski
4757104e45
MFZE1
2001-08-21 12:29:12 +00:00
Zeev Suraski
4f6c95d17a
Whitespace
2001-08-11 15:56:40 +00:00
Andi Gutmans
80b870e5d3
- Merge from Engine 1 tree
2001-08-09 03:58:58 +00:00
Andi Gutmans
9d11db1200
- Merge new $_GET, $_POST etc. patch from Engine 1 tree
2001-08-08 17:18:16 +00:00
Andi Gutmans
2f6cd308f9
- Merge zend_try fix from Engine 1
2001-08-08 15:06:08 +00:00
Zeev Suraski
609d58a4d6
Merge from branch - move to standard C scanners in thread safe mode
2001-08-06 13:48:51 +00:00
Zeev Suraski
fcc035108f
TSRMLS_FETCH work
2001-08-05 01:37:10 +00:00
Zeev Suraski
66d9314b60
Implement fast memory allocation and reduced fragmentation under Windows.
2001-08-03 07:06:05 +00:00
Zeev Suraski
7deb44e36d
Some cleanup
2001-08-02 06:16:20 +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
Andi Gutmans
c259cb7c1a
- Object macros...
2001-07-29 08:22:57 +00:00
Zeev Suraski
b4f3b9d3ce
Redesigned thread safety mechanism - nua nua
2001-07-28 10:51:54 +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
Zeev Suraski
ef4fe54f0a
Always track bailout file/lineno
2001-07-21 16:21:22 +00:00
Zeev Suraski
5f2da6f219
Fix Release builds
2001-07-21 16:13:46 +00:00
Zeev Suraski
931ebe08d7
Improve bailout mechanism, supports nesting of bailouts a-la try..catch
2001-07-21 14:25:27 +00:00
Zeev Suraski
8084d27885
Implement a more granular shutdown mechanism for the executor -
...
prevent corruption of constants and missing destructions of resources
2001-07-20 14:20:34 +00:00
Zeev Suraski
85b4df53c0
Improved interactive mode - it is now available in all builds, without any significant slowdown
2001-07-15 14:08:58 +00:00
Zeev Suraski
ab30c8cca3
Early initialization
2001-07-15 12:24:10 +00:00
Zeev Suraski
b23d83cf6a
Avoid crashing if the error reporting function is called after a bailout during shutdown
2001-06-13 17:18:11 +00:00
Zeev Suraski
51303fc051
Fix corruption issue
2001-05-17 09:58:34 +00:00
Zeev Suraski
0eadc7e423
Make zend_execute_scripts() reentrant
2001-05-07 11:08:18 +00:00
Zeev Suraski
bda9c83a82
Recover from a parse error in include files (before, it could result in a crash under certain circumstances). Fix bug #8663
2001-05-06 19:30:31 +00:00
Andi Gutmans
7080fa5b53
- Rename modules.h to zend_modules.h
2001-02-26 18:18:34 +00:00
Andi Gutmans
d2c9e8074c
- Update copyright year
2001-02-26 05:43:27 +00:00
Zeev Suraski
0e08845eb0
Add free_estring()
2001-01-15 10:52:06 +00:00
Zeev Suraski
903018ef36
- Remove backward dependency from PHP -> Zend
...
- Rename get_ini_entry() as get_configuration_directive() for clarity
(it doesn't use the INI subsystem, but the module-supplied function for
retrieving configuration directives)
2001-01-07 18:39:11 +00:00
Zeev Suraski
1f23e50789
Fix possibility of a crash during startup (very unlikely, but possible)
2001-01-07 02:47:32 +00:00
Zeev Suraski
54d53055c2
Make the INI mechanism thread safe (or at least thread safer :)
2000-12-27 15:43:15 +00:00
Sascha Schumann
c334058412
Set the floating-point exception mask on FreeBSD to 0 (as do other
...
FreeBSD system applications). Also bump up the module API number
as the zend_hash_get_current_key change affects source and binary
compatibility.
2000-12-22 21:11:34 +00:00
Zeev Suraski
36eaad252f
Allow get_current_key() not to return the key itself, instead of a duplicate
2000-12-22 12:49:51 +00:00
Stanislav Malyshev
63873aba37
Use HashPosition iterator instead of saving/restoring internal pointer
2000-12-18 15:06:03 +00:00
Stanislav Malyshev
9a135a2b29
Preserve internal pointer over print_r ( fix #8289 )
2000-12-18 13:56:30 +00:00
Zeev Suraski
6053f2a118
Fix bug #7599
2000-11-02 23:17:55 +00:00
Zeev Suraski
309827ec1d
Fix previous update - move extension startup further down the startup sequence
2000-09-25 18:10:45 +00:00
Zeev Suraski
59d3eb5f24
Move extension startup further down the startup sequence
2000-09-25 17:02:05 +00:00
Zeev Suraski
5286b3971c
Make compile_string() accept a description of the code
2000-09-12 19:47:25 +00:00
Zeev Suraski
4acff8f37f
Don't use unsafe sprintf()
2000-09-09 15:06:38 +00:00
Stanislav Malyshev
d10336ec0e
Don't trust snprintf return
2000-09-08 13:19:51 +00:00
Andi Gutmans
27de50012b
- Use emalloc() for opened_path now. This was a potential leak before.
...
- This patch has potential to break stuff but I tested it as much as I
- could. Fixes should be easy.
2000-08-31 22:24:20 +00:00
Andi Gutmans
1b282b3521
- Remove support for __string_value() in print $obj
2000-08-31 19:50:19 +00:00
Zeev Suraski
99af3ed8ef
Safer shutdown process
2000-08-31 16:01:31 +00:00
Zeev Suraski
7795aca4ca
Fix warning issue (compile errors inside require()'d files were incorrectly supressed)
2000-08-15 16:44:40 +00:00
Stanislav Malyshev
5090b1e8d5
Fix zend_fiel_handle handling. Should fix URL include
...
and various opened_path inconsistencies.
2000-08-13 18:00:50 +00:00
Zeev Suraski
c06692e9ec
The patch we promised - redesigned the compilation/execution API:
...
Advantages:
- Smaller memory footprint for the op arrays
- Slightly faster compilation times (due to saved erealloc() calls and faster zend_op
initialization)
- include_once() & require_once() share the same file list
- Consistency between include() and require() - this mostly means that return()
works inside require()'d files just as it does in include() files (it used to
be meaningless in require()'d files, most of the time (see below))
- Made require() consistent with itself. Before, if the argument was not a constant
string, require() took the include() behavior (with return()).
- Removed lots of duplicate code.
Bottom line - require() and include() are very similar now; require() is simply an include()
which isn't allowed to fail. Due to the erealloc() calls for large op arrays, require()
didn't end up being any faster than include() in the Zend engine.
2000-08-09 19:22:35 +00:00
Thies C. Arntzen
7f4909d9f5
fix ZTS startup without filename (thanx purify!)
2000-07-12 16:37:46 +00:00
Thies C. Arntzen
372f71eb1a
unset active_symbol_table on zend-shutdown.
2000-07-12 12:00:17 +00:00
Zeev Suraski
1263932a0d
Disable the hash_apply() protection on hashes that persist across requests - it's unsafe
...
because we may be aborted at any point
2000-07-11 14:27:31 +00:00
Zeev Suraski
f34b9d41be
Add $context argument to error handler
2000-06-29 15:07:59 +00:00
Zeev Suraski
a31dc47ae4
Improve error handling code
2000-06-28 22:08:47 +00:00