Re: [PHP-DEV] mysqli_fetch_field() mysqlnd & libmysql differences

2012-02-21 Thread Johannes Schlüter
On Fri, 2012-02-17 at 08:38 -0500, Daniel Convissor wrote: > > A related problem was found by the test script. libmysql is completely > > ignoring the character set information in my.cnf. Plus, if one forces a > > character set by calling options(SET NAMES utf8) before connecting, > > character_s

[PHP-DEV] file_get_contents from HTTPS on Slackware 13.1

2012-02-21 Thread Bostjan Skufca
Hi all, we've bumped into a possible bug where file_get_contents() returns empty string if we try to get contents from HTTPS source. This error only occurs if PHP is compiled with --with-curlwrappers. Funny thing is this only happens on slackware 13.1, but not on 13.0 or older. I've checked ./con

Re: [PHP-DEV] file_get_contents from HTTPS on Slackware 13.1

2012-02-21 Thread Ángel González
On 21/02/12 15:54, Bostjan Skufca wrote: > Hi all, > > we've bumped into a possible bug where file_get_contents() returns empty > string if we try to get contents from HTTPS source. This error only occurs > if PHP is compiled with --with-curlwrappers. > > Funny thing is this only happens on slackwa

[PHP-DEV] Exceptions for method on non-object rather than fatal (desired feature?)

2012-02-21 Thread Ralf Lang
Hi list, I am aware this question might have been discussed to death but I did some googling on $subject and watched the bug/feature tracker and it seems most entries on this issue are old and unanswered. Is there a design decision or hard-to-overcome engine limitation which prevents turning

Re: [PHP-DEV] Exceptions for method on non-object rather than fatal (desired feature?)

2012-02-21 Thread Ralf Lang
Am 21.02.2012 16:55, schrieb Martin Amps: Could you not implement such functionality within your class as follows: class Family { public function getMother() { if ($this->hasMother()) return $someObj; else th

Re: [PHP-DEV] Exceptions for method on non-object rather than fatal (desired feature?)

2012-02-21 Thread Kalle Sommer Nielsen
Hi Ralk 2012/2/21 Ralf Lang : > Am 21.02.2012 16:55, schrieb Martin Amps: > of course there is always a way to script around issues rather than > adressing them. I just want to know if the change would be desired. I have > code around which does exactly this, check on all levels of all possible >

Re: [PHP-DEV] Exceptions for method on non-object rather than fatal (desired feature?)

2012-02-21 Thread Ralf Lang
I see no reason why it would be not desirable to have PHP raise the exception rather than putting more or less repeating code snippets all around the place. That is why I am asking. This topic have been raised many many times (Turning errors into Exceptions). What's the result? Should we do it

Re: [PHP-DEV] file_get_contents from HTTPS on Slackware 13.1

2012-02-21 Thread Rasmus Lerdorf
On 02/21/2012 06:54 AM, Bostjan Skufca wrote: > Hi all, > > we've bumped into a possible bug where file_get_contents() returns empty > string if we try to get contents from HTTPS source. This error only occurs > if PHP is compiled with --with-curlwrappers. > > Funny thing is this only happens on

Re: [PHP-DEV] Exceptions for method on non-object rather than fatal (desired feature?)

2012-02-21 Thread Kalle Sommer Nielsen
2012/2/21 Ralf Lang : >>> I see no reason why it would be not desirable to have PHP raise the >>> exception rather than putting more or less repeating code snippets all >>> around the place. That is why I am asking. >> >> >> This topic have been raised many many times (Turning errors into >> Except

Re: [PHP-DEV] Exceptions for method on non-object rather than fatal (desired feature?)

2012-02-21 Thread Ángel González
On 21/02/12 17:06, Ralf Lang wrote: > Am 21.02.2012 16:55, schrieb Martin Amps: >> Could you not implement such functionality within your class as follows: >> >> class Family { >> public function getMother() { >> if ($this->hasMother()) >> return $someObj; >> else >>

Re: [PHP-DEV] Exceptions for method on non-object rather than fatal (desired feature?)

2012-02-21 Thread Ralf Lang
I see no reason why it would be not desirable to have PHP raise the exception rather than putting more or less repeating code snippets all around the place. That is why I am asking. You must be returning false/null somewhere. It's the same effor to instead throw an exception or to return a Ghost

Re: [PHP-DEV] Exceptions for method on non-object rather than fatal (desired feature?)

2012-02-21 Thread Ángel González
On 21/02/12 19:03, Ralf Lang wrote: >>> I see no reason why it would be not desirable to have PHP raise the >>> exception rather than putting more or less repeating code snippets all >>> around the place. That is why I am asking. >> >> You must be returning false/null somewhere. It's the same effor

Re: [PHP-DEV] file_get_contents from HTTPS on Slackware 13.1

2012-02-21 Thread Bostjan Skufca
Weird. Curl is consistent. It does not work (in this case) without -k (--insecure) option or explicitly setting ca-bundle on all OS versions. Thanks for pointers, will remove --with-curlwrappers (marked experimental) from my PHP configure line. BTW what is the plan with --with-curlwrappers? Will

Re: [PHP-DEV] Exceptions for method on non-object rather than fatal (desired feature?)

2012-02-21 Thread Tjerk Meesters
On 22 Feb, 2012, at 2:03 AM, Ralf Lang wrote: >>> I see no reason why it would be not desirable to have PHP raise the >>> exception rather than putting more or less repeating code snippets all >>> around the place. That is why I am asking. >> >> You must be returning false/null somewhere. It's t

[PHP-DEV] Re: Exceptions for method on non-object rather than fatal (desired feature?)

2012-02-21 Thread Flavius Aspra
On 02/21/2012 03:18 PM, Ralf Lang wrote: In PHP I would rather do $mother = $baby->getMother(); if ($mother) { $granny = $mother->getMother(); if ($granny) { $granny_name = $granny->getName(); } } because I have no way to catch if $mother or $granny cannot be retr

[PHP-DEV] [RFC] Enum proposal (yet another)

2012-02-21 Thread Samuel Deal
Hi all, I really missed enums in PHP, So after reading I tryed to synthetise the various views. You can find a draft here : https://github.com/SamNrique/php-src/wiki/RFC-draft (I can't write on the wiki, and perhaps it's better to finish the discussion first) There's an implementation with this

Re: [PHP-DEV] [RFC] Enum proposal (yet another)

2012-02-21 Thread Laruence
On Wed, Feb 22, 2012 at 12:45 PM, Samuel Deal wrote: > Hi all, > > I really missed enums in PHP, Why? we have class constant. thanks > So after reading I tryed to synthetise the various views. > > You can find a draft here : > https://github.com/SamNrique/php-src/wiki/RFC-draft > (I can't write o

Re: [PHP-DEV] PHP Script Compile System

2012-02-21 Thread Flavius Aspra
On 02/22/2012 06:49 AM, Deepak Balani wrote: Hello all, I am think(actually drafting) about the compilation system of PHP scripts. I want to make a native C extension which is able to compile the scripts in the Zend Engines opcodes and execute directly when called. The extension may have two fu

Re: [PHP-DEV] [RFC] Enum proposal (yet another)

2012-02-21 Thread Charlie Somerville
Right, but enums could possibly be a lot richer than class constants are now. They could be a type where the only values are what's defined in the enum. This could be used with type hinting: enum Foo { A, B, C } function bar(Foo $x) { // ... } The

Re: [PHP-DEV] PHP Script Compile System

2012-02-21 Thread Deepak Balani
No I mean persistent compilation system like Java HelloWorld.Java -> HelloWorld.class HelloWorld.php -> HelloWorld.gpc When you call gpc_import('HelloWorld.php'); then function first look for HelloWorld.gpc if found then include it and if not then look for HelloWorld.php or HelloWorld.inc (w

RE: [PHP-DEV] PHP Script Compile System

2012-02-21 Thread John Crenshaw
> -Original Message- > From: Deepak Balani [mailto:wgpdeepak1...@gmail.com] > Sent: Wednesday, February 22, 2012 1:07 AM > To: flav...@php.net > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] PHP Script Compile System > > No I mean persistent compilation system like > > Java > > Hell

Re: [PHP-DEV] PHP Script Compile System

2012-02-21 Thread Rasmus Lerdorf
On 02/21/2012 10:16 PM, John Crenshaw wrote: >> -Original Message- >> From: Deepak Balani [mailto:wgpdeepak1...@gmail.com] >> Sent: Wednesday, February 22, 2012 1:07 AM >> To: flav...@php.net >> Cc: internals@lists.php.net >> Subject: Re: [PHP-DEV] PHP Script Compile System >> >> No I mean

Re: [PHP-DEV] PHP Script Compile System

2012-02-21 Thread Stas Malyshev
Hi! I am think(actually drafting) about the compilation system of PHP scripts. I want to make a native C extension which is able to compile the scripts in the Zend Engines opcodes and execute directly when called. The extension may have two functions. bool gpc_compile($source, $target): compil