Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 402 Bytes

not.md

File metadata and controls

29 lines (19 loc) · 402 Bytes

not

Description

Returns the opposite of the $fn call

Parameters

fn
Function to return the opposite.

Examples

Return true if the value is not an array:

<?php

use function Lambdish\Phunctional\not;

$notAnArray = not('is_array');

$notAnArray(123456);            
// => true


$notAnArray(['this is' => 'an array']);            
// => false