Repository Analysis

php/php-src

The PHP Interpreter

1.0 Likely human-written View on GitHub
1.0
Adjusted Score
1.0
Raw Score
100%
Time Factor
2026-05-29
Last Push
40,112
Stars
C
Language
1,646,762
Lines of Code
2737
Files
1720
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 11LOW 1709

Pattern Findings

1720 matches across 8 categories. Click a row to expand file-level details.

Over-Commented Block1647 hits · 1607 pts
SeverityFileLineSnippet
LOWZend/zend_stream.h81#ifdef _WIN64
LOWZend/zend_virtual_cwd.h21
LOWZend/zend_virtual_cwd.h41# elif PATH_MAX
LOWZend/zend_virtual_cwd.h61#include <errno.h>
LOWZend/zend_virtual_cwd.h81
LOWZend/zend_virtual_cwd.h101# define DT_REG 8
LOWZend/zend_virtual_cwd.h121#ifndef COPY_WHEN_ABSOLUTE
LOWZend/zend_virtual_cwd.h141# define CWD_API __attribute__ ((visibility("default")))
LOWZend/zend_virtual_cwd.h261extern void virtual_cwd_main_cwd_init(uint8_t);
LOWZend/zend_virtual_cwd.h281#define VCWD_RENAME(oldname, newname) virtual_rename(oldname, newname)
LOWZend/zend_virtual_cwd.h301#else
LOWZend/zend_virtual_cwd.h321#define VCWD_OPEN_MODE(path, flags, mode) open(path, flags, mode)
LOWZend/zend_virtual_cwd.h341#ifdef HAVE_UTIME
LOWZend/zend_virtual_cwd.h361#endif
LOWZend/zend_virtual_cwd.h381#define S_ISLNK(mode) (((mode)&S_IFMT) == S_IFLNK)
LOWZend/zend_errors.h21
LOWZend/zend.h21
LOWZend/zend.h41#include "zend_max_execution_timer.h"
LOWZend/zend.h61#define ZEND_TSRMLS_CACHE_UPDATE() TSRMLS_CACHE_UPDATE()
LOWZend/zend.h461#include "zend_object_handlers.h"
LOWZend/zend_portability.h21#define ZEND_PORTABILITY_H
LOWZend/zend_portability.h41#else
LOWZend/zend_portability.h61
LOWZend/zend_portability.h81/* Compatibility with non-clang compilers */
LOWZend/zend_portability.h101# define ZEND_ASSUME(c) do { \
LOWZend/zend_portability.h121# define _ZEND_UNREACHABLE() __builtin_unreachable()
LOWZend/zend_portability.h141#if defined(__GNUC__) && __GNUC__ >= 4
LOWZend/zend_portability.h161
LOWZend/zend_portability.h181# define PHP_RTLD_MODE RTLD_LAZY
LOWZend/zend_portability.h201# endif
LOWZend/zend_portability.h221# ifndef HAVE_ALLOCA_H
LOWZend/zend_portability.h241 do_alloca_ex(size, ZEND_ALLOCA_MAX_SIZE, use_heap)
LOWZend/zend_portability.h261# define ZEND_ATTRIBUTE_ALLOC_SIZE2(X,Y) __attribute__ ((alloc_size(X,Y)))
LOWZend/zend_portability.h281#if ZEND_GCC_VERSION >= 2007 || __has_attribute(format)
LOWZend/zend_portability.h301#if ZEND_GCC_VERSION >= 4003 || __has_attribute(unused)
LOWZend/zend_portability.h321#endif
LOWZend/zend_portability.h341#elif defined(_MSC_VER)
LOWZend/zend_portability.h361# define ZEND_NORETURN __attribute__((noreturn))
LOWZend/zend_portability.h421#else
LOWZend/zend_portability.h441# else
LOWZend/zend_portability.h461#endif
LOWZend/zend_portability.h481# define ZEND_FILE_LINE_CC , ZEND_FILE_LINE_C
LOWZend/zend_portability.h501#if ZEND_DEBUG
LOWZend/zend_portability.h521 (((bits)[(bit) / (sizeof((bits)[0])*8)] >> ((bit) & (sizeof((bits)[0])*8-1))) & 1)
LOWZend/zend_portability.h561#elif defined(HAVE_MEMSET_EXPLICIT)
LOWZend/zend_portability.h581#endif
LOWZend/zend_portability.h601
LOWZend/zend_portability.h621/* Instructions compiled directly. */
LOWZend/zend_portability.h641#else
LOWZend/zend_portability.h661# ifdef HAVE_FUNC_ATTRIBUTE_TARGET
LOWZend/zend_portability.h681# define ZEND_INTRIN_PCLMUL_FUNC_PROTO 1
LOWZend/zend_portability.h701# define ZEND_INTRIN_SSE4_2_PCLMUL_RESOLVER 1
LOWZend/zend_portability.h721
LOWZend/zend_portability.h741#else
LOWZend/zend_portability.h761#else
LOWZend/zend_portability.h781#else
LOWZend/zend_portability.h801
LOWZend/zend_portability.h821
LOWZend/zend_portability.h841#define __ZEND_DO_PRAGMA(x) _Pragma(#x)
LOWZend/zend_portability.h861#define ZEND_CGG_DIAGNOSTIC_IGNORED_START ZEND_DIAGNOSTIC_IGNORED_START
1587 more matches not shown…
Hyper-Verbose Identifiers33 hits · 35 pts
SeverityFileLineSnippet
LOWrun-tests.php3824 private function validateAndProcess(bool $inRedirect): void
LOWrun-tests.php4034 public function calculateCommonSubsequence(array $from, array $to): array
LOWbenchmark/benchmark.php139function extractInstructionsFromValgrindOutput(string $output): string {
LOWZend/zend_observer.h69typedef zend_observer_fcall_handlers (*zend_observer_fcall_init)(zend_execute_data *execute_data);
LOWext/intl/calendar/calendar.stub.php199 public static function getKeywordValuesForLocale(string $keyword, string $locale, bool $onlyCommon): IntlIterator|fa
LOWext/intl/calendar/calendar.stub.php223 public function getMinimalDaysInFirstWeek(): int|false {}
LOWext/intl/calendar/calendar.stub.php229 public function setMinimalDaysInFirstWeek(int $days): true {}
LOWext/intl/calendar/calendar.stub.php247 public function getRepeatedWallTimeOption(): int {}
LOWext/intl/calendar/calendar.stub.php342 public function setRepeatedWallTimeOption(int $option): true {}
LOWext/intl/timezone/timezone.stub.php63 public static function createTimeZoneIDEnumeration(int $type, ?string $region = null, ?int $rawOffset = null): IntlI
LOWext/mysqlnd/mysqlnd_structs.h361typedef func_mysqlnd_vio__open_stream (*func_mysqlnd_vio__get_open_stream)(MYSQLND_VIO * const vio, const MYSQLND_CSTRIN
LOWext/zip/php_zip.stub.php769 public function setExternalAttributesName(string $name, int $opsys, int $attr, int $flags = 0): bool {}
LOWext/zip/php_zip.stub.php772 public function setExternalAttributesIndex(int $index, int $opsys, int $attr, int $flags = 0): bool {}
LOWext/zip/php_zip.stub.php779 public function getExternalAttributesName(string $name, &$opsys, &$attr, int $flags = 0): bool {}
LOWext/zip/php_zip.stub.php786 public function getExternalAttributesIndex(int $index, &$opsys, &$attr, int $flags = 0): bool {}
LOWext/zip/php_zip.stub.php818 public static function isCompressionMethodSupported(int $method, bool $enc = true): bool {}
LOWext/zip/php_zip.stub.php820 public static function isEncryptionMethodSupported(int $method, bool $enc = true): bool {}
LOWext/sqlite3/sqlite3.stub.php236 public function enableExtendedResultCodes(bool $enable = true): bool {}
LOWext/dom/php_dom.stub.php811 public function createProcessingInstruction(string $target, string $data = "") {}
LOWext/dom/php_dom.stub.php921 public function isWhitespaceInElementContent(): bool {}
LOWext/dom/php_dom.stub.php927 public function isElementContentWhitespace(): bool {}
LOWext/dom/php_dom.stub.php1625 public function createProcessingInstruction(string $target, string $data): ProcessingInstruction {}
LOWext/mbstring/ucgendat/ucgendat.php368function parseDerivedCoreProperties(UnicodeData $data, string $input) : void {
LOWext/mbstring/ucgendat/ucgendat.php710function generateEastAsianWidthData(array $wideRanges) {
LOWext/reflection/php_reflection.stub.php90 public function getNumberOfRequiredParameters(): int {}
LOWext/reflection/php_reflection.stub.php372 public function newInstanceWithoutConstructor(): object {}
LOWext/reflection/php_reflection.stub.php387 public function isUninitializedLazyObject(object $object): bool {}
LOWext/reflection/php_reflection.stub.php389 public function markLazyObjectAsInitialized(object $object): object {}
LOWext/reflection/php_reflection.stub.php501 public function setRawValueWithoutLazyInitialization(object $object, mixed $value): void {}
LOWext/reflection/php_reflection.stub.php715 public function getDefaultValueConstantName(): ?string {}
LOWscripts/dev/bless_tests.php96function generateMinimallyDifferingOutput(string $out, string $oldExpect) {
LOW.github/workflows/test-suite.yml567 php -r '$c = file_get_contents("src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerCustomTest.php"); $c =
LOW.github/workflows/test-suite.yml569 php -r '$c = file_get_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php"); $c = str_rep
Decorative Section Separators11 hits · 33 pts
SeverityFileLineSnippet
MEDIUMext/standard/html_tables/mappings/ROMAN.TXT1#=======================================================================
MEDIUMext/standard/html_tables/mappings/ROMAN.TXT36# ----------------
MEDIUMext/standard/html_tables/mappings/ROMAN.TXT80# ----------------------
MEDIUMext/standard/html_tables/mappings/ROMAN.TXT121# ---------------------------------
MEDIUMext/standard/html_tables/mappings/ROMAN.TXT133# -------------------------------------------
MEDIUMext/mbstring/tests/data/EmojiSources.txt30# ================================================
MEDIUMext/mbstring/tests/data/MacJapanese-SJIS.txt1#=======================================================================
MEDIUMext/mbstring/tests/data/MacJapanese-SJIS.txt38# ----------------
MEDIUMext/mbstring/tests/data/MacJapanese-SJIS.txt86# -------------------------
MEDIUMext/mbstring/tests/data/MacJapanese-SJIS.txt241# ---------------------------------
MEDIUMext/mbstring/tests/data/MacJapanese-SJIS.txt328# -------------------------------------------
Fake / Example Data10 hits · 12 pts
SeverityFileLineSnippet
LOWext/zend_test/test_arginfo.h393 ZEND_RAW_FENTRY("zend_test_nullable_array_return", zif_zend_test_nullable_array_return, arginfo_zend_test_nullable_arra
LOWext/zend_test/test_arginfo.h716 zend_string *const_DUMMY_comment = zend_string_init_interned("/**\n * \"Lorem ipsum\"\n * @see https://
LOWext/zend_test/test_arginfo.h1122 class_entry->doc_comment = zend_string_init_interned("/**\n * \"Lorem ipsum\"\n * @see https://www.php.net\n
LOWext/zend_test/test_arginfo.h1128 zend_string *property_parameter_comment = zend_string_init_interned("/**\n * \"Lorem ipsum\"\n * @see h
LOWext/zend_test/test_legacy_arginfo.h591 zend_string *const_DUMMY_comment = zend_string_init_interned("/**\n * \"Lorem ipsum\"\n * @see https://
LOWext/zend_test/test_legacy_arginfo.h893 zend_string *property_parameter_comment = zend_string_init_interned("/**\n * \"Lorem ipsum\"\n * @see h
LOWext/zend_test/test.stub.php31 * "Lorem ipsum"
LOWext/zend_test/test.stub.php149 * "Lorem ipsum"
LOWext/zend_test/test.stub.php156 * "Lorem ipsum"
LOWext/zend_test/test.stub.php224 * "Lorem ipsum"
Verbosity Indicators6 hits · 9 pts
SeverityFileLineSnippet
LOWext/bcmath/libbcmath/src/zero.c36/* In some places we need to check if the number NUM is zero. */
LOWext/bcmath/libbcmath/src/neg.c35/* In some places we need to check if the number is negative. */
LOWext/bcmath/libbcmath/src/nearzero.c36/* In some places we need to check if the number NUM is almost zero.
LOWext/mbstring/php_unicode.c365 * Specifically, we need to check if this codepoint is preceded by any
LOWext/reflection/php_reflection.c3712 /* we need to check if the ctor is the ctor of the class level we we
LOWmain/streams/plain_wrapper.c1210 * cache is initialized so we need to check if the execution is active. */
Deep Nesting9 hits · 9 pts
SeverityFileLineSnippet
LOWscripts/gdb/php_gdb.py107
LOWscripts/gdb/php_gdb.py173
LOWscripts/gdb/php_gdb.py256
LOWscripts/gdb/php_gdb.py295
LOWscripts/gdb/php_gdb.py431
LOWscripts/gdb/php_gdb.py528
LOWscripts/gdb/php_gdb.py778
LOWscripts/gdb/php_gdb.py823
LOWscripts/gdb/php_gdb.py882
Slop Phrases3 hits · 4 pts
SeverityFileLineSnippet
LOWext/ext_skel.php56 Don't forget to run tests once the compilation is done:
LOWext/standard/basic_functions.c202 /* don't forget to reset the various libc globals that
LOWwin32/sendmail.c518 Just don't forget to remove the Bcc: from the header afterwards. */
Unused Imports1 hit · 1 pts
SeverityFileLineSnippet
LOWscripts/gdb/php_gdb.py34