so big OOP test

This commit is contained in:
3x0k1d 2025-05-05 07:24:53 +03:00
parent 4dcf124c81
commit d6e117d66d
3 changed files with 21 additions and 4 deletions

14
checkers/baseModule.php Normal file
View File

@ -0,0 +1,14 @@
<?php
class BaseModule {
public $name ,$description, $usage ;
public function __construct($name,$description,$usage) {
$this->name = $name;
$this->description = $description;
$this->usage = $usage;
}
public function printInfo() {
echo ("<h3> Module name: {$this->name}</h3>");
echo ("<h4> Module description: {$this->description} </h4>");
echo ("<h5> Usage: {$this->usage} </h5>" );
}
}

View File

@ -1,7 +1,10 @@
<?php <?php
echo ('<h3> Module name: igbinary</h3>'); $checker = new BaseModule(
echo ('<h4> Module name: Igbinary is a drop in replacement for the standard PHP serializer. Instead of the time and space consuming textual representation used by PHP\'s serialize(), igbinary stores PHP data structures in a compact binary form. Memory savings are significant when using memcached, APCu, or similar memory based storages for serialized data. The typical reduction in storage requirements are around 50%. The exact percentage depends on the data. </h4>'); "igbinary",
echo ('<p>Original text: test test </p>'); "Module name: Igbinary is a drop in replacement for the standard PHP serializer. Instead of the time and space consuming textual representation used by PHP\'s serialize(), igbinary stores PHP data structures in a compact binary form. Memory savings are significant when using memcached, APCu, or similar memory based storages for serialized data. The typical reduction in storage requirements are around 50%. The exact percentage depends on the data.",
"Original text: test test ");
$checker->printInfo();
$ser = igbinary_serialize(['test','test']); $ser = igbinary_serialize(['test','test']);
echo urlencode($ser), "\n"; echo urlencode($ser), "\n";

View File

@ -40,6 +40,6 @@ for ($i = 0; $i < count($module_list); $i++) {
} }
} }
} }
?>