PHP code example of granam / strict-object

1. Go to this page and download the library: Download granam/strict-object library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

granam / strict-object example snippets


use Granam\StrictObject\StrictObject;

class Foo extends StrictObject {

    public $everythingOk = true;
    // body
}

// test.php
$foo = new Foo();

if (!$foo->everythinkOk) {
    // Did you noticed the typo? Maybe not, but StrictObject will!
}