Here's my problem: For reasons of debug
I decided to create a function that would return me a% formatted format without the need for a gambiarra (ie , without creating the print_r
. That way, I would transform this:
<?php
echo "<pre>";
print_r($array);
echo "</pre>";
?>
In this:
<?php printr($array); //onde a função *printr* foi criada por mim. ?>
But ... For me that was not enough, I wanted to have two methods <pre>/<pre>
: one that only received one parameter and actually printed on the screen; another one that received two parameters, where one wrote a message like System Debug , and another that printed printr
the way it wanted.
Here's how I ask myself, how do I do this, knowing that PHP does not allow me to create two methods with the same name?