concept content in category php

appears as: content, contents, content, contents
PHP in Action: Objects, Design, Agility

This is an excerpt from Manning's book PHP in Action: Objects, Design, Agility.

The idea of static typing is that it provides type safety. It’s harder to introduce the wrong content into a variable because the content is likely to be of the wrong type, and in a statically typed language, the compiler will catch that during compilation. So some bugs in a program will be caught at compile time.

{capture name=title}
<title>Welcome to Hazycrazy.com</title>
{/capture}

{capture name=content}
<div id="content">
  <h1>Welcome to Hazycrazy.com</h1>
  ...
  ...
</div>
{/capture}
Table A.1. Assertions that are equivalent in PHPUnit and Simple Test

Meaning

Simple Test

PHPUnit

Two variables, arrays, or objects have the same value or content. assertEqual($expected, $actual) assertEquals($expected, $actual)
The inverse of the above. assertNotEqual($unexpected, $actual) assertNotEquals($unexpected, $actual)
$condition evaluates to TRUE. assertTrue($condition) assertTrue($condition)
$condition evaluates to FALSE. assertFalse($condition) assertFalse($condition)
$string matches $pattern, a Perl-compatible regular expression. assertPattern($pattern, $string) assertRegExp($pattern, $string)
$string does not match $pattern. assertNoPattern($pattern, $string) assertNotRegExp($pattern, $string)
$variable belongs to $class_or_type or a child class of it. assertIsA($variable, $class_or_type) assert-Type($class_or_type, $variable)
$variable does not belong to $class_or_type or a child class of it. assertNotA($variable, $class_or_type) assertNot-Type($class_or_type, $variable)
$variable is null. assertNull($variable) assertNull($variable)
$variable is not null. assertNotNull($variable) assertNotNull($variable)