(PHP 5 >= 5.1.0)
Exception::getLine — خط ایجاد کننده استثنا را مییابد
شماره خط تولید کننده استثنا را باز میگرداند.
This function has no parameters.
شماره خط تولید کننده استثنا را باز میگرداند.
Example #1 نمونه Exception::getLine()
<?php
try {
throw new Exception("Some error message");
} catch(Exception $e) {
echo "The exception was thrown on line: " . $e->getLine();
}
?>
The above example will output something similar to:
The exception was thrown on line: 3