Reputation: 40717
Maybe I am not understanding the rename_function(); function or it's use correctly.
Here is my first experimentation with this function:
<?php
rename_function('count', 'contar');
$var = array(
"one",
"two",
"three"
);
$number = contar($var);
echo $number;
?>
As you can see here it doesn't work
When I use it in MAMP Chrome gives me this error:
Server error.
The website encountered an error while retrieving
http://localhost:8888/translate.php
. It may be down for maintenance or configured incorrectly.
Any ideas why this could be?
Thanks in advance!
BTW: sorry if it is an absolute basic question but I can't figure it out!
Upvotes: 5
Views: 2790
Reputation: 8575
you need to install pecl package apd https://www.php.net/manual/en/book.apd.php
Upvotes: 1