so big OOP test
This commit is contained in:
parent
4dcf124c81
commit
d6e117d66d
14
checkers/baseModule.php
Normal file
14
checkers/baseModule.php
Normal 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>" );
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user