ufm: (Default)
[personal profile] ufm

$a = 1;
print ($a == "" ? "yes" : "no") . "\n";
print ($a == "1" ? "yes" : "no") . "\n";
print ($a == "01" ? "yes" : "no") . "\n";
$a = 0;
print ($a == "" ? "yes" : "no") . "\n";
print ($a == "0" ? "yes" : "no") . "\n";

———

no
yes
yes
yes
yes

Originally published at U.F.M's Homepage. You can comment here or there.

(no subject)

Date: 2013-09-01 10:32 (UTC)
From: [identity profile] avnik.livejournal.com
Есть же нормальные языки, питон, ерланг -- зачем же мучаться?

(no subject)

Date: 2013-09-01 11:19 (UTC)
From: [identity profile] ufm.livejournal.com
Дано в ощущениях.

(no subject)

Date: 2013-09-02 22:52 (UTC)
From: [identity profile] sokhapkin.livejournal.com
Согласен на 100% - есть ведь нормальные языки, а люди пишут на python и erlang...

(no subject)

Date: 2013-09-03 08:57 (UTC)
From: [identity profile] ufm.livejournal.com
Но-но-но! Ерланг не замай! :)