/website/source/php/var/is_null.html
HTML | 42 lines | 41 code | 1 blank | 0 comment | 0 complexity | b0695e6150a9b86d4ef0ce8148f05e85 MD5 | raw file
- ---
- warning: 'This file is auto generated by `npm run web:inject`, do not edit by hand'
- examples:
- - is_null('23')
- - is_null(null)
- estarget: es5
- returns:
- - 'false'
- - 'true'
- dependencies: []
- authors:
- original by:
- - 'Kevin van Zonneveld (http://kvz.io)'
- notes: []
- type: function
- layout: function
- title: PHP's is_null in JavaScript
- description: >-
- Here’s what our current JavaScript equivalent to <a
- href="http://php.net/manual/en/function.is_null.php">PHP's is_null</a> looks
- like.
- function: is_null
- category: var
- language: php
- permalink: php/var/is_null/
- alias:
- - /functions/php/is_null/
- - /functions/var/is_null/
- - /php/is_null/
- - /functions/is_null/
- ---
- {% codeblock lang:javascript %}module.exports = function is_null (mixedVar) { // eslint-disable-line camelcase
- // discuss at: http://locutus.io/php/is_null/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // example 1: is_null('23')
- // returns 1: false
- // example 2: is_null(null)
- // returns 2: true
- return (mixedVar === null)
- }
- {% endcodeblock %}