lowest positive value - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of lowest positive value.php
- <?php
- $a = 0;
- $b = 4;
- $c = 8;
- $s = \array_reduce(
- \array_filter(
- [ $a, $b, $c ],
- static function ($quantity) {
- return $quantity > 0;
- }
- ),
- static function ($lowest, $quantity) {
- return $lowest === null || $quantity < $lowest ? $quantity : $lowest;
- }
- );
- var_dump($s);
File Description
- lowest positive value
- PHP Code
- 18 Nov-2019
- 407 Bytes
You can Share it:
Latest PHP Pastes