So-o defines a functional layer which adds an object-oriented programming model to a structured programming language. Inspired by Smalltalk, fruits of a long practice of Objective C and different Lisp dialects, So-o is complete, simple and light, easy to understand.


So-o has 3 functions: defclass which defines a new class, sendmsg which is systematically used to send a message to a class or an instance, and supersend which runs a method inherited from a superclass. Simply object-oriented!

So-o proposes a standard implementation in several languages. The code in PHP is less than a 1000 lines.

namespace Hello;

require_once 'So-o.php';

defclass('Hello', null, 1, null, null, null, array('hello'));

function i_hello($self) {
    echo 'Hello from So-o!', PHP_EOL;

    return $self;
$ php -a
php > require_once 'Hello.php';
php > $hello=sendmsg($Hello, 'new');
php > sendmsg($hello, 'hello');
Hello from So-o!

Example of a complete program written in PHP with So-o : a game of poker.

Read the PHP manual