Re: [PHP] Functions/methods aliases in PHp 5.2

2011-05-16 Thread David Harkness
On Sun, May 15, 2011 at 3:15 PM, Richard Quadling wrote: > Personally, I would recommend using 1 naming convention and sticking with > it. > I wholeheartedly agree. Multiple method names is not flexibility--it's confusion and an open invitation for bugs. Plus, even with two styles you'll never sa

Re: [PHP] Functions/methods aliases in PHp 5.2

2011-05-15 Thread Richard Quadling
On 15 May 2011 23:06, Andre Polykanine wrote: > Hello Richard, > >      I'd  like  to  make  a database wrapping class (yet another one, > aha!) as flexible, as possible. > So I'd like to make possible to call, for example, > $db->num_rows($result) >                     and > $db->NumRows($result)

Re: [PHP] Functions/methods aliases in PHp 5.2

2011-05-15 Thread Andre Polykanine
Hello Richard, I'd like to make a database wrapping class (yet another one, aha!) as flexible, as possible. So I'd like to make possible to call, for example, $db->num_rows($result) and $db->NumRows($result) And was just wondering :-). -- With best regards from Ukr

Re: [PHP] Functions/methods aliases in PHp 5.2

2011-05-15 Thread Richard Quadling
On 15 May 2011 21:45, Andre Polykanine wrote: > Hi everyone, > > Is there any possibility to make a method or function alias in PHP? > Yes, I know I can do the following: > > function foo_bar($x) { > // And so we code... > return $result; > } > > function FooBar($x) { > return foo_bar($x) > } > >