[Phpmyadmin-devel] #4536 - master: import problem (PMA_String)

Chirayu Chiripal chirayu.chiripal at gmail.com
Wed Sep 24 13:55:07 CEST 2014


Hi,

On Wed, Sep 24, 2014 at 5:13 PM, Marc Delisle <marc at infomarc.info> wrote:

> Hugues Peccatte a écrit :
> > 2014-09-23 20:04 GMT+02:00 Marc Delisle <marc at infomarc.info>:
> >
> >> Hugues Peccatte a écrit :
> >>> 2014-09-23 16:23 GMT+02:00 Marc Delisle <marc at infomarc.info>:
> >>>
> >>> That's it. Instead of using $pmaString->strlen or strlen, we could
> >> imagine
> >>> to use pmaStrlen and this function would call strlen or mb_strlen if
> mb_*
> >>> functions exist.
> >>> Another way could be to overwrite strlen with mb_strlen, but we
> wouldn't
> >> be
> >>> able to use the original strlen if needed. So I think that we should
> >> define
> >>> new functions.
> >> What I don't like is that we would have two different syntaxes to call
> >> string functions. We would need comments in the calling code to explain
> >> why we are using a way and not another way.
> >>
> >>> I'll try to do a mass replacement and check if the execution time is
> >> better.
> >>> Hugues.
> >> --
> >> Marc Delisle (phpMyAdmin)
> >>
> >
> > If by "two ways", you think about PMA_String and pmaStr* functions, there
> > should be a misunderstanding. I don't want to keep PMA_String (at least,
> > not for string functions), I'd like to migrate it into functions. Here, I
> > kept it not to break anything, just to check performance.
> > If you think about pmaStr* functions and standard PHP functions, I don't
> > think this is a real issue, because we use PMA string object almost
> > everywhere today, so it would be replaced by function calls.
> >
> > Hugues.
>
> I believe it's a good idea to use just functions, but other developers
> might think otherwise.
>

In that case, how will function decide whether to use mb_* function or
simple one? What if we use static methods?


>
> --
> Marc Delisle (phpMyAdmin)
>
>
-- 
Regards,
Chirayu Chiripal
https://chirayuchiripal.wordpress.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20140924/1775444b/attachment.html>


More information about the Developers mailing list