[PHP-DEV] Reserving primitive types

2015-02-08 Thread Timm Friebe
Hello everyone, I've been following the Static type hints discussion for a while now. Aside from its content, which there are some strong sentiments about, there's also another recurring pattern - the wish for voting options instead of just yes/no. Along these lines I've created an RFC on one

Re: [PHP-DEV] Reserving primitive types

2015-02-08 Thread Timm Friebe
Hi, I personally see the benefits this could have but also the BC break this would introduce. [...] I don't see the point of this: the Scalar Type Hints RFC already has a voting option on reserving the type names, and it is set to pass, so by the time your RFC could go to a vote, it

[PHP-DEV] Re: Can someone merge `Catchable Call to a member function bar() on a non-object`?

2014-09-15 Thread Timm Friebe
Hi everyone, Timm Friebe p...@thekid.de hat am 16. August 2014 um 18:09 geschrieben: two weeks ago, the RFC `Catchable Call to a member function bar() on a non-object` was accepted by a vote. I don't have commit access to php-src/Zend, so I can't commit this myself. Back from my summer

[PHP-DEV] Re: PHP HEAD and gcov.php.net

2014-08-31 Thread Timm Friebe
Hi, I've disabled the following extensions from the build of PHP_HEAD at the gcov.php.net server: [...] - sybase_ct   You're right, this is unmaintained. Timm -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Can someone merge `Catchable Call to a member function bar() on a non-object`?

2014-08-31 Thread Timm Friebe
Hi, Sara Golemon p...@golemon.com hat am 16. August 2014 um 19:39 geschrieben: On Aug 16, 2014, at 9:09, Timm Friebe p...@thekid.de wrote: two weeks ago, the RFC `Catchable Call to a member function bar() on a non-object` was accepted by a vote. I don't have commit access to php-src/Zend

[PHP-DEV] Can someone merge `Catchable Call to a member function bar() on a non-object`?

2014-08-16 Thread Timm Friebe
Hi, two weeks ago, the RFC `Catchable Call to a member function bar() on a non-object` was accepted by a vote. I don't have commit access to php-src/Zend, so I can't commit this myself. Back from my summer vacation, I thought I'd whip up this email (after bringing the pull request up-to-date and

Re: [PHP-DEV] [VOTE] RFC: Catchable call to a member function of a non-object

2014-07-27 Thread Timm Friebe
Hello,   Yasuo Ohgaki yohg...@ohgaki.net hat am 27. Juli 2014 um 10:11 geschrieben:   Hi Timm,   On Sun, Jun 29, 2014 at 7:40 PM, Timm Friebe p...@thekid.de mailto:p...@thekid.de wrote:         a couple of weeks ago, I proposed a change to the handling of the situation     where methods

Re: [PHP-DEV] [VOTE] RFC: Catchable call to a member function of a non-object

2014-07-25 Thread Timm Friebe
Hi, Peter Cowburn petercowb...@gmail.com hat am 20. Juli 2014 um 17:42 geschrieben: [...]     Anyhow, I'd now like to see where we'd come out at and would kindly ask you to     vote for or against inclusion of this feature:    

Re: [PHP-DEV] PHP 5.4.0 RC8 released

2012-02-23 Thread Timm Friebe
Hi, (Hint: __wakeup() isn't called). This looks to be the same as https://bugs.php.net/bug.php?id=60879. Can you try the build I linked to in that report and see if it resolves this issue for you? It does. Thanks! - Timm -- PHP Internals - PHP Runtime Development Mailing List To

Re: [PHP-DEV] PHP 5.4.0 RC8 released

2012-02-19 Thread Timm Friebe
Hello, We like to announce the 7th Release Candidate of PHP 5.4.0. We fixed some critical bugs in the PHP 5.4.0 codebase. Therefore we had to release another RC. I still have the following problem I'm experiencing with all release candidates since RC6: $

Re: [PHP-DEV] PHP 5.4 Benchmarks

2012-02-05 Thread Timm Friebe
Hi, As many of you know we made huge improvements in PHP 5.4 memory usage (enabling higher concurrency) and runtime performance. Here are the unit test results for https://github.com/xp-framework/xp-framework and https://github.com/xp-framework/xp-language after applying workarounds for two

[PHP-DEV] Fw: Bug #60167 [PATCH]: Crash / memory corruption

2011-11-23 Thread Timm Friebe
Hey, who can review this patch? I'm not sure this is the right place to fix this issue - it's related to the literal caching in the Zend Engine's method call init opcodes (ZEND_INIT_[STATIC_]METHOD_CALL) and might need to be addressed there instead of having to change PHP extensions.

Re: [PHP-DEV] Fw: Bug #60167 [PATCH]: Crash / memory corruption

2011-11-23 Thread Timm Friebe
Hi, Can you add this comment to the bug as well please? And assign to Dmitry, if it is related to the engine then it must be fixed in the engine :) Done. I think COM is at fault, but let's see:) - Timm -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

[PHP-DEV] Method call improvements

2009-01-16 Thread Timm Friebe
Hi, in every programming language, method calls are expensive. Especially in PHP, which does not spend any effort during compile time to resolve method calls their target (and cannot due to the possibility of lazily loading classes using include w/ variables). I recently did some performance

[PHP-DEV] Fix for Zend/tests/bug40236.phpt

2009-01-10 Thread Timm Friebe
Hi, here's a quick fix for the bug40236 test failing when run from inside a directory including spaces (e.g. C:\Documents and Settings\ or /home/Timm Friebe/): Index: Zend/tests/bug40236.phpt === RCS file: /repository/ZendEngine2

[PHP-DEV] php://input in CLI sapi

2009-01-03 Thread Timm Friebe
Hi, is there any reason php://input is not supported in CLI sapi? It would be nice to test raw post data reading in unittests without having to run them inside a web server sapi and it's only a five-line patch making php://input read from stdin in cli (attached). - Timm Index:

Re: [PHP-DEV] Bug in namespaces and type hints

2008-11-11 Thread Timm Friebe
Hi, recent change in namespace code introduced new bug, please consider: ?php namespace tests; class t1 { function abc(\stdClass $std = null) { } } ? triggers Fatal error: Default value for parameters with a class type hint can only be NULL where the same w/o namespace definition

[PHP-DEV] Namespace separator in Zend tests

2008-11-10 Thread Timm Friebe
Hi, easy one: Two of the namespace tests in Zend/tests don't use the new ns separator yet: http://sitten-polizei.de/php/zend-test-ns-separator.diff - Timm -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] sybase_connect()

2008-11-10 Thread Timm Friebe
Hi, I'd like to add a new optional parameter to sybase_connect() for PHP 5.3. If set to TRUE it will force creation of a new link (and works just like mysql_connect()'s new_link parameter). http://sitten-polizei.de/php/sybase-connect-newlink.diff seems like a good idea to have this and i

[PHP-DEV] sybase_connect()

2008-11-09 Thread Timm Friebe
Hi, I'd like to add a new optional parameter to sybase_connect() for PHP 5.3. If set to TRUE it will force creation of a new link (and works just like mysql_connect()'s new_link parameter). http://sitten-polizei.de/php/sybase-connect-newlink.diff Any objections? - Timm -- PHP Internals

Re: [PHP-DEV] __getStatic

2008-10-19 Thread Timm Friebe
Hi, First of all, thanks for reviewing and the feedback. I knew this wasn't perfect, and tried to understand what was previously done for __get and __set and transport that to the static counterparts. Unfortunately not all infrastructure like the std_*_property_handler callbacks is in place

Re: [PHP-DEV] __getStatic

2008-09-08 Thread Timm Friebe
Hi, [...__(set|get|unset|isset)static()...] Patch looks pretty good. Plaease add __issetStatic and __unsetStatic. Then provide tests and submit to HEAD. For 5.3 Lukas and Johannes have to agree but I am sure they first want to see it in HEAD. Hope we havent missed any other we need to make

[PHP-DEV] __getStatic

2008-08-14 Thread Timm Friebe
Hi, on the member side, there is __get, __set, __isset and __unset - on the method side, there is __call (and now: __callstatic). I was wondering why there was no __getstatic and friends, but failed to find a reason. Attached you'll find an incomplete patch against PHP_5_3 to add this

Re: [PHP-DEV] __getStatic

2008-08-14 Thread Timm Friebe
Hi again, Attached you'll find an incomplete patch against PHP_5_3 to add this functionality. If you like it let me know and I can finish it. Darn, seems the list didn't like my text/plain attachment. Well, here we go: http://sitten-polizei.de/php/get-static.diff - Timm -- PHP

Re: [PHP-DEV] cleaning up the functions - any volunteers?

2008-06-23 Thread Timm Friebe
Hi, While we nearing the release of 5.3 (hopefully?), there are many functions in the PHP code which still use old parameter parsing API (zend_get_parameters_ex) instead of the new one (zend_parse_parameters). I started taking care of ext/sybase_ct. - Timm -- PHP Internals - PHP Runtime

Re: [PHP-DEV] [RFC] Strict type hints (parameter and return value)

2008-06-19 Thread Timm Friebe
Hi, I like this generally, but cannot live with the BC issues raised. Introducing all type names as keywords will make class Object, class Integer and so on give a syntax error. That's actually not true, the patch does not introduce new keywords. Hrm, the Wiki states it does:

Re: [PHP-DEV] extensions status, to move to pecl or to drop

2008-06-19 Thread Timm Friebe
Hi, been busy again at work, sorry for the late answer. I can look into setting up a cruise-control-like infrastructure on our dev-machines that'll run these periodically. Thanks for the offer, that would be very helpful. Is it possible to have it for windows as well? It could also help if

Re: [PHP-DEV] extensions status, to move to pecl or to drop

2008-06-15 Thread Timm Friebe
Hi, Can be moved PECL - interbase - fpdf - fbsql - sybase and sybase_ct Sybase can be moved, it is unmaintained. I would've done this long ago if I could, karma-wise. Sybase_ct works perfectly for us at 11 and despite feature requests that exist and me not having put big efforts into it

Re: [PHP-DEV] [RFC] Strict type hints (parameter and return value)

2008-06-15 Thread Timm Friebe
Hi, If anyone wants use type hinting, i believe that it should be strict. Otherwise, it makes more sense to not use it. I like this generally, but cannot live with the BC issues raised. Introducing all type names as keywords will make class Object, class Integer and so on give a syntax

Re: [PHP-DEV] extensions status, to move to pecl or to drop

2008-06-15 Thread Timm Friebe
Hi, But if we work together, it should be possible to keep them. Let me ask you the same than I ask to Lester, will you help us to keep sybase_ct in php-src? You don't need to know C or php internals but to actually provide tests and run them when we update the libraries or releases RC.

Re: [PHP-DEV] Method overloading by method signature

2007-10-15 Thread Timm Friebe
Hi, [...] Later we added type hints to help code readability. Let me jump at this: == function xpath($arg) { if ($arg instanceof DomDocument) { return new DomXPath($arg); } else if ($arg instanceof XmlTree) { return new DomXPath($this-loadXML($arg-getSource())); } else if

Re: [PHP-DEV] Class Posing

2007-10-04 Thread Timm Friebe
Hi, public function foo() { $bar= new Bar; [...] } When I want to test the foo() method, I want to stub out the usage of the Bar class, for example, and have Bar::doSomething() return a pre-configured value instead of performing its normal operation. This is where you'd

[PHP-DEV] Namespaces patch backport

2007-07-21 Thread Timm Friebe
Hi, I've backported the namespaces patch to current CVS HEAD. Here it is: http://sitten-polizei.de/php/php5-namespaces.diff I've tested it with the .phpt-tests Dmitry provided. Enjoy:) - Timm -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

[PHP-DEV] sprintf - spprintf changes

2007-03-16 Thread Timm Friebe
Hi, recently, I noticed I was getting Invalid pointer and 4 bytes overflown messages executing PHP scripts connecting to sybase: [...]php5/ext/sybase_ct/php_sybase_ct.c(818) : Block 0x09091060 status: Invalid pointer: ((size=0x00B6) != (next.prev=0x08410004)) Invalid pointer:

AW: [PHP-DEV] Basic Namespace Requirements

2005-12-04 Thread Timm Friebe
Hi, Hello Jessie, [...] you should simply try to come up with a working patch using a working separator which can clearly only be \. Why is \ the only character that could work? Because it's unused? What about for examole the tilde (~) or the exclamation mark (!)? - both of them are

AW: [PHP-DEV] YANP (Yet Another Namespace Proposal)

2005-07-07 Thread Timm Friebe
[...] - All imports are done at compile time. So: == Object.php == ?php package lang { class Object { }} ? == script.php == ?php include('Object.php'); import lang:Object; ? ...will not work. You'll need an opcode for this. - Timm -- PHP Internals - PHP Runtime Development

Re: [PHP-DEV] PHP 5.1

2005-06-07 Thread Timm Friebe
Hi, [...] Any feature can and as experience proves it to be the case, will be abused. Plenty of people make horrid abuse of exceptions, but we still went ahead an added them anyway since they have many practical and useful applications. Same is true for goto, some people will surely

[PHP-DEV] Unserialize Bug

2005-05-17 Thread Timm Friebe
Hi, unserialize() cannot unserialize objects whose names contain anything except a-z, 0-9 and _, the parser allows those, though. Example === $ cat unserialize.php ?php class Über { } var_dump(unserialize(serialize(new Über(; ? Expected behaviour == $ php

AW: [PHP-DEV] Unserialize Bug

2005-05-17 Thread Timm Friebe
Hi, Fix === Allow anything the parser allows, [a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]* Do you have a patch? :) Sorry, no, I'm working under Windows at the moment *without* any development tools installed except for cygwin, and IIRC PHP won't build with just that (meaning I couldn't

AW: [PHP-DEV] Attributes support proposal

2005-04-18 Thread Timm Friebe
Hi, [...] I am playing around with an extension to the Zend Engine 2 to allow class properties and methods to be tagged with attributes. These attributes would then be accessible through the Reflection classes: The PHP development team is usually against these kinds of OOP syntax sugar

AW: AW: [PHP-DEV] Attributes support proposal

2005-04-18 Thread Timm Friebe
Hi, [...] I would like to see a PEAR (or even PECL) package that provides this functionality. I might even write it myself (given that I have a couple of long train rides coming up I will probably do this anyhow :-) Come on, you don't need a long trainride for that.

[PHP-DEV] (s|g)etStaticPropertyValue

2005-03-06 Thread Timm Friebe
Hello, I saw there are two new ReflectionClass methods: * getStaticPropertyValue() * getStaticPropertyValue() How do these differ (excepting being one method call) from: $value= $reflectionClass-getProperty('instance')-getValue(); and

Re: [PHP-DEV] PDO/MySQL column metadata native_type broken

2005-02-20 Thread Timm Friebe
On Sun, 2005-02-20 at 04:32 -0500, Wez Furlong wrote: Please open a pecl bug for this too, Done so: http://pecl.php.net/bugs/bug.php?id=3530 -- Timm If it ain't broken, it doesn't have enough features yet -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] Re: PDO types

2005-02-20 Thread Timm Friebe
On Sun, 2005-02-20 at 10:44 +0100, Lukas Smith wrote: Timm Friebe wrote: while testing PDO I was astonished to see that all values (regardless of their types in the database) are returned as strings (in all extensions except for PgSQL). Why is that so? It _is_ quite inconsistent, isn't

Re: [PHP-DEV] PDO/MySQL getColumnMeta() broken

2005-02-20 Thread Timm Friebe
On Sun, 2005-02-20 at 04:32 -0500, Wez Furlong wrote: On Sat, 19 Feb 2005 18:11:06 +0100, Timm Friebe [EMAIL PROTECTED] wrote: with no indication what went wrong. Please read the OTN article to learn about the error modes in PDO. (I expect everyone to have read this!) I find setting

Re: [PHP-DEV] Re: PDO types

2005-02-20 Thread Timm Friebe
On Sun, 2005-02-20 at 09:44 -0500, Wez Furlong wrote: On Sun, 20 Feb 2005 12:36:01 +0100, Timm Friebe [EMAIL PROTECTED] wrote: * If the number does not fit, I will try to convert it into a double (PHP datatype float). This is the case for e.g. numeric(10) - values might not fit

[PHP-DEV] PDO/MySQL column metadata native_type broken

2005-02-19 Thread Timm Friebe
Hi, native_type (returned from PDOStatement::getColumnMeta()) was showing weird behaviour in PDO/MySQL, mostly not existing at all and showing incorrect values (e.g. DECIMAL for varchars). A small typo is why: Index: ext/pdo_mysql/mysql_statement.c

[PHP-DEV] PDO/MySQL getColumnMeta() broken

2005-02-19 Thread Timm Friebe
Hi, the following sourcecode: ?php $dbh= new PDO('mysql:host='.$argv[1], $argv[2], $argv[3]); $stmt= $dbh-prepare('select * from entries where id = :id'); $stmt-bindParam(':id', $argv[4]); if (!$stmt-execute()) { var_dump($dbh-errorInfo()); exit; } for ($i= 0, $s=

[PHP-DEV] PDO types

2005-02-19 Thread Timm Friebe
Hi, while testing PDO I was astonished to see that all values (regardless of their types in the database) are returned as strings (in all extensions except for PgSQL). Why is that so? It _is_ quite inconsistent, isn't it? Wasn't PDO supposed to _unify_ the RDBMS access apis? -- Timm If it ain't

[PHP-DEV] PDO/MySQL connect broken for remote hosts

2005-02-18 Thread Timm Friebe
Hi, has anyone noticed PDO/MySQL will always try to connect locally regardless of what I put in the host=... DSN part? The statement: new PDO('mysql:host=php3.de', '', '***'); will only throw a PDOException: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]

Re: [PHP-DEV] ReflectionClass::getMethod()

2004-12-23 Thread Timm Friebe
On Thu, 2004-12-23 at 07:43 +0100, Sebastian Bergmann wrote: Andi Gutmans wrote: Exceptions should be thrown for errors. And trying to get a method that does not exist is an error. ...which is fine, but without an elegant way of checking if that method exists I don't think it should be

[PHP-DEV] Reflection API r1.136

2004-11-02 Thread Timm Friebe
revision 1.136 date: 2004/10/31 15:30:53; author: helly; state: Exp; lines: +163 -1 - Add ReflectionFunction::invokeArgs(array) - Add ReflectionMethod::invokeArgs(obj, array) Why was this added? These: 1) call_user_func_array( array(new ReflectionMethod('class', 'method'), 'invoke',

Re: [PHP-DEV] Reflection API r1.136

2004-11-02 Thread Timm Friebe
On Tue, 2004-11-02 at 13:52, Sebastian Bergmann wrote: Timm Friebe wrote: Why was this added? I asked Marcus to add these. He forgot to support invokeArgs(NULL, array(...)) for static invocation (Warning: invokeArgs() expects parameter 1 to be object, null given). [...call_user_func

[PHP-DEV] Bug: Can't inherit abstract function

2004-10-09 Thread Timm Friebe
Hi, the attached script produces: Fatal error: Can't inherit abstract function Drawable::draw() (previously declared abstract in Figure) in /usr/home/thekid/r.php on line 12 which is wrong because I am not inheriting anything but implementing an interface. The problem is that both

Re: [PHP-DEV] Bug: Can't inherit abstract function

2004-10-09 Thread Timm Friebe
On Sat, 2004-10-09 at 15:26, Timm Friebe wrote: Hi, the attached script produces: [...Error message...] - if (parent-common.fn_flags ZEND_ACC_ABSTRACT + if (!(parent-common.scope-ce_flags ZEND_ACC_INTERFACE) +parent-common.fn_flags ZEND_ACC_ABSTRACT fixes

Re: [PHP-DEV] CLI Constant

2004-09-30 Thread Timm Friebe
On Thu, 2004-09-30 at 23:10, Jason Garber wrote: Hello internals, [...] If there is no better way, perhaps we could add constant called (SAPI_TYPE = 'CLI') or something like that to the language to facilitate this? $ php -r 'var_dump(PHP_SAPI);' string(3) cli get_defined_constants() is

[PHP-DEV] Readline compile failure

2004-09-26 Thread Timm Friebe
Hi, here's a patch that fixes the following: In file included from /usr/home/thekid/devel/php/php/ext/readline/readline.c:28: /usr/home/thekid/devel/php/php/ext/readline/php_readline.h:26: warning: #warning Readline module will *NEVER* be thread-safe

[PHP-DEV] Segfault in str_replace()

2004-09-14 Thread Timm Friebe
Hello, I'm experiencing very weird segfaults (and cannot reproduce them with a small script) in PHP4 (to be exact: PHP4.3.8) - a backtrace is attached. Now the weird thing is: #0 0x080e3ff3 in php_char_to_str (str=0x0, len=1515870810, from=34 '', to=0x85d5f54 \\, to_len=2, result=0x860104c)

[PHP-DEV] Sefault in clone

2004-09-14 Thread Timm Friebe
?php class Person { public $name; } $a[]= new Person(); $b = clone $a; $b[0]-name = 'Copy'; ? $ php5 test.php Warning: __clone method called on non-object in /usr/home/thekid/test.php on line 6 [Wed Sep 15 00:07:35 2004] Script: 'test.php' ---

AW: [PHP-DEV] sybase_ct: deadlock_retry_count

2004-09-07 Thread Timm Friebe
[...] My questions to the sybase_ct (Hi Timm ;-) ) maintainer: 1. How is the deadlock/retry logic in sybase_ct_query() intended to work? From my understanding a single SQL statement will never deadlock. I have no idea why this was put in in the first place. 2. The default setting of

Re: [PHP-DEV] PHP 5.0 crash on long php script with over 1000 lines

2004-07-10 Thread Timm Friebe
On Fri, 2004-07-09 at 19:04, Gunnar von Boehn wrote: Hi, [...] I noticed that all long scripts (over 1000 lines) will kill the Apache/PHP build. Sounds like http://bugs.php.net/bug.php?id=28064 to me. - Timm -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] php.net on PHP5

2004-06-19 Thread Timm Friebe
Hello Lester, On Sat, 2004-06-19 at 18:22, Lester Caine wrote: OK I've downloaded phpweb and tried to run it on PHP5, but have fallen at the first hurdle. index.php calls for include/pregen-events.inc but I can't see that on the CVS - where am I going wrong :) Use rsync: -- snip

Re: [PHP-DEV] php.net on PHP5

2004-06-19 Thread Timm Friebe
On Sat, 2004-06-19 at 18:37, Lester Caine wrote: Timm Friebe wrote: [...] Use rsync: -- snip rsync.sh from our php.net mirror -- #!/bin/sh base=/home/httpd/php3.de /usr/local/bin/rsync -avzC --delete --delete-after rsync.php.net::phpweb $base/doc_root /dev/null -- /snip

Re: [PHP-DEV] php.net on PHP5

2004-06-19 Thread Timm Friebe
On Sat, 2004-06-19 at 19:00, Lester Caine wrote: Timm Friebe wrote: [...] Anybody know how to use this script with Eclipse CVS on Windows ? Get cygwin (http://cygwin.com/) or check Google on a Windows version of it (http://www.google.com/search?q=rsync%20Windows). - Timm -- PHP Internals

[PHP-DEV] Java and $ (was: Re: [PHP-DEV] Re: ClassHints and NULL)

2004-06-18 Thread Timm Friebe
On Fri, 2004-06-18 at 21:43, Andrei Zmievski wrote: [...] Wow. When did Java get $ for variables? It already has:) $ cat Dollar.java public class Dollar { public static void main(String[] args) { String $str= Hello; System.out.println($str); } } $ /usr/local/jdk1.4.2/bin/javac

Re: [PHP-DEV] Use of 'self' in static function in subclass

2004-06-01 Thread Timm Friebe
On Tue, 2004-06-01 at 15:11, Bert Slagter wrote: Hi All, I have a class and a subclass, both with a static method: [...] Somehow this behaviour seems logical, on the other hand I don't think it's desired. I think that 'self' should point to the current class, even if the static method

Re: [PHP-DEV] delete in PHP

2004-06-01 Thread Timm Friebe
On Tue, 2004-06-01 at 16:50, Florian Schaper wrote: Derick Rethans wrote: On Tue, 1 Jun 2004, Florian Schaper wrote: An Zend API 2.0 paper I read a while ago said something about delete being implemented in PHP5. However, no delete. Was this feature dropped? I have implemented

Re: [PHP-DEV] Segfault in current HEAD

2004-05-22 Thread Timm Friebe
On Sat, 2004-05-22 at 13:48, Sebastian Bergmann wrote: The following code triggers a segfault with the attached stacktrace: ?php class UML_Class extends ReflectionClass { } print ReflectionClass::export('UML_Class'); ? Works fine here. - Timm -- PHP Internals - PHP

Re: [PHP-DEV] PHP 4.3.7RC1 Release Schedule

2004-05-21 Thread Timm Friebe
On Fri, 2004-05-21 at 21:19, Daniel Convissor wrote: Hi Ilia: I'd would like to release the RC1 of 4.3.7 this Thursday, so if you have any pending bug fixes please commit them. If you need more time, please let me know. It would be appreciated if we can get Sybase working. Right now

[PHP-DEV] Sybase-CT bug #28354

2004-05-21 Thread Timm Friebe
On Fri, 2004-05-21 at 21:59, Timm Friebe wrote: On Fri, 2004-05-21 at 21:19, Daniel Convissor wrote: [...] It would be appreciated if we can get Sybase working. Right now it causes PHP to crash. http://bugs.php.net/bug.php?id=28354 I'm able to reproduce - I just added a testcase

Re: [PHP-DEV] PHP 4.3.7RC1 Release Schedule

2004-05-21 Thread Timm Friebe
On Fri, 2004-05-21 at 23:02, Edin Kadribasic wrote: Edin just fixed the PHP5 branch, i MFH'ed the fixed to PHP4. - Timm You should probably test ZTS build before comitting as well. Most windows build problems stem from the fact that ZTS build gets broken which can be tested on any

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/sybase_ct

2004-05-16 Thread Timm Friebe
On Sat, 2004-05-15 at 20:11, Ard Biesheuvel wrote: [...LONG_MIN / LONG_MAX comparison] Hi Timm, I think this code is broken on 64-bit archs, as doubles lack the precision to accurately represent a 64-bit long. Also, comparing double values with LONG_[MIN|MAX] is dangerous for the same

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/sybase_ct

2004-05-16 Thread Timm Friebe
On Sun, 2004-05-16 at 17:17, Ard Biesheuvel wrote: Hi Timm, I have an old Alpha PWS433 running FreeBSD which I use for this kind of stuff. If so, what does this print? -- #define LONG_MAX 2147483647L #define

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/sybase_ct

2004-05-16 Thread Timm Friebe
On Sun, 2004-05-16 at 17:57, Timm Friebe wrote: On Sun, 2004-05-16 at 17:17, Ard Biesheuvel wrote: [...] -- snip -- Z_STRLEN(result-data[i][j]) = result-lengths[j]-1; Z_STRVAL(result-data[i][j]) = estrndup(result-tmp_buffer[j], result-lengths[j]); Z_TYPE(result-data[i][j]) = IS_STRING

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/sybase_ct

2004-05-16 Thread Timm Friebe
On Sun, 2004-05-16 at 18:16, Timm Friebe wrote: [...] Or, replying to myself, simply use convert_scalar_to_number() from Zend/zend_operators.c which (AFAIS) does pretty much the same. The testcase I wrote for this (attached) is passed here. Ard, do you use sybase_ct? If so, could you verify

[PHP-DEV] LONG_MIN

2004-05-16 Thread Timm Friebe
Hello, are we off one here? $ php-dev -r 'var_dump(-2147483648);' float(-2147483648) $ php-dev -r 'var_dump(-2147483647 -1);' int(-2147483648) - Timm -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Type hints

2004-05-02 Thread Timm Friebe
On Sat, 2004-05-01 at 22:09, Marcus Boerger wrote: Hello internals, while working with php 5 the last days i find it more and more annoying that we allow NULL with type hints. From my perspective allowing NULL with typehints would happen only very rare. I don't think this is true. I

Re: [PHP-DEV] [PATCH] sybase appname contains static version number

2004-04-18 Thread Timm Friebe
On Fri, 2004-04-16 at 17:51, Derick Rethans wrote: On Fri, 16 Apr 2004, Uwe Schindler wrote: Appended a patch to the sybase extensions, that set the default value for the sybase appname to (PHP PHP_VERSION). I have seen that in PHP 4.3.6 where this variable is statically set to PHP 4.0

Re: [PHP-DEV] Bus error w/ __PHP_Incomplete_Class

2004-04-09 Thread Timm Friebe
On Fri, 2004-04-09 at 09:33, Andi Gutmans wrote: Not sure if I replied to the list but this should be fixed now. Verified. - Timm -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] set_exception_handler()

2004-04-03 Thread Timm Friebe
Hello, I wanted to check back on the status of my patch to zend_builtin_functions.c I sent a while ago. It changes set_exception_handler() to accept the pseudo-type callable (instead of a string referring to a global function). Examples: set_exception_handler('function_name');

Re: [PHP-DEV] Reflection API: studlyCaps v. underscores?

2004-04-03 Thread Timm Friebe
On Sat, 2004-04-03 at 20:00, Jochem Maas wrote: [...] Having read all the posts on studlyCaps on this list, and understanding that studlyCaps was the std. for all new OO APIs I found the following a little odd: The documentation at

Re: [PHP-DEV] set_exception_handler()

2004-04-03 Thread Timm Friebe
On Sat, 2004-04-03 at 21:26, Andi Gutmans wrote: In general, I have no problem with adding this consistency. Where is a reference to $instance held until the exception occurs? What kind of reference? This is what I used to verify the (instance) functionality: ?php class ExceptionHandler {

[PHP-DEV] Reflection Memory leak fix

2004-03-28 Thread Timm Friebe
Hi, this fixes a memory leak in Reflection_Property::getModifiers(). - Timm Index: Zend/zend_reflection_api.c === RCS file: /repository/ZendEngine2/zend_reflection_api.c,v retrieving revision 1.94 diff -u -r1.94 zend_reflection_api.c

[PHP-DEV] Bus error w/ __PHP_Incomplete_Class

2004-03-28 Thread Timm Friebe
Hi, accessing a non-existant member of (or calling a member function on) an instance of __PHP_Incomplete_Class results in a bus error: [EMAIL PROTECTED]:~/devel/php/php cat incomplete_class.php ?php $o= unserialize('O:1:a:1:{s:5:value;s:3:100;}'); var_dump($o); var_dump($o-member); ?

[PHP-DEV] Compile failure w/ ZTS

2004-03-25 Thread Timm Friebe
Hi, current head fails to compile in ZTS mode. Fix attached. - Timm Index: Zend/zend_execute.c === RCS file: /repository/ZendEngine2/zend_execute.c,v retrieving revision 1.635 diff -u -r1.635 zend_execute.c --- Zend/zend_execute.c 25

Re: [PHP-DEV] RC1 of RC1

2004-03-16 Thread Timm Friebe
On Mon, 2004-03-15 at 07:10, Andi Gutmans wrote: Hey, I rolled RC1 of RC1 (didn't change the version from -dev on purpose because RC1RC1 is kind of odd and I didn't want it to confuse people :). I will roll RC1 on the 17th so if there are serious show stoppers speak up. [EMAIL

[PHP-DEV] Exception::__toString() not called

2004-03-16 Thread Timm Friebe
Hi, Both of the following examples used to output the Exception::__toString() output, which they don't anymore: $ php-dev -r '$e= new Exception(); echo $e, \n;' Object id #1 $ php-dev -r '$e= new Exception(); echo (string)$e, \n;' Object id #1 Works fine for userland objects: $ php-dev -r

Re: [PHP-DEV] RC1 of RC1

2004-03-16 Thread Timm Friebe
On Tue, 2004-03-16 at 22:28, Marcus Boerger wrote: Hello Timm, this is fixed now. Verified. - Timm -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] BC break: $o= new stdclass; empty($o)

2004-03-06 Thread Timm Friebe
On Sat, 2004-03-06 at 15:53, Timm Friebe wrote: [...] I'm not sure whether this affects a lot of users, and as noone has commented on it, I guess PHP5 will get away with this break:) I'll just have to find a workaround if you insist the PHP4 behaviour is broken:) Additionally, it should

Re: [PHP-DEV] Bus Error in shutdown

2004-03-02 Thread Timm Friebe
On Tue, 2004-03-02 at 09:28, Andi Gutmans wrote: This should be fixed now. Verified. - Timm -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Memory leak with .=

2004-03-02 Thread Timm Friebe
On Tue, 2004-03-02 at 11:13, Andi Gutmans wrote: Fixed. Verified. Thanks for the reproducing case. You're welcome:) - Timm -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] BC break: $o= new stdclass; empty($o)

2004-02-29 Thread Timm Friebe
Hi, $ php5 -r '$o= new stdclass; var_dump(empty($o));' bool(false) $ php4 -r '$o= new stdclass; var_dump(empty($o));' bool(true) Was this an intentional change? - Timm -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] BC break: $o= new stdclass; empty($o)

2004-02-29 Thread Timm Friebe
On Sun, 2004-02-29 at 18:10, Timm Friebe wrote: Hi, [...] Was this an intentional change? zend_execute.h, lines 95 - 98: case IS_OBJECT: /* OBJ-TBI */ result = 1; break; I have a patch, but that includes a TSRMLS_FETCH() - maybe it would be wise to change

Re: [PHP-DEV] BC break: $o= new stdclass; empty($o)

2004-02-29 Thread Timm Friebe
On Sun, 2004-02-29 at 19:09, Stanislav Malyshev wrote: TF I have a patch, but that includes a TSRMLS_FETCH() - maybe it would TF be wise to change: Patch that does what? Well, fix the BC issue by implementing what was marked with TBI (which, as I assume, means to be implemented). When

Re: Fwd: [PHP-DEV] RC1

2004-02-28 Thread Timm Friebe
On Thu, 2004-02-26 at 08:57, Marcus Boerger wrote: Hello Timm, i think this is not completley correct. When reflection is used from a static member of the class itself it should still work. Correct: class Foo { protected function __construct() { } public static function create() {

Re: [PHP-DEV] Segfault in HEAD

2004-02-28 Thread Timm Friebe
On Thu, 2004-02-26 at 23:41, Stefan Walk wrote: Hi, after a cvs update i get a segfault with this script: [...] This sourcecode (which is the same except that there is no code in the destructor) prints out: Fatal error: Exception thrown without a stack frame in Unknown on line 0 -- snip --

[PHP-DEV] Memory leak with .=

2004-02-27 Thread Timm Friebe
The following script: ?php class StringBuffer { public $buf= ''; public function append($string) { $this-buf.= ($string instanceof StringBuffer ? $string-buf : $string ); } } $s= new StringBuffer(); $s-append('Hello'); ? causes:

Re: [PHP-DEV] Re: segfault in shutdown sequence

2004-02-25 Thread Timm Friebe
On Tue, 2004-02-24 at 22:45, Jani Taskinen wrote: This is most likely fixed already in CVS. --Jani It wasn't yesterday, but now it is:) I was able to reproduce it but couldn't come up with a simple script demonstrating the behaviour. - Timm -- PHP Internals - PHP Runtime

[PHP-DEV] Declaration of Bar::__construct() must be compatible with that of Foo::__construct()

2004-02-25 Thread Timm Friebe
[EMAIL PROTECTED]:~/devel/php/tests cat inheritance.php ?php class Foo { function __construct($foo) { } } class Bar extends Foo { function __construct($foo, $bar) { // Add = NULL after $bar to make it work } } ? [EMAIL PROTECTED]:~/devel/php/tests php-dev

Re: [PHP-DEV] Declaration of Bar::__construct() must be compatible with that of Foo::__construct()

2004-02-25 Thread Timm Friebe
On Wed, 2004-02-25 at 23:44, Marcus Boerger wrote: Hello Timm, i had the same expirience today too. And also for me it makes not much sense. The constructor shouldn't check inheritance rules. Neither should other methods follow this. What if I want to add a non-default parameter to an

  1   2   >