php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6948 $this->func="myfunc"; $this->func("hello");
Submitted: 2000-09-29 18:18 UTC Modified: 2000-10-05 17:51 UTC
From: raix at intermedia dot dk Assigned:
Status: Closed Package: Class/Object related
PHP Version: 4.0.0 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: raix at intermedia dot dk
New email:
PHP Version: OS:

 

 [2000-09-29 18:18 UTC] raix at intermedia dot dk
//I have a variable-function in my class.
class myclass {
  var $func="myfunc";
  function test() {
    $this->func("hello"); //This doesn't work!!

    //This is to be done to make it work:
    $temp=$this->func;
    $temp("hello");
    //This is to silly, I consider this a bug..
    //If it ain't it sould be implementet in the todo.
  }
}
//This sould work no mather the setup.
//I've compiled php with mysql,sybase, shmem

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-05 17:51 UTC] stas@php.net
Yes this is how it works. use $this->$func().
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jul 18 15:01:29 2024 UTC