From 67ed310eee995d19c05ea472e7f927c444c66b7b Mon Sep 17 00:00:00 2001 From: Alexander Lisachenko Date: Tue, 26 Mar 2024 19:50:29 +0200 Subject: [PATCH] Remove deprecated ReflectionFunction->isDisabled() call --- demos/Demo/Highlighter.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/demos/Demo/Highlighter.php b/demos/Demo/Highlighter.php index 233541aa..69dcb88e 100644 --- a/demos/Demo/Highlighter.php +++ b/demos/Demo/Highlighter.php @@ -12,8 +12,6 @@ namespace Demo; -use ReflectionFunction; - /** * Highlighter utility class */ @@ -21,13 +19,10 @@ final class Highlighter { /** * Highlighter with built-in check for list of disabled function (Google AppEngine) - * - * @param string $file Name of the file */ public static function highlight(string $file): void { - $highlightFileFunc = new ReflectionFunction('highlight_file'); - if (!$highlightFileFunc->isDisabled()) { + if (function_exists('highlight_file')) { highlight_file($file); } else { echo '
' . htmlspecialchars(file_get_contents($file)) . '
';