class ExampleClass { // code } $reflection = new ReflectionClass('ExampleClass'); $startLine = $reflection->getStartLine(); echo "ExampleClass starts at line " . $startLine;In this example, we create a class called ExampleClass and then use ReflectionClass to get the starting line of the class definition. The result will be "ExampleClass starts at line X", where X is the line number where the class definition begins. This code is part of the PHP Standard Library, which is included with all PHP installations.