Re: [PHP-DEV] Return type hints

2008-04-16 Thread Arvids Godjuks
2008/4/15, Felipe Pena [EMAIL PROTECTED]:

 Em Ter, 2008-04-15 às 01:05 -0400, Sam Barrow escreveu:

  If somebody does have a patch for this or is working on one let me know.
 Whether this will be implemented or not I would like to assist with this
 patch so I can use it for personal use at the very least.


 I already made two separated patches for param. and return value type
 hints. I'll create a new thread and start discussion ASAP.

 --
 Regards,

 Felipe Pena.


That's a simple function given. What if you need to use id many times. Then
your function will start with $id = (int)$id; or settype('int', $id);


Re: [PHP-DEV] intl naming

2008-04-16 Thread Pierre Joye
Hi,

On Tue, Apr 15, 2008 at 12:35 AM, Pierre Joye [EMAIL PROTECTED] wrote:

to know what to think about my API changes proposal and the exception
usages as it is a relatively important request. Or why are you asking?
   
  
I already stated my opinion about exceptions - I consider using them
   inappropriate in the context of this extension. However, my question was 
 not
   about redesigning the API, but specifically about names.

  I'm not sure how I should understand that. Does that mean that there
  is no room to discuss or change anything in intl as long as you don't
  agree? It may be asked in a rude way but I have hard time to follow
  the logic behind your requests.


I really fear to suddenly see a 1.0.0-stable with none of our requests
inside.
   
  
That depends on the requests and timeframe for their execution. Since we
   have mostly done the work that was planned for 1.0, I want to close one
   question that may change API. Adding features and enhancements is good, but
   not right now. If you wish, you may document them as feature requests for
   intl package on pecl too.

  My point did not change. I do think that it is premature for
  1.0.0-stable. I understand that you like to be at this stage for the
  end of this month (5.3) but I don't think we have to hurry up without
  solving the obvious issues we have. The API is the biggest one.

Let me know if I should simply consider than any change to the API
will be rejected. That will spare me (and other too) some time as I
will not try to provide patches or improvements if they will be
rejected anyway. But no answer is not a no and feed the confusion.

No trick, just checked out the code, put the libs in ../icu, run configure
   and nmake.

  Checked out? You mean with CVS/SVN? I thought you were using their releases.

I will post my ICU questions to ICU support, faster :)


Please find a patch as attachment, fixing some bad #ifdef. This test
should be in the main intl header, imo.

Cheers,
-- 
Pierre
http://blog.thepimp.net | http://www.libgd.org
Index: msgformat/msgformat_format.c
===
RCS file: /repository/pecl/intl/msgformat/msgformat_format.c,v
retrieving revision 1.1.2.7
diff -u -r1.1.2.7 msgformat_format.c
--- msgformat/msgformat_format.c5 Mar 2008 21:22:12 -   1.1.2.7
+++ msgformat/msgformat_format.c16 Apr 2008 11:02:19 -
@@ -27,8 +27,8 @@
 #include msgformat_helpers.h
 #include intl_convert.h
 
-#ifndef Z_ADDREF_P(z)
-#define Z_ADDREF_P(z) ((z)-refcount++)
+#ifndef Z_ADDREF_P
+#  define Z_ADDREF_P(z) ((z)-refcount++)
 #endif
-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] intl naming

2008-04-16 Thread Pierre Joye
On Wed, Apr 16, 2008 at 3:21 PM, Pierre Joye [EMAIL PROTECTED] wrote:

  Please find a patch as attachment, fixing some bad #ifdef. This test
  should be in the main intl header, imo.

Forgot to attach a second for config.w32, to nicely detect the
required libraries.

Cheers,
-- 
Pierre
http://blog.thepimp.net | http://www.libgd.org
Index: config.w32
===
RCS file: /repository/pecl/intl/config.w32,v
retrieving revision 1.1.2.10
diff -u -r1.1.2.10 config.w32
--- config.w32  4 Apr 2008 17:15:02 -   1.1.2.10
+++ config.w32  10 Apr 2008 20:44:51 -
@@ -63,6 +63,12 @@
dateformat_parse.c \
dateformat_data.c \
, intl);
+   CHECK_LIB(icudt.lib, intl);
+   CHECK_LIB(icuin.lib, intl);
+   CHECK_LIB(icuio.lib, intl);
+   CHECK_LIB(icule.lib, intl);
+   CHECK_LIB(iculx.lib, intl);
+
ADD_FLAG(LIBS_INTL, icudt.lib icuin.lib icuio.lib icule.lib 
iculx.lib);
// if int32_t and uint32_t types are made available in PHP, 
uncomment next line
// ADD_FLAG(CFLAGS_INTL, /D U_HAVE_INT32_T /D 
U_HAVE_UINT32_T);

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: Bug 42682 (stream_select() indicates bad number of readable descriptors)

2008-04-16 Thread Jani Taskinen
On Wed, 2008-04-16 at 15:42 +0200, Hans Rakers wrote:
 Anyway, i have good news. I compiled the 5.2.6RC5 snapshot from 
 qa.php.net by hand with the exact same configure rule as the ebuild, and 
 with gcc optimizations at -02, and the issue seems solved. Testcase from 
 the bugreport returns the right result.

Excellent. I was hoping those changes would nuke this bug too. Thanks
for testing!

 Might be something to wrap in a .phpt for the future :)

Yes please, if you have time to do it we'll be happy to add the test.
I'm quite busy at work right now, so..

Cc:'d to internals@ as FYI. :)

--Jani

-- 
Patches/Donations: http://pecl.php.net/~jani/



-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] intl naming

2008-04-16 Thread Stanislav Malyshev

Hi!


Forgot to attach a second for config.w32, to nicely detect the
required libraries.


Why do you think it is necessary to check each lib individually? Those 
libs are distributed together, and unless you mess with your ICU 
install, they should be always found together, so if icuuc.lib is there, 
others should be too.

--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_3) / zend.c zend_execute_API.c zend_vm_def.h zend_vm_execute.h php-src NEWS

2008-04-16 Thread Derick Rethans
On Fri, 11 Apr 2008, Dmitry Stogov wrote:

 Sorry, but I think mainly about PHP performance, and of course I didn't know
 that you trace return_values it in xdebug.
 
 After the patch, in case if return value is not used we set
 EG(return_value_ptr_ptr) to NULL before call to nested execute().
 I assume you can just check for (EG(return_value_ptr_ptr)==NULL) before write
 it. Will it work for you?

I'm already doing that, so not went really wrong. I am just wondering 
whether it would be possible to always have those return values there 
through some kind of option.

regards,
Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] intl naming

2008-04-16 Thread Stanislav Malyshev

Please find a patch as attachment, fixing some bad #ifdef. This test
should be in the main intl header, imo.


Applied, thanks.
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] intl naming

2008-04-16 Thread Elizabeth M Smith
Stanislav Malyshev wrote:
 Hi!
 
 Forgot to attach a second for config.w32, to nicely detect the
 required libraries.
 
 Why do you think it is necessary to check each lib individually? Those
 libs are distributed together, and unless you mess with your ICU
 install, they should be always found together, so if icuuc.lib is there,
 others should be too.

Number one rule - assuming anything is very bad especially where
anything windows is involved ;)  Should usually leads to annoying
emails and bogus bugs... As Pierre said it really doesn't hurt anything
to check for them all.

Elizabeth

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Exceptions = Apache Crash in PHP 5.3 Snaps

2008-04-16 Thread Jeremy Privett

Jeremy Privett wrote:

Jeremy Privett wrote:

Hi Scott,

Scott MacVicar wrote:
Can you try a debug build with --enable-debug to get a more detailed 
backtrace.


Also what is the exact configure line and which apache 2 model are 
you using? Worker or Pre-fork?


Scott
On 29 Mar 2008, at 01:12, Jeremy Privett wrote:

Hey list,

I really /really/ hate to cause additional noise on this list, but 
I'm developing software in the PHP 5.3 snapshots with a timeline 
for release around the same time this version of PHP is released. 
We always try to keep current with our snapshots to make sure 
everything still works. My development team has been grinded almost 
to a halt by the fact that any thrown exception in the latest PHP 
5.3 snapshots is causing Apache to crash.


There's already a bug report here: 
http://bugs.php.net/bug.php?id=44226


I know unreleased PHP versions can't be supported, but fundamental 
language functionality was broken. This bug has been open for a 
month. This seems like it would be a critical problem and I'm glad 
Jani had already looked at and responded to the report. This is 
just slowing my team down when the snapshots are generally pretty 
high quality, from my personal experience. If this could be looked 
at further, I would gladly help someone with debugging and testing 
and such, if they'll take a look at the code.


Thanks.

--
Jeremy Privett
C.E.O.  C.S.A.
Omega Vortex Corporation

http://www.omegavortex.net

Please note: This message has been sent with information that could 
be confidential and meant only for the intended recipient. If you 
are not the intended recipient, please delete all copies and inform 
us of the error as soon as possible. Thank you for your cooperation.







I mentioned it in my response to the bug report, but forgot to 
mention it here. I'm just using pre-built Windows Binaries for each. 
I'm on Windows XP Pro with SP2. Using Apache 2.2.8. Not sure what the 
exact Apache model is.


Thanks for looking into this for me.


Hey Scott and list,

I wanted to check on this issue to see if anyone was actively working 
on it and see what I could do to help.


Thanks.



Another week later and still no response. I would hope /someone/ thinks 
this a critical issue and needs to be resolved. Is /anyone/ looking at 
this at all?


Thanks.

--
Jeremy Privett
C.E.O.  C.S.A.
Omega Vortex Corporation

http://www.omegavortex.net

Please note: This message has been sent with information that could be 
confidential and meant only for the intended recipient. If you are not the 
intended recipient, please delete all copies and inform us of the error as soon 
as possible. Thank you for your cooperation.



Re: [PHP-DEV] Exceptions = Apache Crash in PHP 5.3 Snaps

2008-04-16 Thread Scott MacVicar

Jeremy Privett wrote:


Another week later and still no response. I would hope /someone/ thinks 
this a critical issue and needs to be resolved. Is /anyone/ looking at 
this at all?


Thanks.

The line that is crashing was last changed by Dmitry on January 24th, 
see http://php.markmail.org/message/7egzhpab6reff7lj


I can't see any errors with valgrind.

Any idea Dmitry?

Scott

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Exceptions = Apache Crash in PHP 5.3 Snaps

2008-04-16 Thread Jeremy Privett

Scott MacVicar wrote:

Jeremy Privett wrote:


Another week later and still no response. I would hope /someone/ 
thinks this a critical issue and needs to be resolved. Is /anyone/ 
looking at this at all?


Thanks.

The line that is crashing was last changed by Dmitry on January 24th, 
see http://php.markmail.org/message/7egzhpab6reff7lj


I can't see any errors with valgrind.

Any idea Dmitry?

Scott



Thank you, Scott.

The problem only seems to occur in Apache. Trying to reproduce in CLI or 
in IIS using ISAPI results in no problems. I've tested from Apace 2.2 
all the way back to Apache 1.3.39 and get the same result. I can have a 
friend of mine test the issue in Linux to make sure it's not just a 
Windows issue. I'll get back to you about that.


--
Jeremy Privett
C.E.O.  C.S.A.
Omega Vortex Corporation

http://www.omegavortex.net

Please note: This message has been sent with information that could be 
confidential and meant only for the intended recipient. If you are not the 
intended recipient, please delete all copies and inform us of the error as soon 
as possible. Thank you for your cooperation.


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] CVS Account Request: thierry

2008-04-16 Thread Pierre Joye
hi,

On Wed, Apr 16, 2008 at 12:07 AM, Thierry FOURNIER
[EMAIL PROTECTED] wrote:
 I want to maintain the PECL package FAM. You can see this link: 
 http://news.php.net/php.pecl.dev/5377
  I want acces to php-src/ext/fam repository.

Confirmed (for pecl/fam actually). I can give him the karma as soon as
his request has been approved.

Cheers,
-- 
Pierre
http://blog.thepimp.net | http://www.libgd.org

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] CVS Account Request: thierry

2008-04-16 Thread Thierry
ack

 hi,

 On Wed, Apr 16, 2008 at 12:07 AM, Thierry FOURNIER
 [EMAIL PROTECTED] wrote:
 I want to maintain the PECL package FAM. You can see this link:
 http://news.php.net/php.pecl.dev/5377
  I want acces to php-src/ext/fam repository.

 Confirmed (for pecl/fam actually). I can give him the karma as soon as
 his request has been approved.

 Cheers,
 --
 Pierre
 http://blog.thepimp.net | http://www.libgd.org




-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Exceptions = Apache Crash in PHP 5.3 Snaps

2008-04-16 Thread Richard Quadling
On 16/04/2008, Jeremy Privett [EMAIL PROTECTED] wrote:
  The problem only seems to occur in Apache. Trying to reproduce in CLI or in
 IIS using ISAPI results in no problems. I've tested from Apace 2.2 all the
 way back to Apache 1.3.39 and get the same result. I can have a friend of
 mine test the issue in Linux to make sure it's not just a Windows issue.
 I'll get back to you about that.

I get the problem with Sambar Server V7.0 using ISAPI.

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
Standing on the shoulders of some very clever giants!

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] [RFC] Type hints (parameter and return value)

2008-04-16 Thread Felipe Pena
Hello again!

Now with both parameter and return value type hints.

For parameter type hints, i have completed the actual implementation
with the leftover php types:
- string (binary string and unicode)
- integer (accepting numeric string too)
- double (accepting numeric string too)
- boolean ('0', '1', true, false)
- resource
- object

(Yes, following our dynamic typing)


Since then, the patch also includes new methods to Reflection:
- isInt()
- isDouble()
- isBool()
- isString()
- isObject()
- isResource()


And for return value, i have modified and improved the previous patch,
and now it is using only the (type) notation. Hence, that
implementation doesn't make any BC break.


Examples, patches and tests: http://wiki.php.net/rfc/typehint


Thanks.

-- 
Regards,
Felipe Pena.


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php