getMethods(ReflectionMethod::IS_PUBLIC); echo "Public methods available:\n"; foreach ($methods as $method) { if (!$method->isConstructor() && !$method->isDestructor()) { echo "- " . $method->getName() . "()\n"; } } echo "\nProperties:\n"; $properties = $reflection->getProperties(); foreach ($properties as $property) { echo "- " . $property->getName() . " (" . ($property->isPublic() ? 'public' : ($property->isProtected() ? 'protected' : 'private')) . ")\n"; } // Check if we can access via array notation echo "\nTesting array access:\n"; try { // This won't work, but let's see what happens echo "ArrayAccess interface: " . (in_array('ArrayAccess', class_implements('Twilio\Base\PhoneNumberCapabilities')) ? 'YES' : 'NO') . "\n"; } catch (Exception $e) { echo "Error: " . $e->getMessage() . "\n"; }