codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
<?php function test($bool) { echo $bool ? 'true' : 'false'; echo "\n"; } $true = array(1, '1'); $false = array(0, '0'); echo "-- True --\n"; foreach ($true as $t) { test($t); } echo "\n-- False --\n"; foreach ($false as $f) { test($f); }
Private
[
?
]
Run code
Submit