PageRenderTime 0ms CodeModel.GetById 3ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/website/source/php/var/is_null.html

http://github.com/kvz/phpjs
HTML | 42 lines | 41 code | 1 blank | 0 comment | 0 complexity | 07becfe7d3ed4ecd83fdc55708890de3 MD5 | raw file
 1---
 2warning: 'This file is auto generated by `npm run web:inject`, do not edit by hand'
 3examples:
 4  - is_null('23')
 5  - is_null(null)
 6estarget: es5
 7returns:
 8  - 'false'
 9  - 'true'
10dependencies: []
11authors:
12  original by:
13    - 'Kevin van Zonneveld (https://kvz.io)'
14notes: []
15type: function
16layout: function
17title: PHP's is_null in JavaScript
18description: >-
19  Here’s what our current JavaScript equivalent to <a
20  href="https://php.net/manual/en/function.is-null.php">PHP's is_null</a> looks
21  like.
22function: is_null
23category: var
24language: php
25permalink: php/var/is_null/
26alias:
27  - /functions/php/is_null/
28  - /functions/var/is_null/
29  - /php/is_null/
30  - /functions/is_null/
31---
32{% codeblock lang:javascript %}module.exports = function is_null (mixedVar) { // eslint-disable-line camelcase
33  //  discuss at: https://locutus.io/php/is_null/
34  // original by: Kevin van Zonneveld (https://kvz.io)
35  //   example 1: is_null('23')
36  //   returns 1: false
37  //   example 2: is_null(null)
38  //   returns 2: true
39
40  return (mixedVar === null)
41}
42{% endcodeblock %}