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 wrote: > 2013/5/7 Bob Weinand > > > > > Am 7.5.2013 um 22:11 schrieb Stas Malyshev : > > > > > Hi! > > > > > >> And today we have the problem that we cannot use in any useful manner > > >> trigger_error in libraries, when we don't know where the er

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 wrote: > 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 very defined api

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 wrote: > 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 > displayed. >

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:49 PM, Sebastian Krebs wrote: > 2013/5/7 Bob Weinand > > > > > Am 7.5.2013 um 21:07 schrieb Sebastian Krebs : > > > > > > > > > > 2013/5/7 Bob Weinand > > > >> > >> Am 7.5.2013 um 18:25 schrieb Fer

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 wrote: > On Tue, May 7, 2013 at 6:17 PM, Thomas Anderson wrote: > >> It'd be nice if, when doing $objA > $objB, that that'd invoke >> $objA->__compareTo($objB) or something, much like Java's Comparable >&

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 wrote: > > > > 2013/5/7 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 >&g

[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.

[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. That'll say "Notice: whatever in ... on line 4" (ie. the line that the

Re: [PHP-DEV] trigger_error() enhancements

2013-04-08 Thread Thomas Anderson
ndler.php > > (Aside for the fact that any uncaught warning would be fatal). > > On Mon, Apr 8, 2013 at 11:51 PM, Thomas Anderson > wrote: > > I was thinking it'd be useful if people could switch between throwing > > exceptions and displaying errors. If throw we

[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 lie

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 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...@exampl

[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 HT