box-o-sand/personal-home-page/helloworld.php

36 lines
539 B
PHP
Raw Permalink Normal View History

2024-03-02 03:49:44 +00:00
<?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";