/website/source/php/var/is_null.html
HTML | 41 lines | 40 code | 1 blank | 0 comment | 0 complexity | 417674c19983d0657ac6ba63424f62c0 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)
- returns:
- - 'false'
- - 'true'
- dependencies: []
- authors:
- original by:
- - 'Kevin van Zonneveld (https://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="https://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: https://locutus.io/php/is_null/
- // original by: Kevin van Zonneveld (https://kvz.io)
- // example 1: is_null('23')
- // returns 1: false
- // example 2: is_null(null)
- // returns 2: true
- return (mixedVar === null)
- }
- {% endcodeblock %}