mirror of
https://github.com/php/presentations.git
synced 2026-03-25 16:12:07 +01:00
25 lines
439 B
PHP
25 lines
439 B
PHP
<?php
|
|
namespace Languages:Perl {
|
|
class Execute {
|
|
function statement($cmd) {
|
|
$cmd = escapeshellcmd($cmd);
|
|
system("echo $cmd | perl");
|
|
}
|
|
}
|
|
|
|
class Insult {
|
|
function oneLiner() {
|
|
echo "Perl is soo ugly, even ";
|
|
echo "Microsoft can't embrace it";
|
|
echo "\n<br />\n";
|
|
}
|
|
}
|
|
}
|
|
|
|
$e = new Languages:Perl::Execute;
|
|
$e->statement("print 'Hello World!'");
|
|
echo "\n<br />\n";
|
|
$i = new Languages:Perl::Insult;
|
|
$i->oneLiner();
|
|
?>
|