You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
335 B

<?php
class father
{
public $var_a = 1;
public function fn_a()
{
var_dump($this);
}
}
class Son extends father
{
public $var_b = 2;
public function fn_b()
{
// var_dump($this);
var_dump(array_keys(get_object_vars($this)));
}
}
$son = new Son();
$son->fn_b();
// $son->fn_a();