Skip to content

Native PHP extension in C++ to generate a random string.

Notifications You must be signed in to change notification settings

eloyekunle/random_string

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

I sure thought writing a native PHP extension in C++ would make string generation faster for the thousands I'll have to generate periodically in my web service.

Boy, was I wrong. At least I got to write my first PHP extension. :D

Well, here's the source code, tested and working on Ubuntu 17.04. You might have to edit the Makefile to the appropriate PHP extensions location on your computer.

It's based on PHP-CPP You'll have to install PHP-CPP on your server, then download appropriate php-dev tools for your server. This should work just fine on Ubuntu;

sudo apt-get install php7.0-dev

Compiling:

make

Then to install;

sudo make install

Oh, well. What a beautiful day.

Elijah Oyekunle

About

Native PHP extension in C++ to generate a random string.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published