| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2006-01-26 22:50 UTC] helly@php.net
  [2006-01-26 23:18 UTC] mike at scrapegoat dot com
  [2006-01-27 00:39 UTC] derick@php.net
  | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 05:00:01 2025 UTC | 
Description: ------------ I am amazed that PHP5 does not treat 'var' as if it was the same 'public'. I am so sick of trying to maintain two sets of code for PHP4 and PHP5 all because PHP4 uses 'var' in my classes and PHP5 wants 'public', 'private' or 'protected' I would love to see 'var' be treated an alias for 'public' Reproduce code: --------------- class test { var $info; function test( $info ) { $this->info = $info; } } Expected result: ---------------- This should be the same as: class test { public $info; function test( $info ) { $this->info = $info; } } Actual result: -------------- error/exception is thrown