testcustomer.php
来自「Professional PHP5 code for this book」· PHP 代码 · 共 23 行
PHP
23 行
<?php require_once('class.SweepstakesCustomer.php'); //since this file already includes class.Customer.php, there's //no need to pull that file in, as well. function greetCustomer(Customer $objCust) { print "Welcome back to the store $objCust->name!"; } //Change this value to change the class used to create this customer object $promotionCurrentlyRunning = true; if ($promotionCurrentlyRunning) { $objCust = new SweepstakesCustomer(12345); } else { $objCust = new Customer(12345); } greetCustomer($objCust); ?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?