Hello readers, In this blog I will help you to know "What does keyword 'var' do in PHP ?"
It's regarding declaring class new member factors inside PHP4, and it will no longer needed. It'll operate inside PHP5, however it will increase an E_STRICT caution inside PHP coming from type 5. 0. 0 version around type 5. 1 version, now it was deprecated. Given in PHP 5. 3, var continues to be un-deprecated and it is some sort of synonym regarding 'public'.
<?php
class result {
var $userdata = 'Hello'; // or you can use public like... $userdata = 'Hello';
//this is also a class member variables.
function newresult() {
}
}
?>
0 Comment(s)