ReflectionType::__toString

(PHP 7)

ReflectionType::__toStringTo string

Uyarı

Bu işlevin kullanımı PHP 7.1.0 itibariyle ÖNERİLMEMEKTEDİR. Bu işleve kesinlikle güvenilmemelidir.

Açıklama

public ReflectionType::__toString ( ) : string

Gets the parameter type name.

Değiştirgeler

Bu işlevin değiştirgesi yoktur.

Dönen Değerler

Returns the type of the parameter.

Örnekler

Örnek 1 ReflectionType::__toString() example

<?php
function someFunction(string $param) {}

$reflectionFunc = new ReflectionFunction('someFunction');
$reflectionParam $reflectionFunc->getParameters()[0];

echo 
$reflectionParam->getType();

Yukarıdaki örnek şuna benzer bir çıktı üretir:

string

Sürüm Bilgisi

Sürüm: Açıklama
7.1.0 ReflectionType::__toString() has been deprecated.

Ayrıca Bakınız