Specifying the datatype is not really needed unless your passing in classes / object but if i was do do that i would create a data type class for each datatype

PHP Code: 
class String implements Multilingual
{
     public 
$value;
     function 
__construct($string)
     {
         
$this->value $string;
     }
     function 
__toString($string)
     {
          return 
$this->value;
     }

     function 
__call($method,$args)
     {
          if(
function_exists($method))
          {
              
$this->value $method($this->value);
          }
          return 
$this;
     }
}
$myString = new String("Hello World");
$myString->trim(); 
PHP Code: 
class Array implements Iterator
{
    
//...methods

Then within my user interfaces i can specifically expect a String or an Array type.