Re: [PHP-DEV] [PATCH] Net_URL

2006-09-24 Thread Johannes Schlueter
Please send this to an PEAR list or report a bug at pear.php.net, internals is the wrong place for this. And as a related note: diff -u is way better readable and preferred. johannes Alexei wrote: Here is a patch for // $Id: URL.php,v 1.42 2005/10/29 11:17:56 dufuz Exp $ // // Net_URL Class

Re: [PHP-DEV] Why isn't base class constructors or destructors required to be called?

2006-09-14 Thread Johannes Schlueter
Hi Terje, you should look harder: http://www.php.net/~derick/meeting-notes.html#function-require-construct-to-force-calling-the-parent-s-constructor ;-) johannes Terje Slettebø wrote: Hi all. Another issue. :) As usual, I searched the archive first, but found only a few postings from 2004

Re: [PHP-DEV] Acceptable Seg Faults?

2006-09-12 Thread Johannes Schlueter
Yes, this is expected. Ralph Schindler wrote: The following script produces a seg fault: _start(); } public function _start() { $this->_myCall(); } public function _myCall() { $this->_start(); } } I assume this is b/c its recursively diving i

Re: [PHP-DEV] SAPI EMBED Problems

2006-09-11 Thread Johannes Schlueter
Not without code, backtrace, etc. johannes Brian Fertig wrote: I wrote an embedded application that can execute php scripts. When the script exits and I call the php_embed_shutdown() function it crashes. Can someone explain to me how I can keep this from happening? Brian -- PHP Interna

Re: [PHP-DEV] [PATCH] make Reflection options work on CLI/win32

2006-09-02 Thread Johannes Schlueter
Hi Steph, thanks for the patch, I've just committed it to the active branches. btw. Marcus rewrote most parts of the implementation. (credits to whom they belong *g*) johannes Steph Fox wrote: Folk with karma, hi - None of Johannes' CLI Reflection options work under doze in PHP 5.2.0 RC 3

Re: [PHP-DEV] Pass by reference (5.1.1 vs 5.1.2)

2006-07-24 Thread Johannes Schlueter
Hi, On Monday 24 July 2006 17:52, Rishad Omar wrote: > getArray($p = array()); Here you are relying on undefined behavior. It is not defined wether $p = array() or the function call getarray($p) should be executed first so the order might always change. You should always use the two lines

Re: [PHP-DEV] Re: strlen() under unicode.semantics

2006-06-23 Thread Johannes Schlueter
Hi, in my opinion that name is bad since most of the time the string won't be stored using the internal encoding but stored using some implicit converted encoding like the encoding of the stream being used or the one from the database. So the size needed to store the string would most likley be

Re: [PHP-DEV] Re: strlen() under unicode.semantics

2006-06-22 Thread Johannes Schlueter
Hi Andi, sizeof() is an alias of count() not strlen() ;-) johannes On Friday 23 June 2006 07:43, Andi Gutmans wrote: > Maybe sizeof() should not be an alias for strlen() when operating on > Unicode...? > > Andi > > > -Original Message- > > From: Andrei Zmievski [mailto:[EMAIL PROTECTED]

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-02 Thread Johannes Schlueter
Hi, please search the archives for "ifsetor". johannes On Wednesday 03 May 2006 07:56, D. Dante Lorenso wrote: > All, > > I'm sure this has been asked somewhere, but since I see requests for > features for 5.2 or 6.0, I'd like to add a "simple" item to the list > which would be quite useful to m

Re: [PHP-DEV] tsrm_ls

2006-04-13 Thread Johannes Schlueter
Hi, TSRM is the thread-safe resource manager. you can find it at the TSRM CVS module which should be at php-src/TSRM at your checkout. TSRM is a mechanism to hold thread safeglobal variables in an threaded environment. See articles about extension writing or the releavant books for more. A f

Re: [PHP-DEV] no newline after "?>" in the resulting HTML

2006-03-18 Thread Johannes Schlueter
Hi Rostislav, this is no support forum but a place for discussing the development of the PHP runtime. PLease see http://php.net/support.php to see where to ask this kind of questions. Thanks, johannes On Saturday 18 March 2006 09:43, Rostislav Krasny wrote: > Hi, > > I am a newbie to PHP. I've

Re: [PHP-DEV] phps line numbering

2006-03-15 Thread Johannes Schlueter
Hi Ilia et al., the patch is older than PHP 6 and back then there was nobody interested in committing it so it wasn't brought to HEAD, yet. But I'll do that if the patch itself is being accepted. johannes On Wednesday 15 March 2006 15:46, Ilia Alshanetsky wrote: > I'd consider it for PHP6, but

Re: [PHP-DEV] PHP Embedded

2006-03-14 Thread Johannes Schlueter
Hi Mark, On Tuesday 14 March 2006 20:48, Marco wrote: > Is there a way from within the embedded system to destroy all created > variables so that the environment is the same as when it was started or do > we need to shutdown the embedded engine and start it up again? PHP was designed as an langua

Re: [PHP-DEV] GOTO and/or BREAK LABEL

2006-03-07 Thread Johannes Schlueter
Hi, On Tuesday 07 March 2006 19:18, Steph Fox wrote: > Current raw totals amongst those who contribute to the PHP core: (1) +5.5, > (2) +9.5, (3) +0, (4) 2 > > Still to vote: Derick, Marcus, George, Sascha, Hartmut, Chregu, Johannes, > Sebastian, Stefan, apologies if I missed any names here. Alri

Re: [PHP-DEV] GOTO and/or BREAK LABEL

2006-03-07 Thread Johannes Schlueter
Hi, On Tuesday 07 March 2006 19:14, Robert Cummings wrote: > I don't remember, but I think Sarah Golemon allowed for it in one of her > patches way back: > > > $map = array > ( > 1 => 'bad', > 2 => 'good', > 3 => 'bad', > 4 => 'acceptable', > ); > > goto $map[$choice]; NOOO - If

Re: [PHP-DEV] Adieu a la magie (remove magic_quotes)

2006-03-07 Thread Johannes Schlueter
Hi Pierre, On Tuesday 07 March 2006 15:16, Pierre wrote: > Fair enough, as I said in my last post in the magic_quotes thread, it > is easy to keep this function. I will modify the patch to keep the > related functions (returning always false). Is is ok? I'd also mark them as deprecated using the

Re: [PHP-DEV] Re: Adieu register_globals

2006-03-06 Thread Johannes Schlueter
Hi, On Tuesday 07 March 2006 01:10, Andrew Yochum wrote: > On Tue, Mar 07, 2006 at 01:38:34AM +0200, Zeev Suraski wrote: > > A part of the decision was to supply the few lines of code necessary > > to emulate register_globals in userspace. Volunteers? :) > > FWIW, I've used this successfully when

[PHP-DEV] [patch] Separating ZEND_METHOD and ZEND_FUNCTION

2006-03-03 Thread Johannes Schlueter
Hi, following a recent discussion on IRC I'd like to propose a little patch separating ZEND_FUNCTION and ZEND_METHOD. Currently functions declared as ZEND_FUNCTION are named zif_exported_name. Class methods are exported as zif_class_method. If you try to create a PHP function called foo_bar bu

Re: [PHP-DEV] SplObjectStorage

2006-01-30 Thread Johannes Schlueter
Hi Jeff, On Monday 30 January 2006 19:11, Jeff Moore wrote: > > Why not just call it Betty. > > Why not? "Betty" is only slightly more vague than "Storage." A vague > name is nobody's friend. "SplObjectStorage" is some thing which stores objects, that can be read out of the name so it at least

Re: [PHP-DEV] Re: Named arguments revisited

2006-01-13 Thread Johannes Schlueter
Hi, On Friday 13 January 2006 21:41, Hartmut Holzgraefe wrote: > you missed that the parameter name information is just not available > for internal functions, the api works by parameter positions only > right now, so at some level you *have to* add this information for > all the 4,000+ extension

Re: [PHP-DEV]

2005-11-27 Thread Johannes Schlueter
Hi, On Sunday 27 November 2005 22:20, Daniel Convissor wrote: > First, PHP scripts are not XML files, so why are we concerned with what > the XML standard says? It isn't about the XML standard but about exceptions for the PHP parser and why should Second, PHP is frequently used to output XML fi

Re: [PHP-DEV] phar and e_strict

2005-10-01 Thread Johannes Schlueter
Hi, on a related note on the .phar stuff: I've just built PHP without zlib support and the PEAR install failed with | Installing PEAR environment: /opt/php-5.1-dev/lib/php/ | | Notice: Error: zlib extension is not enabled - gzinflate() function needed | for compressed .phars in /.../PHP_5

Re: [PHP-DEV] PHP 6.0 Wishlist

2005-08-28 Thread Johannes Schlueter
Hi, David, On Sunday 28 August 2005 10:18, David Kingma | jool.nl wrote: > If you replace the te following lines: > > "("php"|"\"php\""|"\'php\'"){WHITESPACE}*">" { HANDLE_NEWLINES(yytext, > yyleng); > if (CG(short_tags) || yyleng>2) { /* yyleng>2 means it's not

Re: [PHP-DEV] PHP 6.0 Wishlist

2005-08-27 Thread Johannes Schlueter
Hi Sara, On Sunday 28 August 2005 00:02, Sara Golemon wrote: > +" or any other processing instruction? Even so others than xml are rarely used it would imho be a great wtf factor if http://www.php.net/unsub.php

[PHP-DEV] [patch] extending internal functions with module information

2005-08-27 Thread Johannes Schlueter
Hi Andi et al., the attached patch adds the module registering an internal function to the zend_internal_function structure. This information can be (and is by this patch) used by the reflection API - currently it's quite hard to get the extension defining a function. I additionally used this i

Re: [PHP-DEV] PHP 6.0 Wishlist

2005-08-15 Thread Johannes Schlueter
Hi, On Sunday 14 August 2005 16:50, Zeev Suraski wrote: > >1. Remove register_globals completely > > > >2. Remove magic_quotes_* > > Given what I said above, I don't see any motivation to remove > register_globals or magic_quotes. I don't see how it buys us anything > other than pissed off users

Re: [PHP-DEV] Moving to PHP5.1 and Apache 2.2 next year, need help

2005-08-09 Thread Johannes Schlueter
Hi Ron, On Tuesday 09 August 2005 19:09, Ron Korving wrote: > Nonetheless, Rasmus, isn't it something to work on? Like Steve said, #1 and > #2 can be accomplished, and that would at least be a good start. You are > right about the libraries, but in time, even these may become thread safe > (of cou

Re: [PHP-DEV] type hinting throwing a fatal error

2005-08-08 Thread Johannes Schlueter
Hi Toby, On Monday 08 August 2005 15:04, Tobias Schlitt wrote: > > The throw an Exception when SPL disabled and an InvalidArgumentException > > when it is enabled. > > That's senseless when writing applications that shall be version > independant. Just sticking to Exception should be fine. No i

Re: [PHP-DEV] regression in HEAD since last week?

2005-07-22 Thread Johannes Schlueter
Hi Wez, I didn't look on any related code but I guess the reason might be related to the fix of #33710 (ArrayAccess objects doen't initialize $this) johannes P.S. sorry if this comes more than once - I failed to use my mailer :-) On Friday 22 July 2005 17:44, Wez Furlong wrote: > Just noticed

Re: [PHP-DEV] PHP standard depends on other extensions

2005-07-22 Thread Johannes Schlueter
Hi Piotr, On Friday 22 July 2005 15:15, Piotr Roszatycki wrote: > I'm trying to compile the latest PHP without compiled-in extensions so I > could loaded them later from php.ini. Unfortunately I've found that > standard depends on spl (spl_ce_Countable) and date. At least the second is > very smal

Re: [PHP-DEV] class_exists and __autoload

2005-06-28 Thread Johannes Schlueter
Hi James, On Tuesday 28 June 2005 23:32, James Crumpton wrote: > function __autoload($name) { > require_once($name); > } > I just don't understand the logic behind throwing a fatal error when I'm > writing code to try and prevent one from occurring. You should add error checking to your

Re: [PHP-DEV] httpOnly Cookies [tiny enhancement]

2005-06-26 Thread Johannes Schlueter
Hi Jochen, On Sunday 26 June 2005 22:09, Jochen Hansper wrote: > setcookie("test","101",mktime()+60*60,"/","localhost",1) > setcookie("test","101",array(mktime()+60*60,"/","localhost",1)) > setcookie("test","101",array("0:0:0:1:0:0","/","localhost",1)) > setcookie("test","101",array(":::1","/","lo

Re: [PHP-DEV] allow_url_fopen should be INI_ALL

2005-06-26 Thread Johannes Schlueter
Hi, On Sunday 26 June 2005 00:36, Yasuo Ohgaki wrote: > I would like to see these changes in PHP 5.1 and PHP 4.4, since this > is security related changes. Right, it's a security related thing: Only the administrator can decide wether any application should be able to do url_fopens or not. If an

Re: [PHP-DEV] forward compatibility "public" in 4.4

2005-06-16 Thread Johannes Schlueter
On Thursday 16 June 2005 11:27, Sebastian Mendel wrote: > > I guess, this will more likely produce an error message like this: > > > > Parse error: syntax error, unexpected T_PUBLIC, expecting T_STRING in > > public.php on line 2 right > > So I'm strongly against this change. If you want to run P

Re: [PHP-DEV] forward compatibility "public" in 4.4

2005-06-16 Thread Johannes Schlueter
Hi Sebastian, On Thursday 16 June 2005 11:16, Sebastian Mendel wrote: > > err no .. because that would break existing php 4 code in 4.4 > > what exactly? the new error-level? the message with this new > error-level? or the dummy-keyword? > > sorry but i didnt see this. That an error, which isn't

Re: [PHP-DEV] PHP 5.1

2005-06-05 Thread Johannes Schlueter
Hi, On Sunday 05 June 2005 19:18, Marcus Boerger wrote: > 2) PHP is all about the putting out text so nearly all objects created in > PHP are meant to put something onto the generated pages. Thus i think i am > not alone to suggest we put back the magic __toString function in place as > we said wh

[PHP-DEV] incrementing boolean values

2005-06-05 Thread Johannes Schlueter
Hi, PHP is a weak-typed language which casts in the background as required - at least most of the time. I recently found an exception which bugged me: $a = false; $a++; Here $a isn't casted to int or "incremented" to true but the incrementing has no effect. By checking zend_operators.c I s

[PHP-DEV] Re: new overloading feature?

2005-05-14 Thread Johannes Schlueter
Hi, Justin Hannus wrote: > My thoughts are: > > 1. Adding to many __methods is ugly. right > 2. Interesting subject though. Not to add to the flame but I've seen the > need for more advanced overloading features in allot of the code I've > been writing with PHP5. Consider the following example

Re: [PHP-DEV] protected/private function __construct() not allowed in 5.0.4?

2005-04-20 Thread Johannes Schlueter
Hi Greg, Greg Beaver wrote: > Try this code (which worked in 5.0.3) > > class a { public function __construct(){}} > class b extends a { protected function __construct(){}} > ?> This was changed since such a change of visibility makes no sense - if you extend a class it should still be compati

[PHP-DEV] Re: Missing ReflectionProperty::getDocComment()

2005-04-19 Thread Johannes Schlueter
Hi Sebastian, Sebastian Bergmann wrote: > I am missing a ReflectionProperty::getDocComment() method in the > Reflection API. At the moment only ReflectionClass, ReflectionFunction, > and ReflectionMethod have such a method. I've got a patch since quite some time but found nobody with karma who

[PHP-DEV] Re: Is it possible to override internal function?

2005-04-05 Thread Johannes Schlueter
Hi, the funxtions are stored in the EG(function_table) hash table. So you could delete or rename the mail function from there and add a new one. APD has an override_function() and a rename_function() which can be used to replace/rename a function by a user defined one. Maybe the code of these he

RE: [PHP-DEV] pdo: binding variables supplied to execute() is NotVeryUseful(tm)...

2005-03-25 Thread Johannes Schlueter
Jared Williams wrote: >> my point is that on internals@ we usually discuss developing >> php and not developing *with* php - >> > > Poor practices and insecure code should never go unchallenged anywhere, > unless its cleared marked as such. As Thies wrote: This list is for discussing the devel

[PHP-DEV] Re: SAPI Marco SG

2005-03-22 Thread Johannes Schlueter
Arjun Jain wrote: > Hi everyone, > > How do I use the macro to get the information regading the orignal file > name, temp file name, size etc of the file uploaded using > SG(rfc1867_uploaded_files)? I found out that this returns a HashTable *. > What to do next? How do I get the string names an

Re: [PHP-DEV] __autoload()

2005-03-16 Thread Johannes Schlueter
Hi Stig, Stig S. Bakken wrote: > [un]register_class_autoload_function() would be even more useful. See my previous post about Marcus' stuff: $ sapi/cli/php -r "print_r(get_extension_funcs('spl'));" Array ( [...] [3] => spl_autoload_register [4] => spl_autoload_unregister [...] ) people

[PHP-DEV] Re: __autoload()

2005-03-16 Thread Johannes Schlueter
Hi Lukas, Lukas Smith wrote: > Hi, > > would it be possible to allow people to override the fixed name of > __autoload() to a user defined function (static method?). I think this > would be much more flexible and would probably also make it easier to > exploit __autoload() inside class libraries

Re: [PHP-DEV] [patch] highlight_[file|string] and line numbers

2005-03-12 Thread Johannes Schlueter
Hi Jeffery, On Sunday 13 March 2005 00:47, Jeffery Fernandez wrote: > That looks very good but there seems to be serious html issues when I > validated that page... Total 1789 erros when I validated that page at > w3c. If you can fix that it would be awesome. Try to validate it as XHTML1.0 and, s

[PHP-DEV] [patch] highlight_[file|string] and line numbers

2005-03-12 Thread Johannes Schlueter
Hi, some days (or even weeks?) ago Lukas asked on IRC wether there is a way to get PHP code highlighted with linenumbers. The first reaction of most people (including me) was "no" since you can't copy&paste the code but after thinking I found out that works really fine. So I've implemented it

Re: [PHP-DEV] LOGO_GUID

2005-03-10 Thread Johannes Schlueter
Hi Dale, D . Walsh wrote: > Is there also a utility to generate the the logo in the required text > syntax or should I just create a quick hack to get the job done? as I wrote in a posting some weeks ago: PECL_Gen has Logo-Support. Even if you won't use PECL_Gen for your extension you could check

[PHP-DEV] Re: project_logo[]

2005-02-28 Thread Johannes Schlueter
Hi Dale, D . Walsh wrote: > I'm trying to add a logo and URL to the info of my project, > unfortunately, I can't seem to find all of the API info to make it > work. [...] > What additional code am I missing? You need to register your guid so PHP knows that the given parameter is an image ID. For

[PHP-DEV] Re: realpath() and destructors

2005-02-22 Thread Johannes Schlueter
Hi Stephan, this is by design and was discussed before, please check the archives. And should happen on Linux with mod_php, too. johannes Stephan Schmidt wrote: > Hi, > > I found another strange behaviour in PHP5, it occurred only on my > Windows machine using the Apache SAPI (tried it on Debi

Re: [PHP-DEV] function proposal - php_check_syntax_string

2005-02-18 Thread Johannes Schlueter
Hi, FrÃdÃric LECOINTRE wrote: > oups ... well. > > php_check_syntax works fine with zend_compile_file. so what's the No, it doesn't work fine, too :-) http://bugs.php.net/bug.php?id=27406 But I didn't know the problem either when reading your patch where I stumbled over the compile_string() call

Re: [PHP-DEV] function proposal - php_check_syntax_string

2005-02-18 Thread Johannes Schlueter
Hi Fred, this patch doesn't just check wether the string has the right syntax but also compiles it and registers it's functions and classes in the relevant tables. $ sapi/cli/php -r "php_check_syntax_string('class foo {}'); var_dump(class_exists('foo'));" bool(true) johannes Unknown Sender wro

Re: [PHP-DEV] Autoboxing in php 5.1

2005-02-12 Thread Johannes Schlueter
Hi Marcus, On Saturday 12 February 2005 18:58, Marcus Boerger wrote: > ups, reading again i see it, it was ReflectionProperty::getDocComment() > > Johannes had a patch for that already and i asked for it some months ago > but i don't remember if there was anything against it. no, the some-months-

[PHP-DEV] Re: How to unload a class

2005-02-10 Thread Johannes Schlueter
Hi, Carsten Harnisch wrote: > I would like to "unload" a class loaded previously by require_once. > Mainly I am working on a daemon where handler-classes should be loaded and > unloaded on demand. You could remove a class using classkit ... http://pecl.php.net/package/classkit johannes -- PHP

[PHP-DEV] [patch] ReflectionProperty::getLinenumber

2005-02-03 Thread Johannes Schlueter
Hi, here's a patch which is lying around on my disk for quite a while: It adds a ReflectionProperty::getLinenumber()-Method to find the Linenumber where a property was defined. I wrote it while working on a little code-browser thing. This method corresponds to the already existing Reflection[Cl

Re: [PHP-DEV] PHP 5.1

2005-02-03 Thread Johannes Schlueter
Hi, Not wanting to discuss the pros and cons of operator overloading in PHP a few notes about the implementation: Stanislav Malyshev wrote: > 2. The referenced patch raises doubts - why it allows to override / but > not %, for example? What with all other operators? Why add would work as I've wr

[PHP-DEV] Re: Get name of extending class with static method call (PHP5)

2005-01-12 Thread Johannes Schlueter
> With PHP4 it was possible to get the correct class name with > debug_backtrace(). This behaviour has been changed in PHP5. > How can I get the name of the extending class that invoked the method in > drive()? There was a short discussion on this on this list, too some month ago. The result was t

[PHP-DEV] Re: CONSTANT names...

2005-01-04 Thread Johannes Schlueter
Hi Jochem, you can get the valu of that constant with the constant() function and use such a constant with defined() so forbidding this would at least be a BC break. btw. the same goes for reserved words so define('echo', 42); is valid too but "echo echo;" doesn't work :-) johannes Jochem Maas

Re: [PHP-DEV] Re: PHP 4.3.9RC1 Released

2004-08-12 Thread Johannes Schlueter
Ilia Alshanetsky wrote: > On August 12, 2004 04:55 am, Ron Korving wrote: >> Do you know when fixes in PHP4.3.9 will find its way to PHP5? > > All of the patches applicable 5.X tree are applied at the same time as > they are to 4.3.X tree. An additional note: PHP 5.0.1, including the same fixes

Re: [PHP-DEV] Removing Try and Catch

2004-07-30 Thread Johannes Schlueter
Hi Marcus, Marcus Boerger wrote: > i thought of ignoring all of this thread but you didn't let me. > Exceptions are neccessary for constructor failure and there is no > other way to do it. So what about removing constructors, too? $object = new class; if (!$object->init()) die; (no, this wasn't

[PHP-DEV] [PATCH] Send errors to stderr instead of stdout

2004-07-17 Thread Johannes Schlueter
Hi, while developping some shell scripts with PHP-cli I've got annoyed that PHP sends its error messages to STDOUT instead of STDERR so I've written the attached patch. I see two possible problems with this patch where I'm not sure if one of the is really critical: - it uses the PHP STDERR c

[PHP-DEV] Re: GIF support for PHP4(/5)

2004-07-13 Thread Johannes Schlueter
Hi Toby, Tobias Schlitt wrote: > So, please do all those poor souls a big favor and reintegrate the GIF > creation support back into an actual PHP version (4.3.9 / 5.1.0??). check the archives. This was discuessed just some days ago and if I remeber right Gif will be in the next versions (4.3.9 a

Re: [PHP-DEV] what happened to that new isset() like language

2004-07-08 Thread Johannes Schlueter
Marc Richards wrote: > They won't. Not until they hear about it or read about it. But that is > true whether it is a function or and operator. Making it a function > won't make everyone magically cogniscent of it. Of course it will be > important to make it easy to search for information about

[PHP-DEV] Re: keyword arguments?

2004-06-23 Thread Johannes Schlueter
Hi Daniel, named paramters should only be followed by named paramters - like with default values. So one can first "fill" the unnamed once and then some (or all) of the named once. But remembering the last discussion on this idea I don't think this will be added... johannes Daniel Crookston wro

[PHP-DEV] Re: behaviour of static calls to regular methods

2004-06-21 Thread Johannes Schlueter
Hi, yes, afaik it's intentional. This was made for making parent::foo() work. Here's a shorter (at least a bit shorter *g*) example of this behavior: a(); // Calls bar::b() ?> Prints: object(foo)#1 (0) { } So in a static call $this holds the instance of the calling object. johannes Ard Biesh

[PHP-DEV] Re: Weird behaviour of private attribute + overloaded method

2004-06-15 Thread Johannes Schlueter
Hi, that's imho expected behaviour. To quote http://www.php.net/zend-engine-2.php | Protected member variables can be accessed in classes extending the class | they are declared in, whereas private member variables can only be | accessed by the class they belong to. And $id belongs to the base

Re: [PHP-DEV] PHP5: expected __METHOD__ behavior

2004-05-22 Thread Johannes Schlueter
7;] the name is available - but only if the function wasextended like in the example johannes Sara Golemon wrote: > debug_backtrace(); > > Not the prettiest solution, but a reliable one nonetheless. > > -Sara > > "Johannes Schlueter" <[EMAIL PROTECTED]> wrote in mess

Re: [PHP-DEV] PHP5: expected __METHOD__ behavior

2004-05-22 Thread Johannes Schlueter
Hi, Andrey Hristov wrote: > echo get_class($this).'::'.__FUNCTION__ (when there is an instance of the > class) but AFAIK in your case with static calls there is no solution. Is there some way to add a function (or some other magic thing) that works with static calls and call it a bug fix, so it c

Re: [PHP-DEV] Multi-Method Dispatch in PHP 5.1?

2004-04-21 Thread Johannes Schlueter
Andrey Hristov wrote: > class foobar { [...] > protected function doSomething_objectFubar($fub) { > $a = func_get_args();var_dump(__METHOD__, $a); > } > > public function doSomething() { > $args = func_get_args(); > $method_name = __FUNCTION__; > foreach

Re: [PHP-DEV] Conditional class definition in PHP 4.3.x

2004-01-09 Thread Johannes Schlueter
Hi, Zeev Suraski wrote: Wow, that's a neat one. Took me a while to realize what the heck is going on, but basically it has to do with the way the engine mangles function/class names. It's based on the file name and the line number. This *usually* works, practically, it always works except fo

Re: [PHP-DEV] Re: error_handler, was [PHP-DEV] B3, pear segfault,

2003-12-18 Thread Johannes Schlueter
Andi Gutmans wrote: Did this specific test work before I reverted Dmitry's patch? There were three changes in his patch, maybe one of them caused the crash and one of them fixed the problem you are mentioning. Andi with yesterdays Beta3RC1 this test worked. johannes -- PHP Internals - PHP Runt

Re: [PHP-DEV] Re: error_handler, was [PHP-DEV] B3, pear segfault,

2003-12-18 Thread Johannes Schlueter
Pierre-Alain Joye wrote: With --enabled-debug it reports a memory leak but it works again. /home/johannes/src/php-cvs/php-src/Zend/zend_execute.c(405) : Freeing Does it crash again without --enabled-debug? That's what I got before. Crash without, works with. Ah, I didn't run make test -

Re: [PHP-DEV] Re: error_handler, was [PHP-DEV] B3, pear segfault,

2003-12-18 Thread Johannes Schlueter
: Can you please update the Zend CVS and see if it still crashes? I reverted some recent engine patches. Thanks, Andi At 12:30 AM 12/19/2003 +0100, Johannes Schlueter wrote: Stig S. Bakken wrote: Could someone with a crashing "make install-pear-packages" post the contents of their c

Re: [PHP-DEV] Re: error_handler, was [PHP-DEV] B3, pear segfault,

2003-12-18 Thread Johannes Schlueter
Stig S. Bakken wrote: Could someone with a crashing "make install-pear-packages" post the contents of their config.nice file this gives a segfault: CC='gcc' \ CXX='g++' \ './configure' \ '--prefix=/opt/php5' \ "$@" this tells "/home/johannes/src/php-5.0.0b3RC1/Zend/zend_hash.c(504) : ht=0x40672f

Re: [PHP-DEV] B3, pear segfault

2003-12-18 Thread Johannes Schlueter
Hi, as I wrote in my initial post: Even changing the paramters for pear/install-pear.php "helps" and I am not able to create a simpler script reproducing the crash. But meanwhile I've found the time when it broke: zend_execute.c,v 1.565 2003/12/14 16:09:07 still works but zend_execute.c,v 1.566

[PHP-DEV] Re: Beta 3 RC 1 Take #2

2003-12-17 Thread Johannes Schlueter
Hi, while testing on my Linux-box (Gentoo, 2.4.22, gcc 3.2.3) I've got a segfault while make install (which I could localize to install-pear-packages) I had a snapshot from end-november with this prefix before. If I use an empty directory all works fine. $ ./configure --prefix=/opt/php5 $ make

[PHP-DEV] Some kind of Reflection_Property::getLine() ?

2003-12-07 Thread Johannes Schlueter
Hi, I've spent some time playing around with the reflection API. For testing it I wrote an extended syntax highlighter (if you like very ugly PHP source you can have a look at [1]) Now I'm missing a method like public int Reflection_Property::getLine() which acts something like the Reflection