php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #25354 Easy access to class/object methods/vars
Submitted: 2003-09-02 04:28 UTC Modified: 2006-04-30 21:27 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: morten at nilsen dot com Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 4.3.2 OS: All
Private report: No CVE-ID: None
 [2003-09-02 04:28 UTC] morten at nilsen dot com
Description:
------------
It would be quite nifty with something like this:

with($class) {
  set("myvar1", "myvalue1");
  set("myvar2", "myvalue2");
  set("myvar3", "myvalue3");
  set("myvar4", func_not_in_class("foo"));
}

instead of doing something like this:

$class->set("myvar1", "myvalue1");
$class->set("myvar2", "myvalue2");
$class->set("myvar3", "myvalue3");
$class->set("myvar4", func_not_in_class("foo"));


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-02 04:37 UTC] helly@php.net
Maybe you come back when we start developing PHP 6 :-)
 [2006-04-30 21:27 UTC] morten at nilsen dot com
I believe that would be now?
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 21:01:33 2025 UTC