<?php
class Class1
{
public $property1;
public $property2;
public function __construct
(array $values = array("property1" => "", "property2" => "")) {
foreach ($this as $property => $value) {
$this->$property = $values[$property];
}
}
}
?>
PD9waHAKY2xhc3MgQ2xhc3MxCnsKICAgIHB1YmxpYyAkcHJvcGVydHkxOwogICAgcHVibGljICRwcm9wZXJ0eTI7CiAKICAgIHB1YmxpYyBmdW5jdGlvbiBfX2NvbnN0cnVjdChhcnJheSAkdmFsdWVzID0gYXJyYXkoInByb3BlcnR5MSIgPT4gIiIsICJwcm9wZXJ0eTIiID0+ICIiKSkKICAgIHsKICAgICAgICBmb3JlYWNoICgkdGhpcyBhcyAkcHJvcGVydHkgPT4gJHZhbHVlKSB7CiAgICAgICAgICAgICR0aGlzLT4kcHJvcGVydHkgPSAkdmFsdWVzWyRwcm9wZXJ0eV07CiAgICAgICAgfQogICAgfQogfQo/Pg==