Listing 2681
Submitted by du, 8 February 2010
class normal_person { protected $appearance, $initiative, $value; function normal_person( $appearance = 100, $initiative = 100, $value = 100 ) { $this->appearance = $appearance; $this->initiative = $initiative; $this->value = $value; } } class fat_person extends normal_person { function fat_person( $appearance = 100, $initiative = 100, $value = 100 ) { parent::__construct( ( intval( $appearance ) * 0.77 ), ( intval( $initiative ) * 0.77 ), ( intval( $value ) * 0.77 ) ); } } $fatty = new fat_person( ); var_dump( $fatty );

