<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 18, 2013 at 2:04 PM, Ayush Chaudhary <span dir="ltr"><<a href="mailto:ayushchd@gmail.com" target="_blank">ayushchd@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div>Hi, 
                </div><div><br></div><div>I was writing some unit tests for the native string functions. However, since some of the functions are declared twice (with different implementations), for e.g., PMA_strlen, PMA_strpos, etc. have different implementations in string_mb.lib.php and string_native.lib.php, it causes phpunit to throw fatal errors of the form "Cannot redeclare function … already declared in …"</div>
<div><br></div><div>Possible solutions could be to use namespaces or to use polymorphism in some way.</div><div><br></div></blockquote><div style>How do you plan to use polymorphism to overcome this? </div><div style>Another way around would be to put these functions into classes and instantiate an object of the correct type.</div>
<div style><br></div><div style>I'd like to know opinion from others as well.</div></div><div><br></div>-- <br>Thanks and Regards,<div><br></div><div>Madhura Jayaratne<br><div><br></div></div>
</div></div>