codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
<?php // easy and fast multiply integers by power of 2 $x = 4; echo $x >> 1; echo "\n"; $x = 8; echo $x >> 1; echo "\n"; $x = 200; echo $x >> 1; echo "\nmagic of break statement\n"; for ($i = 4; $i > 0; $i--) { for ($j = 1; $j < 4; $j++) { if ($j%$i==0) { break 2; // Exit from this loop and the next one also. } else { echo $j."\t"; } } echo "\n"; } ?>
Private
[
?
]
Run code