$file = new CFile('path/to/file.jpg'); $extension = $file->getExtension(); echo $extension; // outputs ".jpg"This code creates a new instance of CFile for a file located at "path/to/file.jpg" and calls its getExtension method to get the file extension. The result is then printed to the screen. CFile is part of the Bitrix CMS framework, which is a commercial PHP content management system developed by Bitrix, Inc. Therefore, this code example is specific to the Bitrix platform.