Example #1
0
?>


<br />
<br />


<?php 
function salut($nom, $age)
{
    echo 'Salut ' . $nom . ', ca va mon pote? Tu as ' . $age . '<br />';
}
salut('Nik', 10);
salut('NIKO', 20);
salut('Nino', 35);
salut('NikNik', 45);
?>

<br />
<br />


<!-- #6 Les arrays -->

<?php 
$pseudo = array("Nik", "NIk2", "NIk3", "NIk4");
$pseudo[5] = "X";
echo $pseudo[3];
?>

<br />
Example #2
0
File: if.php Project: sskblr/hhvm
<?php

function salut($hello)
{
    var_dump(hh\asm('
    CGetL $hello
    JmpZ goodbye
    String "Hello\\n"
    Jmp done
goodbye:
    String "Goodbye\\n"
done:
    Print
    PopC
    Int 42
  '));
}
salut(true);
salut(false);