Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.os.vms    |    DEC's VAX* line of computers & VMS.    |    264,096 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 264,013 of 264,096    |
|    =?UTF-8?Q?Arne_Vajh=C3=B8j?= to All    |
|    Re: New PHP kits available (and a progra    |
|    02 Jan 26 15:04:21    |
   
   From: arne@vajhoej.dk   
      
   On 1/1/2026 10:31 PM, Lawrence D’Oliveiro wrote:   
   > On Thu, 1 Jan 2026 20:51:57 -0500, Arne Vajhøj wrote:   
   >> function test($v) {   
   >> ...   
   >>   
   >> $ctx = new Fiber('test');   
   >   
   > Showing you what a crummy language PHP is: it doesn’t even have the   
   > concept of function objects, it has to fake it by passing a string   
   > containing the *name* of the function ... (interpreted in what scope?)   
      
   Someone made a decision many years ago that the syntax should be:   
      
   'test'   
      
   instead of:   
      
   test   
      
   to specify the function as argument.   
      
   Very unusual.   
      
   Given that anonymous functions and arrow functions work more normal,   
   then I will assume that if the PHP people were to design it today,   
   then they would go for the more normal syntax. But they are stuck   
   with decisions of the past like everybody else.   
      
   So now we just have to enjoy the extra features provided by this.   
      
   String as function is not limited to arguments, so creative   
   developers can have fun.   
      
   This works:   
      
      
      
   Arne   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca