This is perl 5, version 24, subversion 1 (v5.24.1) built for x86_64-linux (with 30 registered patches, see perl -V for more detail)
Copyright 1987-2016, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.
$ perl -e 'print int("1A");' 1
$ python -V Python 3.5.2 $ python -c 'print(int("1A"))' Traceback (most recent call last): File "<string>", line 1, in <module> ValueError: invalid literal for int() with base 10: '1A'
PHPの型変換により特定の処理が動いてしまう (スコア:0)
いやいやいや
どういう頭の構造してたら(int)"1A"が1になる言語設計しようと思うんだよ…
Re:PHPの型変換により特定の処理が動いてしまう (スコア:2, 参考になる)
どういう頭の構造してたら(int)"1A"が1になる言語設計しようと思うんだよ…
御三家で言うと、Pythonだけがまともな頭の構造してるということですね。わかります。