Perhaps I do not understand the rename_function () function ; or uses it correctly.
Here are my first experiments with this feature:
<?php
rename_function('count', 'contar');
$var = array(
"one",
"two",
"three"
);
$number = contar($var);
echo $number;
?>
As you can see here , it does not work
When I use it in MAMP Chrome gives me this error:
Server error.
An error occurred while receiving the website http://localhost:8888/translate.php. It may be unavailable for maintenance or incorrectly configured.
Any ideas why this could be?
Thanks in advance!
By the way: sorry if this is an absolute basic question, but I can't figure it out!
source
share