Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 21st, 2010, 05:01 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Thumbs up calling a parent class method from a child class (Zend Cert)

Hi,

I don't have PHP installed on this machine, but was wondering if anyone could advise on this question that i've came across during my Zend certification preperation.

Q: What is the output of the following script?

PHP Code:
<?php

class {

  public function 
bar() {
    print 
"Hello";
  }

}

class 
extends {

  function 
bar() {
    print 
"Goodbye";
  }
}

$c = new B();
$c->bar();
?>
Gracias,
Picco
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
 
Old July 25th, 2010, 02:08 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

Can anyone confirm?

TIA.
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
 
Old July 30th, 2010, 04:22 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

the output will be Goodbye
__________________
surendran
(Anything is Possible)
http://www.suren.info
http://ssuren.spaces.msn.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
storing session in the database with session_set_save_handler (Zend Cert) crmpicco PHP Databases 0 May 20th, 2010 05:37 PM
improving SQLite write performance with PRAGMA (Zend Cert) crmpicco PHP Databases 0 May 20th, 2010 05:33 PM
PHP Design Pattern - interface (from Zend Cert) crmpicco PHP How-To 0 April 21st, 2010 04:52 PM
calling private method from another class jack_3 C# 3 December 16th, 2005 07:56 PM
Calling SubClass attributes from parent class saravananedu Classic ASP Components 1 June 21st, 2004 01:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.