
PHP
202
Вклад в тег
<?php
class Stp008 {
/**
* Вытащи этот текст проще, че это сделал я
*/
public function get() {
}
}
$reflection = new ReflectionClass('Stp008');
$method = $reflection->getMethod('get');
echo $method->getDocComment();
<?php
function getRows($file) {
$handle = fopen($file, 'rb');
if ($handle === false) {
throw new Exception();
}
while (feof($handle) === false) {
yield fgetcsv($handle);
}
fclose($handle);
}
foreach (getRows('data.csv') as $row) {
print_r($row);
}