36 lines
539 B
PHP
36 lines
539 B
PHP
<?php
|
|
|
|
$name = 'Flavio';
|
|
|
|
var_dump($name);
|
|
|
|
$age = 20;
|
|
|
|
var_dump($age);
|
|
|
|
$base = 20;
|
|
$height = 10;
|
|
|
|
$area = $base * $height;
|
|
|
|
$test = 'an example';
|
|
|
|
$example = "This is $test";
|
|
|
|
print $example . "\n";
|
|
|
|
$firstName = 'Flavio';
|
|
$lastName = 'Copes';
|
|
|
|
$fullName = $firstName . ' ' . $lastName;
|
|
|
|
print '$fullName = ' . $fullName . "\n";
|
|
|
|
print strlen($fullName) . "\n";
|
|
|
|
$weirdName = str_replace('avio', 'ower', $fullName);
|
|
|
|
print '$weirdName = ' . $weirdName . "\n";
|
|
|
|
print 'exploded $weirdName = ' . var_dump(explode(' ', $weirdName)) . "\n";
|