Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • What does keyword 'var' do in PHP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 109
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: