LoginSignup
57
17

More than 5 years have passed since last update.

PHP「1...10 === '10.1' は true」僕「えっ──!?」

Posted at

論より証拠。

<?php
assert(1...10 === '10.1');

こういうことらしい……。

assert((1.) . (.10) === '10.1');
assert((1.) . (.10) === '10.1');
assert((1) . (.10) === '10.1');
assert(1 . (.10) === '10.1');
assert(1 . 0.1 === '10.1');
assert('1' . 0.1 === '10.1');
assert('1' . '0.1' === '10.1');
57
17
7

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
57
17