CakePHP-2.0 has this =>
// Even in your cakephp 2.1.x we have this format <?php class PostsController extends AppController { public $helpers = array ('Html','Form'); public $name = 'Posts'; public function index() { $this->set('posts', $this->Post->find('all')); } } ?>
CakePHP-1.3.10 had this =>
<?php class PostsController extends AppController { var $helpers = array ('Html','Form'); var $name = 'Posts'; function index() { $this->set('posts', $this->Post->find('all')); } } ?>
What is the difference between using public and using var?
source share