Skip to content

Instantly share code, notes, and snippets.

@kocsismate
Created April 27, 2023 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kocsismate/4592eecdd7ad82e0d00e49e5514d32eb to your computer and use it in GitHub Desktop.
Save kocsismate/4592eecdd7ad82e0d00e49e5514d32eb to your computer and use it in GitHub Desktop.
Calling FFI::cast(), FFI::new(), FFI::type() statically
Targets
Occurrences of '(FFI\s*::cast\s*\(|FFI\s*::\s*new\(|FFI\s*::\s*type\()' in Directory popular-package-analysis/sources with mask '*.php'
popular-package-analysis (5 usages found)
sources/amphp/hpack/src/Internal (5 usages found)
HPackNghttp2.php (5 usages found)
97 $buffer = FFI::new(FFI::arrayType(self::$uint8Type, [$length]));
148 $bufferPtr = FFI::cast(self::$uint8PtrType, $buffer);
220 $pair->name = FFI::cast(self::$uint8PtrType, $nameBuffer);
223 $pair->value = FFI::cast(self::$uint8PtrType, $valueBuffer);
235 $buffer = FFI::new(FFI::arrayType(self::$uint8Type, [$bufferLength]));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment