Amethyst Posted August 5, 2009 Report Share Posted August 5, 2009 I am new to OOP and was very pleased to find the tutorials by Stefan. However, I have run into some problems. 1. When creating an object with a constructor, I do not get any value back. // Create an object with a constructor $stefan = new person("Stefan Mischook"); echo " Stefan's full name: " . $stefan->get_name(); The code above just prints out: Stefan's full name: 2. I uploaded Stefan's source code examples and do not get values back from those either. My server also reports errors on the public and protected functions in his code. I have PHP 5.2.5 and I am on a shared server. Does anyone know what the problem might be? Quote Link to comment Share on other sites More sharing options...
Amethyst Posted August 5, 2009 Author Report Share Posted August 5, 2009 (edited) I think there is something wrong with the PHP on the server I was trying to run this on as I have tried on another server with PHP 5.2.8 and it is fine. Thank you for the great tutorial, Stefan! Edited August 5, 2009 by Amethyst Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.