Skip to content

Conversation

@slopjong
Copy link
Contributor

In Javascript:

typeof "2" => returns a "string"
typeof 2 => returns "number"

In PHP:

is_numeric("2") => returns true
is_numeric(2) => returns true

What I want to say is what PHP considers something numeric it is not always numeric in other languages.

…mber and boolean

is_numeric(), is_int() and is_bool() are not sufficient when checking the data type of an entity. E.g. "2" is not numerical in javascript but in PHP it is.
hasbridge added a commit that referenced this pull request Jan 9, 2015
PHP considers somthing numeric which is not in JavaScript
@hasbridge hasbridge merged commit f12881b into hasbridge:master Jan 9, 2015
@slopjong
Copy link
Contributor Author

You should have waited until February 18th to complete the two years :-D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants