note 124668 added to lua.registercallback

From: Date: Fri, 31 Jan 2020 12:10:44 +0000
Subject: note 124668 added to lua.registercallback
Groups: php.notes 
Request: Send a blank email to php-notes+get-213982@lists.php.net to get a copy of this message
// init lua $lua = new Lua(); /** * Hello world method */ function helloWorld() { return "hello world"; } // register our hello world method $lua->registerCallback("helloWorld", helloWorld); $lua->eval(" -- call php method local retVal = helloWorld() print(retVal) "); // register our hello world method but using an other name $lua->registerCallback("worldHello", helloWorld); // run our lua script $lua->eval(" -- call php method local retVal = worldHello() print(retVal) "); ---- Server IP: 45.112.84.4 Probable Submitter: 38.142.137.34 (proxied: 45.62.232.158) ---- Manual Page -- http://php.net/manual/en/lua.registercallback.php Edit -- https://master.php.net/note/edit/124668 Del: integrated -- https://master.php.net/note/delete/124668/integrated Del: useless -- https://master.php.net/note/delete/124668/useless Del: bad code -- https://master.php.net/note/delete/124668/bad+code Del: spam -- https://master.php.net/note/delete/124668/spam Del: non-english -- https://master.php.net/note/delete/124668/non-english Del: in docs -- https://master.php.net/note/delete/124668/in+docs Del: other reasons-- https://master.php.net/note/delete/124668 Reject -- https://master.php.net/note/reject/124668 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#213982) next »