Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using rename_function() in PHP (Not working)

Tags:

function

php

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!

like image 279
Trufa Avatar asked Dec 06 '10 20:12

Trufa


1 Answers

The APD package is not installed for your PHP configuration.

like image 57
Pentium10 Avatar answered Sep 26 '22 15:09

Pentium10