I'm making a transaction with Predis but I can't figure out how to pass my own variables into the anonymous transaction function.
$options = array();
$x = 13;
$transaction = $predis->multiExec($options, function($transaction) {
//i need $x here
});
I've tried to add it to the options array but it's protected inside the anonymous function.
How can i do this?