[PHP-DEV] idea: add wrapper support to mysqli_connect

2013-03-13 Thread Thomas Anderson
Instead of passing localhost to mysqli_connect as the $host parameter I think it'd be useful if you could pass something like ssh2.tunnel://user:p...@example.com:22/192.168.0.1:14 to it as well. The main advantage I see of doing that is that you could tunnel through SSH2, through SOCKS, through

Re: [PHP-DEV] idea: add wrapper support to mysqli_connect

2013-03-13 Thread Thomas Anderson
On Wed, Mar 13, 2013 at 3:37 PM, Rasmus Lerdorf ras...@lerdorf.com wrote: On 03/13/2013 12:08 PM, Thomas Anderson wrote: Instead of passing localhost to mysqli_connect as the $host parameter I think it'd be useful if you could pass something like ssh2.tunnel://user:p...@example.com:22

[PHP-DEV] trigger_error() enhancements

2013-04-08 Thread Thomas Anderson
I was thinking it'd be useful if people could switch between throwing exceptions and displaying errors. If throw were a function and not a language construct one could do $function($error) where $function was a string equal to either 'trigger_error' or 'throw'. But alas that's not possible. In

Re: [PHP-DEV] trigger_error() enhancements

2013-04-08 Thread Thomas Anderson
that any uncaught warning would be fatal). On Mon, Apr 8, 2013 at 11:51 PM, Thomas Anderson zeln...@gmail.com wrote: I was thinking it'd be useful if people could switch between throwing exceptions and displaying errors. If throw were a function and not a language construct one could do $function

[PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Thomas Anderson
If you do user_error('whatever') it'll show, as the line number for that error, the line number on which that user_error() call is made. It'd be nice if you could control the line number and file name that was displayed. eg. ?php function test() { user_error('whatever'); } test(); ?

[PHP-DEV] idea: implement a Comparable interface

2013-05-07 Thread Thomas Anderson
It'd be nice if, when doing $objA $objB, that that'd invoke $objA-__compareTo($objB) or something, much like Java's Comparable interface.

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Thomas Anderson
On Tue, May 7, 2013 at 2:04 PM, Sebastian Krebs krebs@gmail.com wrote: 2013/5/7 Thomas Anderson zeln...@gmail.com If you do user_error('whatever') it'll show, as the line number for that error, the line number on which that user_error() call is made. It'd be nice if you could control

Re: [PHP-DEV] idea: implement a Comparable interface

2013-05-07 Thread Thomas Anderson
On Tue, May 7, 2013 at 1:05 PM, Nikita Popov nikita@gmail.com wrote: On Tue, May 7, 2013 at 6:17 PM, Thomas Anderson zeln...@gmail.com wrote: It'd be nice if, when doing $objA $objB, that that'd invoke $objA-__compareTo($objB) or something, much like Java's Comparable interface. Do

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Thomas Anderson
...@gmail.com: On Tue, May 7, 2013 at 6:09 PM, Thomas Anderson zeln...@gmail.com wrote: If you do user_error('whatever') it'll show, as the line number for that error, the line number on which that user_error() call is made. It'd be nice if you could control the line number

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Thomas Anderson
On Tue, May 7, 2013 at 3:14 PM, Stas Malyshev smalys...@sugarcrm.comwrote: Hi! If you do user_error('whatever') it'll show, as the line number for that error, the line number on which that user_error() call is made. It'd be nice if you could control the line number and file name that was

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Thomas Anderson
On Tue, May 7, 2013 at 3:38 PM, Stas Malyshev smalys...@sugarcrm.comwrote: Hi! So the error messages your library produces have the same consistent look and feel to them that PHP's errors do? While it may be nice, I don't think it is worth changing the PHP API for. Error messages have

Re: [PHP-DEV] idea: letting the line number and file name be set via user_error

2013-05-07 Thread Thomas Anderson
On Tue, May 7, 2013 at 4:30 PM, Sebastian Krebs krebs@gmail.com wrote: 2013/5/7 Bob Weinand bobw...@hotmail.com Am 7.5.2013 um 22:11 schrieb Stas Malyshev smalys...@sugarcrm.com: Hi! And today we have the problem that we cannot use in any useful manner trigger_error in