daily pastebin goal
27%
SHARE
TWEET

Untitled

a guest Sep 26th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. declare(strict_types = 1);
  4.  
  5. function sum(int $a, int $b, callable $sumInterception): int
  6. {
  7.     $sumInterception($a, $b);
  8.  
  9.     return $a + $b;
  10. }
  11.  
  12. printf(sum(1, 2, function ($a, $b) {
  13.     printf('Calculating: %d + %d = ', $a, $b);
  14. }));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand