From 26f88e043ebedcadd337011ce527f6148350f0dc Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Wed, 31 Oct 2018 15:28:37 +0100 Subject: homemade very root database engine --- public/test.php | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) (limited to 'public/test.php') diff --git a/public/test.php b/public/test.php index 7af0a01..35c8575 100644 --- a/public/test.php +++ b/public/test.php @@ -1,15 +1,40 @@ 'rr']); +$art->reset(); +$art->hydrate((['description' => 'fdsfs', 'secure' => 0])); + +var_dump($art); + +$artencoded = json_encode($art); + +var_dump($artencoded); + +class Person { - static $count = 0; + public $id; + public $name; + public $table = ['coucou', 'lol', 'chouette']; + public $date; - $count++; - echo $count; - if ($count < 10) { - test(); + public function __construct(array $data) + { + $this->id = $data['id']; + $this->name = $data['name']; + $this->date = new DateTimeImmutable(); } - $count--; } -test(); +$person = new Person(array('id' => 1, 'name' => 'Amir')); +$jsonperson = json_encode($person); + +var_dump($jsonperson); + +var_dump(json_decode($jsonperson)); + + + ?> \ No newline at end of file -- cgit v1.2.3