PHP PHP.net news server web interface
From: Date: Mon Dec 16 15:02:39 2013
Subject: Re: Flexible function naming
References: 1 2 3  Groups: php.internals 
That's a horrible idea Robert, sorry.

You would end up with dozens of different ways to call the same  
function. Plus libraries incompatible without that option set. But I 
will center in a much clearer problem: suppose you need to look up where 
is somefunctiontocheckusername() called. Is it called as 
'somefunctiontocheckusername', 'some_function_to_check_username', 
'some_function_to_check_user_name', 'some_function_to_check_userName', 
'someFunctionToCheckUsername', 'someFunctionToCheckUserName', 
'SomeFunctionToCheckUsername', 'SOMEFUNCTIONTOCHECKUSERNAME', or maybe 
's_o_m_e_f_u_n_c_t_i_o_n_t_o_c_h_e_c_k_u_s_e_r_n_a_m_e' ?

And no, even if you have an über PHP editor which knows how to handle 
it, there are cases when you are in a remote system, remotely connected 
to the server... and loading a full project into a big editor for a 
function search is not practical. While every (decent) editor is able to 
make a case insensitive search.


If you really want to rename core functions in your own system, you can 
do it with runkit... But remember runkit motto: «For all those things 
you.... probably shouldn't have been doing anyway....»


« previous php.internals (#70673) next »

Written by Jim Winstead. no rights reserved. (source code)