fork download
  1. <?php
  2.  
  3. function f1(){
  4. $x = 10;
  5. return function() use ($x){
  6. $y = 12;
  7. return $x + $y;
  8. };
  9. }
  10. $temp = f1();
  11. echo $temp();
Success #stdin #stdout 0.02s 24448KB
stdin
Standard input is empty
stdout
22