Commit Graph

382 Commits

Author SHA1 Message Date
Thies C. Arntzen
7ed2d363c8 - debug_backtrace:
added "type" ('->' or '::') for object calls.
	made calls done thru call_user_func show-up correct in backtraces.

andi,
does this look correct to you?
2002-08-23 13:50:42 +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
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
Stig Bakken
eebae9f9ef * folding fixes 2002-07-05 02:34:54 +00:00
Andi Gutmans
28247f572a - Centralize global class fetch 2002-06-26 14:24:23 +00:00
Andi Gutmans
b4a76acfa4 - Don't show debug_backtrace() in the trace itself.
- This patch is a bit ugly because the whole code itself is pretty complex
- and hard to re-order.
2002-06-11 18:37:41 +00:00
Harald Radi
3738a6edd0 only check for an available class entry instead of
the std_object_handlers on some places

#some linuxtag work
2002-06-09 14:20:37 +00:00
Derick Rethans
4f77354ce0 - MFZE1 2002-05-13 08:41:55 +00:00
Andi Gutmans
dc0bc97969 - Nuke C++ comment 2002-05-10 09:43:00 +00:00
Andi Gutmans
b6219a0dbc - Make debug_backtrace() return an array. Still not finished because I
might want to differentiate between method calls and static methods.

Example:
$bt = debug_backtrace();
foreach ($bt as $frame) {
	if (isset($frame['class'])) {
		print $frame['class'];
		print "::";
	}
	print $frame['function'];
	print "   [";
	print $frame['file'];
	print ":";
	print $frame['line'];
	print "]\n";
}
2002-05-10 09:41:50 +00:00
Andi Gutmans
14a81f91e3 - Hopefully fix problems with debug_backtrace() 2002-05-08 18:43:19 +00:00
Derick Rethans
b43ba8dfe2 - MFZE1 2002-05-08 14:10:30 +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
7e5ec2d761 Initial support for built-in backtracing.
There are still a few problems such as includes and calling other functions
from internal functions which aren't seen (will have to think if and how to
fix this).
Also the main scripts filename isn't available. Need to think about that.
2002-05-02 17:20:48 +00:00
Stanislav Malyshev
7a067547cd Make OBJCE return zend_class_entry*, also some cleanups 2002-04-30 09:56:48 +00:00
Harald Radi
51e797f1e3 some type cleanup work 2002-04-23 18:06:54 +00:00
Harald Radi
6ac6cb1040 added get_class_entry callback handler to the
object handlers structure
2002-04-22 14:22:27 +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
Derick Rethans
1f9464e345 - MFZE1 2002-03-02 13:48:13 +00:00
Derick Rethans
0c6be86747 - MFZE1 2002-03-02 13:26:37 +00:00
Stanislav Malyshev
6608f07322 Mega-commit: Enter the new object model
Note: only standard Zend objects are working now. This is definitely going to
break custom objects like COM, Java, etc. - this will be fixed later.
Also, this may break other things that access objects' internals directly.
2002-02-07 14:08:43 +00:00
Sebastian Bergmann
cb2124be7c Revert per Andi's request. Sorry :-( 2002-02-02 19:55:21 +00:00
Sebastian Bergmann
fd884e2bea Fix warning. Again :-) 2002-02-02 19:47:24 +00:00
Andi Gutmans
2c95fc2d55 - Please don't use strcmp() and friends in Zend but only the mem*
- functions. I didn't check this patch so please check that it works.
2002-02-02 19:35:18 +00:00
Sebastian Bergmann
86469a0dfb Fix a warning. 2002-02-02 19:18:25 +00:00
Sebastian Bergmann
031784c687 MFZE1: is_a() 2002-02-01 22:55:02 +00:00
Sebastian Bergmann
62dc854bb0 Happy New Year. 2002-01-06 15:21:36 +00:00
Sebastian Bergmann
d863d52a5d Update headers. 2001-12-11 15:16:21 +00:00
Andi Gutmans
5476706142 - Damn Zeev :) 2001-12-04 17:58:32 +00:00
Zeev Suraski
4f6c95d17a Whitespace 2001-08-11 15:56:40 +00:00
Zeev Suraski
3aa5674a84 TSRMLS fixes 2001-08-02 05:25:29 +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
b52554951f More TSRMLS_FETCH work, and get rid of redundant ParametersPassedByRef 2001-07-30 05:34:21 +00:00
Zeev Suraski
8ce8324e59 More TSRMLS_FETCH annihilation 2001-07-30 04:54:16 +00:00
Zeev Suraski
b57703825b Avoid TSRMLS_FETCH()'s (still lots of work left) 2001-07-30 01:48:22 +00:00
Andi Gutmans
896eec1ec5 - Use the Z_OBJ* macros for accessing objects 2001-07-28 18:35:22 +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
Andi Gutmans
b70eeddc70 - Fix crash bug (fix by Jani). 2001-06-26 15:19:47 +00:00
Andrei Zmievski
9f0a619553 Fix segfault -- need to copy-construct constant value. 2001-05-23 13:54:22 +00:00
Andrei Zmievski
4d78270b4e Moving some functions into Zend. 2001-05-21 15:47:52 +00:00
Andi Gutmans
1b94b89cb8 - Add mistakenly removen closing bracket 2001-04-30 13:05:11 +00:00
Andi Gutmans
ec1068d695 - Get rid of warning 2001-04-30 13:04:27 +00:00
Andi Gutmans
acd56b0891 - More whitespace fixes while I'm at it. 2001-04-27 18:53:25 +00:00
Andi Gutmans
0971ff99cb - Whitespace changes to be standard like the rest of Zend 2001-04-27 18:51:56 +00:00
Andrei Zmievski
3e2ff3409a Updated get_class_methods() to take class instance as well as class name. 2001-03-26 20:14:21 +00:00
Andrei Zmievski
54da9024f5 Making it possible to pass a class name to get_parent_class() as well
as a class instance.
2001-03-26 19:03:06 +00:00
Andrei Zmievski
2b2484dd3d Fixing function name length. 2001-03-23 14:46:37 +00:00
Andi Gutmans
d2c9e8074c - Update copyright year 2001-02-26 05:43:27 +00:00
Andi Gutmans
0bed994531 - Add exports from Daniel Beulshausen 2001-02-24 21:16:58 +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
Sascha Schumann
acdae3a149 Hardcode strlen due to problems on SCO OpenServer 5.0.4 which defines
strlen to __std_hdr_strlen.
2000-12-07 19:28:13 +00:00
Stanislav Malyshev
b531e43c49 Fix memory leak - get_current_key mallocs it's result, no need to
copy it.
2000-12-07 09:39:16 +00:00
Andrei Zmievski
81814c8ddc Update class constants before trying to get default properties. 2000-11-27 17:00:54 +00:00
Andrei Zmievski
9ca1038535 Sterling's patch to make get_defined_vars() simpler and better. 2000-11-21 15:29:02 +00:00
Andi Gutmans
610edbc7de - Fix copy&paste bug 2000-10-17 18:25:10 +00:00
Andi Gutmans
154052ff15 - Add another patch from Sterling. 2000-10-14 19:48:53 +00:00
Andi Gutmans
5c6593b505 - Preliminary commit of Sterlings get_defined_functions()/get_defined_vars
functions
2000-10-14 15:52:24 +00:00
Andi Gutmans
ab8c6ed967 - Cleanup error output 2000-09-30 16:24:53 +00:00
Stanislav Malyshev
5918218872 Made get_included_files() work again, in somewhat different way 2000-09-18 13:43:20 +00:00
Zeev Suraski
5286b3971c Make compile_string() accept a description of the code 2000-09-12 19:47:25 +00:00
Andrei Zmievski
0fd8685c64 Fix memory overrun. 2000-09-05 14:58:14 +00:00
Stanislav Malyshev
951eb9079c Fix crash with trigger_error having no args (#6549) 2000-09-05 12:08:41 +00:00
Andi Gutmans
1192fe545f - Don't define this function in non-debug mode 2000-08-26 14:45:29 +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
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
Stanislav Malyshev
1373a16280 Add strncasecmp function
@ Added strncasecmp function (Andi)
2000-07-26 11:32:15 +00:00
Zeev Suraski
58e1dd2ee8 Forgot to link this function... 2000-07-18 20:32:39 +00:00
Zeev Suraski
55d313db99 Improve register_resource_ex() infrastructure 2000-07-14 20:00:24 +00:00
Zeev Suraski
fde2e61d54 error_reporting fix 2000-06-30 11:45:32 +00:00
Zeev Suraski
34c2b0a07c - Add restore_error_handler()
error_handler's are now stored in a stack
2000-06-17 18:04:58 +00:00
Zeev Suraski
6b8059afe9 Make Egon happy :) 2000-06-12 22:03:53 +00:00
Zeev Suraski
e962769fee Return the previous error handler from set_error_handler() 2000-06-12 20:31:02 +00:00
Zeev Suraski
fce92e3ca2 Avoid using E_CORE_* errorlevels in any place which is not in the global startup sequence 2000-06-12 20:22:17 +00:00
Zeev Suraski
a29791411b Fix bug #4768 2000-06-10 01:08:55 +00:00
Andrei Zmievski
b51aa1f36f Made an alias for hash apply with arguments. 2000-06-09 20:18:16 +00:00
Zeev Suraski
fddf89aff7 Fixed bug #4819 2000-06-09 15:40:37 +00:00
Andi Gutmans
f8983e467f - Complete change to create_function() 2000-06-05 06:52:02 +00:00
Zeev Suraski
b7a8baf1bb Rename lambda() 2000-06-04 21:30:56 +00:00
Zeev Suraski
e374f6fd31 Fix a lambda() bug 2000-06-03 02:02:09 +00:00
Zeev Suraski
70345bd222 Add missing { 2000-06-03 01:50:15 +00:00
Zeev Suraski
0b7a9cea88 - Fix Win32 compilation (Use winsock2.h from now on)
- Add lambda() support
2000-06-03 01:49:49 +00:00
Zeev Suraski
746f01802d Update error code 2000-06-02 12:36:54 +00:00
Andrei Zmievski
164e4e50b9 Added a way to get all declared classes. 2000-05-01 16:22:00 +00:00
Zeev Suraski
67f6974373 Initial support for trapping errors (not complete and disabled; will be enabled only
post-PHP 4.0.0)
2000-04-19 15:08:06 +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
a65971221f The checks for func_num_args() and friends were broken - fixed 2000-03-28 17:34:21 +00:00
Andi Gutmans
7fd92b524d - Stop zend_func_args() and co. from crashing 2000-03-26 18:40:24 +00:00
Zeev Suraski
5dba477467 - Some header dependencies cleanup
- Generalize zval_print() and zval_print_r()
2000-03-25 19:10:07 +00:00
Andi Gutmans
6db18997bb - Nuke hash_*_ptr functions 2000-03-24 11:12:30 +00:00
Andrei Zmievski
0eaa79e4eb Use WRONG_PARAM_COUNT. 2000-03-23 18:40:55 +00:00
Zeev Suraski
7bd5794a07 - Make it compile 2000-03-23 18:31:18 +00:00
Andrei Zmievski
40e99c5e9f Added get_class_methods(). 2000-03-23 17:47:28 +00:00
Zeev Suraski
caf9049ae1 The third argument to define() wasn't working right, fixed 2000-03-18 14:45:29 +00:00
Zeev Suraski
05cf4423b9 - 2000-03-12 18:08:46 +00:00
Andi Gutmans
5951b166c8 - Quick way of supporting include_once().
Good enough for RC1.
2000-03-10 16:36:30 +00:00
Zeev Suraski
5e55e47f7f It's official now... 2000-03-06 05:26:39 +00:00
Egon Schmid
68ab1d3d07 Fixed some protos. 2000-02-27 18:41:19 +00:00
Sam Ruby
f1d0753f71 compilation error - Win32 2000-02-26 21:12:44 +00:00
Andrei Zmievski
685fd42965 Added get_class_vars() and get_object_vars() functions. 2000-02-26 17:54:00 +00:00
Zeev Suraski
0ac9536d99 (c) patch 2000-02-19 22:46:42 +00:00
Zeev Suraski
2a4d65f3b8 ZEND_TEST_EXCEPTIONS should be defined/undefined before it's checked 2000-02-16 13:55:22 +00:00
Andi Gutmans
95c7788747 - Fix bug in func_get_arg()
- Get rid of compiler warnings for unused function crash()
2000-02-14 19:08:51 +00:00
Zeev Suraski
81662eb8f4 *** empty log message *** 2000-02-13 01:22:11 +00:00
Andrei Zmievski
c2fd6752cf Patches from Walter for strncmp() stuff. 2000-02-08 17:19:43 +00:00
Zeev Suraski
f207b3623e Pass the executor globals to internal functions 2000-02-05 15:40:05 +00:00
Zeev Suraski
fafbf6d8da - Implement declare() with declarables framework
- Implement ticks - Germany&Norway - 5 points!
2000-01-24 19:00:30 +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
Zeev Suraski
235386b245 Change ALLOC_ZVAL() semantics 1999-12-26 21:21:33 +00:00
Andi Gutmans
62b2087a84 - Create two new macro's. ALLOC_ZVAL() and FREE_ZVAL(z) and make Zend use
them.
1999-12-24 15:22:11 +00:00
Sascha Schumann
473632bf0d Kill compiler warning 1999-12-22 22:43:55 +00:00
Zeev Suraski
1fe57c9505 - Fix function_exists() 1999-12-22 18:49:23 +00:00
Zeev Suraski
cd7d5546ae - Introduce ZEND_NUM_ARGS(), to replace ARG_COUNT(ht)
- Rename getParameters() and friends for consistency and namespace cleanliness
1999-12-18 22:23:23 +00:00
Andrei Zmievski
8a879b8fc5 Doh! I'm an idiot. 1999-12-15 22:37:05 +00:00
Andrei Zmievski
c9c6446aa1 - s/inheritence/inheritance/g
- Added is_subclass_of() function
1999-12-15 21:26:43 +00:00
Andrei Zmievski
22344ea595 val->len 1999-12-15 16:54:46 +00:00
Andrei Zmievski
46b14f85c3 Faster, must go faster. 1999-12-15 15:59:04 +00:00
Andrei Zmievski
3fdf0dbedc - Added class_exists()
- Moved function_exists() here from from the basic_functions.c
- Modified method_exists() to convert method name to lowercase
  when checking
1999-12-14 21:15:24 +00:00
Zeev Suraski
efc84af940 - Implement get_used_files() and get_imported_files() 1999-12-04 14:26:26 +00:00
Thies C. Arntzen
ca1d1f832a use getParametersEx for all builtin functions 1999-10-04 13:27:12 +00:00
Andi Gutmans
86357a9c27 - Move is_ref back to being an unsigned char and not a bit field. 1999-10-01 23:31:39 +00:00
Andi Gutmans
4dd47ffbc1 - Remove locking support completely 1999-10-01 23:26:00 +00:00
Thies C. Arntzen
49c891f2cf preliminary fix for each until andi & zeev clean up! 1999-09-22 09:57:42 +00:00
Zeev Suraski
a30f028a12 Add get_func_args() 1999-09-21 07:31:24 +00:00
Zeev Suraski
9f1d0dec47 *** empty log message *** 1999-09-21 00:46:22 +00:00
Andi Gutmans
68217ef564 - Move some more Zend internal functions from PHP 1999-09-20 21:28:37 +00:00
Andi Gutmans
7831d30265 - Newline for Sun's compiler 1999-09-20 17:01:38 +00:00
Andi Gutmans
06a18f169b - Add some internal functions to Zend 1999-09-20 16:56:09 +00:00
Zeev Suraski
7a4a5944f9 Added zend_num_args() and zend_get_arg() 1999-09-20 13:00:35 +00:00
Zeev Suraski
13d840bc3f Add a file in which we can put Zend builtin functions 1999-09-20 12:24:39 +00:00