This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$movies=[ | |
'Les aventuriers de l\'Arche perdue' => ['Harrison Ford', 'Karen Allen', 'John Rhys-Davies'], | |
'Le temple maudit' => ['Harrison Ford', 'Kate Capshaw', 'Jonathan Ke Quan'], | |
'La dernière Croisade' => ['Harrison Ford', 'Sean Connery', 'Alison Doody'] | |
]; | |
foreach($movies as $movie => $actors){ | |
echo "Dans le film $movie, les principaux acteurs sont:<br>"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$weapons = ['fists', 'whip', 'gun']; | |
$opponentWeapon = $weapons[rand(0,2)]; | |
switch ($opponentWeapon) { | |
case 'fists' : | |
$indyWeapon = 'gun'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function writeSecretSentence (string $animal ,string $object ) : string | |
{ | |
return $secretSentence = "$animal s'incline face à $object"; | |
} | |
echo writeSecretSentence ("le chat" , "la terre"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$characters = [ | |
"Negan" => [ | |
"city" => "The Sanctuary", | |
"weapon" => "Lucille" | |
], | |
"Daryl" => [ | |
"city" => "Alexandria", | |
"weapon" => "crossbow" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Bicycle | |
{ | |
private $color; | |
private $currentSpeed; | |
private $nbSeats = 1; | |
private $nbWheels = 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var db = { | |
dreamTeam: { | |
1: { name: 'Jerôme' }, | |
2: { name: 'Mathieu' }, | |
3: { name: 'Julien' }, | |
4: { name: 'Etienne' } | |
}, | |
columns: { | |
1: { title: 'todo', order: 1 }, |
OlderNewer