78 I am now curious in what situation you want to get a random number that isn't as random as it could be while also having it take longer to create ?77 well rand() may be usefull in certain situation, I think
$someFunction=function() use($lol){ //the code will crash here already because $lol is not defined
echo $lol;
}
$lol="test";
$someFunction(); //even though I execute the function here
75 and I found a new fun thing about php
It will print test. This is because the use keyword only looks at the values of the variables when you declare the function and not when you actually use the function
//thanks to code igniter I am already working inside classes
class Card_interperter extends My_model{
public function doDamage(){
//code that deals damage here
}
public function executeEffect(){
$that=$this;
$dealDamage=function() use ($that){
$that->dealDamage();
}
$this->someVariableINeed="lols";
$dealDamage();
}
}