fork(1) download
  1. <?php
  2.  
  3.  
  4. $i = 0;
  5. $otvet = function () use (&$i) {
  6. return $i * $i;
  7. };
  8.  
  9. for ($i = 1; $i < 10; ++$i) {
  10. echo "{$i}x{$i}={$otvet()}\n";
  11. }
  12.  
Success #stdin #stdout 0s 82880KB
stdin
Standard input is empty
stdout
1x1=1
2x2=4
3x3=9
4x4=16
5x5=25
6x6=36
7x7=49
8x8=64
9x9=81