$name = 'John';
$age = 25;

echo 'My name is ', $name, ' and I am ', $age, ' years old.';
// Output: My name is John and I am 25 years old.
$name = 'John';
$age = 25;

print 'My name is ', $name, ' and I am ', $age, ' years old.';
// Parse error: syntax error, unexpected ','
$name = "John";
$age = 25;

print "My name is " . $name . " and I am " . $age . " years old.";
// Output: My name is John and I am 25 years old.

echo "My name is " . $name . " and I am " . $age . " years old.";
// Output: My name is John and I am 25 years old.
$result = echo "Hello, World!";
// Parse error: syntax error, unexpected 'echo' (T_ECHO)
// Parsing error: echo does not return a value.
$result = print("Hello, World!");
var_dump($result); // int(1)
$start = microtime(true);

for ($i = 0; $i < 100000; $i++) {
  echo 'Hello, world!';
}

$end = microtime(true);

$echo_time = $end - $start;

$start = microtime(true);

for ($i = 0; $i < 100000; $i++) {
  print 'Hello, world!';
}

$end = microtime(true);

$print_time = $end - $start;

echo "echo_time: $echo_time\n";
echo "print_time: $print_time\n";
Sample Output Results These are the results of running the above code three times. Note that actual times can vary depending on your AMP stack, hardware, and other environment factors. Use this only as a rough reference.