php make function inside a variable

listseecart

New Member
Im sure I have seen an implementation of this in PHP somewhere and I am positive if it exists its a PHP 5 thing. Any way I was wondering if it was possible to set and run a function from a string and set the returned value to the value of the string. e.g.\[code\]<?php $hi = function(){ return "Hello World"; }; echo $hi(); ?>\[/code\]It probably is not possible but please post anything similar.Cheers!Franky.
 
Back
Top