In your example above, the __call() magic method is only invoked for the last line where you attempt to call $myString->strlen(). (And in that case, $arguments would be an empty array since you don't pass in any arguments.)
EDIT: More complete example to show when __call() would be used:
<?php
class Foo
{
public function baz()
{
echo "Nothing to see here...\n\n";
}
private function foobar()
{
echo "You just called a private function!\n\n";
}
public function __call( $methodName, $arguments )
{
echo "You attempted to call the nonexistent/inaccessible method $methodName!\n";
echo "\tArgs: " . implode( ', ', $arguments ) . "\n\n";
}
}
$test = new Foo;
$test->baz( 'Hello', 'World', '!' );
$test->foobar( 'Hello', 'World', '!' );
$test->bar( 'Hello', 'World', '!' );
resulting output:
Nothing to see here...
You attempted to call the nonexistent/inaccessible method foobar!
Args: Hello, World, !
You attempted to call the nonexistent/inaccessible method bar!
Args: Hello, World, !