PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
was how a class attribute was declared in PHP 4. It has now been superceded in PHP5 by public, private or protected; although var is still treated as a synonym for public.
<?php
var $abc = 10 ; // this is line 2
function test()
{
global $abc;
echo $abc;
}
test();
?>
//it showing following error
//Parse error: parse error in C:\xampp\htdocs\variableTest.php on line 2
// i am using php 5.2.29 version