note 77209 added to function.create-function

From: Date: Mon, 20 Aug 2007 12:51:26 +0000
Subject: note 77209 added to function.create-function
Groups: php.notes 
Request: Send a blank email to php-notes+get-129638@lists.php.net to get a copy of this message
In response to koyama at hoge dot org (14-Dec-2000): This does NOT create a new method - try adding this at the end: if (function_exists($h->lamda)) { print "Its a function\n"; } else { print "No it isnt"; } It creates a function which $h->lamda points to. Under PHP4 you could simply add an argument $this which meant it *behaved* like a method (though it existed in global scope) but with PHP5, you can't have a variable named $this in a function (which is rather irksome). (and methinks the ant-bot challenge is taking the mickey - min(three, four)? !). ---- Server IP: 87.124.64.96 Probable Submitter: 62.189.108.219 ---- Manual Page -- http://www.php.net/manual/en/function.create-function.php Edit -- https://master.php.net/note/edit/77209 Del: integrated -- https://master.php.net/note/delete/77209/integrated Del: useless -- https://master.php.net/note/delete/77209/useless Del: bad code -- https://master.php.net/note/delete/77209/bad+code Del: spam -- https://master.php.net/note/delete/77209/spam Del: non-english -- https://master.php.net/note/delete/77209/non-english Del: in docs -- https://master.php.net/note/delete/77209/in+docs Del: other reasons-- https://master.php.net/note/delete/77209 Reject -- https://master.php.net/note/reject/77209 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#129638) next »