All Projects → rask → Php Ffi Examples

rask / Php Ffi Examples

Licence: mit
Runnable examples to learn how PHP FFI works

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Php Ffi Examples

C Cpp Notes
Notes about modern C++, C++11, C++14 and C++17, Boost Libraries, ABI, foreign function interface and reference cards.
Stars: ✭ 363 (+1296.15%)
Mutual labels:  examples, ffi
Ethereum Development With Go Book
📖 A little book on Ethereum Development with Go (golang)
Stars: ✭ 754 (+2800%)
Mutual labels:  examples
Flutterbasicwidgets
ABC of Flutter widgets. Intended for super beginners at Flutter. Play with 35+ examples in DartPad directly and get familiar with various basic widgets in Flutter
Stars: ✭ 609 (+2242.31%)
Mutual labels:  examples
Sciblog support
Support content for my blog
Stars: ✭ 694 (+2569.23%)
Mutual labels:  examples
Debezium Examples
Examples for running Debezium (Configuration, Docker Compose files etc.)
Stars: ✭ 610 (+2246.15%)
Mutual labels:  examples
Cheat.sh
the only cheat sheet you need
Stars: ✭ 27,798 (+106815.38%)
Mutual labels:  examples
Core
MetaCall: The ultimate polyglot programming experience.
Stars: ✭ 596 (+2192.31%)
Mutual labels:  ffi
Rxswiftexamples
Examples and resources for RxSwift.
Stars: ✭ 930 (+3476.92%)
Mutual labels:  examples
Examples
Example projects that demonstrate how to use Expo APIs and integrate Expo with other popular tools
Stars: ✭ 747 (+2773.08%)
Mutual labels:  examples
Py2rs
A quick reference guide for the Pythonista in the process of becoming a Rustacean
Stars: ✭ 690 (+2553.85%)
Mutual labels:  examples
Testing Nestjs
A repository to show off to the community methods of testing NestJS including Unit Tests, Integration Tests, E2E Tests, pipes, filters, interceptors, GraphQL, Mongo, TypeORM, and more!
Stars: ✭ 685 (+2534.62%)
Mutual labels:  examples
Cxx.jl
The Julia C++ Interface
Stars: ✭ 620 (+2284.62%)
Mutual labels:  ffi
Rust Python Example
Example of using Rust to Extend Python
Stars: ✭ 699 (+2588.46%)
Mutual labels:  ffi
Amazon Sagemaker Examples
Example 📓 Jupyter notebooks that demonstrate how to build, train, and deploy machine learning models using 🧠 Amazon SageMaker.
Stars: ✭ 6,346 (+24307.69%)
Mutual labels:  examples
Sense Extension Recipes
A collection of recipes to speed up development of Qlik Sense Visualization Extensions.
Stars: ✭ 17 (-34.62%)
Mutual labels:  examples
Charting Library Examples
Examples of Charting Library integrations with other libraries, frameworks and data transports
Stars: ✭ 608 (+2238.46%)
Mutual labels:  examples
Antons opengl tutorials book
Anton's OpenGL 4 Tutorials book - Demo Code
Stars: ✭ 668 (+2469.23%)
Mutual labels:  examples
Recipes
📁 Examples for 🚀 Fiber
Stars: ✭ 691 (+2557.69%)
Mutual labels:  examples
Haxejs
Documentation about using JavaScript with Haxe
Stars: ✭ 25 (-3.85%)
Mutual labels:  examples
Kotlin Android Examples
💪 [Examples] Isolated applications purely on Kotlin, for all android devs out there
Stars: ✭ 902 (+3369.23%)
Mutual labels:  examples

PHP FFI Examples

FFI is a new feature that ships with PHP 7.4. Previously FFI for PHP was available as a standalone extension, but it has now been included in the main PHP installation.

This repository has examples for various PHP FFI use cases, along with some Rust examples that display how to create PHP FFI compatible C-ABI libraries for PHP usage.

The examples are tied to a blog series which I am writing, and the examples are split into sections that resemble the blog series.

Requirements

All code should be runnable without adjustments, assuming you have the following prerequisites installed:

  • PHP 7.4 with FFI enabled,
  • Stable toolchain rustc/Cargo for compiling Rust libraries, the examples make use of Cargo, but you can use rustc if you know how to use it.

All examples are accompanied with a short guide on how to run or compile them.

The code has been written and tested on Linux Ubuntu, so you may have to make slight adjustments to make them work in other environments properly.

Each example in this repository is a standalone "project", meaning they run independently from each other.

Licensing, modifying, and redistributing

All code provided in this repository is MIT licensed. These examples are meant to be used as a reference or a starting point for real applications. There is no real value in using the example code "as is", though I am not stopping you from doing that.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].