PHP Classes

odd style

Recommend this page to a friend!

      My simple Query Language Class for MySQL & MySQLi(Improved)  >  All threads  >  odd style  >  (Un) Subscribe thread alerts  
Subject:odd style
Summary:odd, inefficient and unsafe
Messages:1
Author:rudie dirkx
Date:2010-10-27 16:29:36
 

  1. odd style   Reply   Report abuse  
Picture of rudie dirkx rudie dirkx - 2010-10-27 16:29:36
What's up with this:

$arg_list = func_get_args();
$table_name = $arg_list[0];
$field = $arg_list[1];
$where = $arg_list[2];

They invented named arguments for that. Also, like this there's no control over the number of arguments. You could call the function like:

$obj->method();

and it would result in three notices (indices 0 - 2).

Any reason?