ReflectionClass::getEndLine

(PHP 5, PHP 7, PHP 8)

ReflectionClass::getEndLine獲取最后一行的行數

說明

public ReflectionClass::getEndLine(): int

從用戶定義的類獲取其最后一行的行數。

參數

此函數沒有參數。

返回值

返回用戶定義的類最后一行的行數,如果未知則返回 false

范例

示例 #1 ReflectionClass::getEndLine() 例子

<?php
// Test Class
class TestClass { }

$rc = new ReflectionClass('TestClass');

echo 
$rc->getEndLine();
?>

以上例程會輸出:

3

參見