Jump to content

tulley

New Members
  • Posts

    2
  • Joined

  • Last visited

tulley's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. experienced C++, new to php, question: I am following the tutorial at killerphp, using the following code.. <?php class person { var $name; function __construct($persons_name) { $this->name = $persons_name; } function set_name($new_name) { $this->name = $new_name; } function get_name() { return $this->name; } } ?> and... <?php $stefan = new person("Stefan"); echo "Stefan's full name: " . $stefan->get_name(); ?> The echo statement does not print the name set by the constructor. It works fine when using a set_name() function. What am I missing? I think I'm using version 4.x? of php.
  2. tulley

    php version

    New to php: how does one tell which version is installed?
×
×
  • Create New...