Tensorflow as a PHP extension (experimental)
Switch branches/tags
Nothing to show
Clone or download
Latest commit 4203c10 May 18, 2018



The tensile extension for PHP gives you an object-oriented system for utilising Google's Tensorflow Machine Learning (http://tensorflow.org) from within your PHP applications. Still not in fully working state & experimental builds.

Tensorflow 1.8.0 Build Status


The concept of this extension is to expose Tensorflow into PHP directly so you can run rules, training & the Tensorflow engine natively via PHP code. The coding structure replicates my work having SASS compile on the fly as a PHP extension.


  • Build a base test image to test this build process (Travis/Docker)
  • Build a shared library from Tensorflow that can then be wrapped into a PHP / Zend extension.
  • Refactor header classes from SASSPHP to deal with Tensorflow functions, variables & classes.
  • Refactor C/C++ code to allow PHP classes to talk directly / manage Tensorflow once it's wrapped in shared library
  • Build tests
  • Gnomes
  • Profit