0

Here is my code:

<?php class Video { protected $_test; } ?>

and when I try to include the file containing this code I've got that error:

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in ../classes/Video.class.php on line 1

What's wrong? I don't understand.

1
  • 1
    Are you sure you're running PHP 5? Commented Dec 27, 2010 at 20:16

1 Answer 1

3

This looks like you're still running PHP 4, which doesn't know the protected keyword.

An update to PHP 5 would be a good idea.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.