Commit 0dacfc8a authored by O'Reilly Media, Inc.'s avatar O'Reilly Media, Inc.
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading
+17 −0
Changes for Object-Oriented Programming With PHP - Working Files/Chapter 1/HelloWorldNOOP.php: 17 added lines, 0 removed lines.
Original line number Diff line number Diff line
<!DOCTYPE html>

<html>
<head>
	<title>HelloWorld - NOOP</title>
</head>

<body>
<h1>HelloWorld - NOOP (Not OOP)</h1>

<?php
	$myMsg = "Hello World";
	print "<br>".$myMsg;
?>

</body>
</html>
+28 −0
Changes for Object-Oriented Programming With PHP - Working Files/Chapter 1/HelloWorldOOP.php: 28 added lines, 0 removed lines.
Original line number Diff line number Diff line
<!DOCTYPE html>

<html>
<head>
	<title>HelloWorld OOP</title>
</head>

<body>
<h1>HelloWorld - OOP</h1>
<?php

class HelloWorldOOP
{
	public function displayValue()
	{
		$myMsg = "Hello World - OOP";
		print $myMsg;
	}
}

$myHelloWorldOOP = new HelloWorldOOP();

$myHelloWorldOOP->displayValue();

?>

</body>
</html>
+26 −0
Changes for Object-Oriented Programming With PHP - Working Files/Chapter 1/HelloWorldOOPStatic.php: 26 added lines, 0 removed lines.
Original line number Diff line number Diff line
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>HelloWorld OOP - Static</title>
</head>

<body>
<h1>HelloWorld - OOP - Static</h1>
<?php

class HelloWorldOOPStatic
{
	public static function displayValue()
	{
		$myMsg = "Hello World - OOP Static";
		print $myMsg;
	}
}

HelloWorldOOPStatic::displayValue();

?>

</body>
</html>
+85.8 KiB

File added.

No diff preview for this file type.

+83.8 KiB

File added.

No diff preview for this file type.

Loading