<?php
class toyota extends car {
protected function drive() {
echo "drive\n";
}
protected function dobreak() {
echo "break\n";
}
}
class car {
public function __call($name, $args)
{
$this->pre();
}
}
function pre() {
echo "pre\n";
}
}
$car = new toyota();
$car->drive();
$car->dobreak();
PD9waHAKCmNsYXNzIHRveW90YSBleHRlbmRzIGNhciB7CiAgICBwcm90ZWN0ZWQgZnVuY3Rpb24gZHJpdmUoKSB7CiAgICAgICAgZWNobyAiZHJpdmVcbiI7CiAgICB9CiAgICBwcm90ZWN0ZWQgZnVuY3Rpb24gZG9icmVhaygpIHsKICAgICAgICBlY2hvICJicmVha1xuIjsKICAgIH0KfQoKY2xhc3MgY2FyIHsKICAgIHB1YmxpYyBmdW5jdGlvbiBfX2NhbGwoJG5hbWUsICRhcmdzKQogICAgewogICAgICAgIGlmIChtZXRob2RfZXhpc3RzKCR0aGlzLCAkbmFtZSkpIHsKICAgICAgICAgICAgJHRoaXMtPnByZSgpOwogICAgICAgICAgICByZXR1cm4gY2FsbF91c2VyX2Z1bmNfYXJyYXkoYXJyYXkoJHRoaXMsICRuYW1lKSwgJGFyZ3MpOwogICAgICAgIH0KICAgIH0KCiAgICBmdW5jdGlvbiBwcmUoKSB7CiAgICAgICAgZWNobyAicHJlXG4iOwogICAgfQp9CgokY2FyID0gbmV3IHRveW90YSgpOwokY2FyLT5kcml2ZSgpOwokY2FyLT5kb2JyZWFrKCk7