php: Omit closing ?> in manual and examples

PSR-12 says "The closing ?> tag MUST be omitted from files containing
only PHP".
This commit is contained in:
Olly Betts 2021-03-22 16:00:09 +13:00
commit e54d44c4be
100 changed files with 0 additions and 135 deletions

View file

@ -476,7 +476,6 @@ $result=new_intp();
add( $in1, $in2, $result );
echo "The sum " . intp_value($in1) . " + " . intp_value($in2) . " = " . intp_value( $result) . "\n";
?>
</pre></div>
<p>
@ -508,7 +507,6 @@ $in2 = 5;
$result= add($in1, $in2); # Note using variables for the input is unnecessary.
echo "The sum $in1 + $in2 = $result\n";
?&gt;
</pre></div>
<p>
@ -547,7 +545,6 @@ $result = 0;
add($in1, $in2, $result);
echo "The sum $in1 + $in2 = $result\n";
?&gt;
</pre></div>
<p>
@ -622,7 +619,6 @@ Would be used in the following way from PHP:
$c-&gt;im = 0;
# $c destructor called when $c goes out of scope.
?&gt;
</pre></div>
<p>

View file

@ -43,5 +43,3 @@ $caller->delCallback();
# All done.
print "php exit\n";
?>

View file

@ -56,5 +56,3 @@ $o = NULL;
print Shape::nshapes() . " shapes remain\n";
print "Goodbye\n";
?>

View file

@ -19,6 +19,3 @@ if (array_key_exists("EXTERN", $c)) {
if (array_key_exists("FOO", $c)) {
print "FOO = " . $c["FOO"] . " (Arg! This shouldn't print anything)\n";
}
?>

View file

@ -43,5 +43,3 @@
# $q = $a[0]
# $r = $a[1]
# print " 42/37 = $q remainder $r\n";
?>

View file

@ -45,5 +45,3 @@ $container = NULL;
print "\nA total of " . Shape::nshapes() . " shapes remain\n";
print "Goodbye\n";
?>

View file

@ -28,5 +28,3 @@ $f = new Foo();
$f->enum_test(Foo::IMPULSE);
$f->enum_test(Foo::WARP);
$f->enum_test(Foo::LUDICROUS);
?>

View file

@ -72,5 +72,3 @@ print "----------------------\n";
# All done.
print "php exit\n";
?>

View file

@ -19,6 +19,3 @@ print "Using swig style string pointers as we need them registered as constants\
print " ADD = " . ADD . "\n";
print " SUB = " . SUB . "\n";
print " MUL = " . MUL . "\n";
?>

View file

@ -54,5 +54,3 @@ $s = 42;
print Shape::nshapes() . " shapes remain\n";
print "Goodbye\n";
?>

View file

@ -31,5 +31,3 @@
# print "Testing multiple return values\n";
# ($q,$r) = divide(42,37);
# print " 42/37 = $q remainder $r\n";
?>

View file

@ -2,6 +2,3 @@
# This code is inserted into example.php
echo "This is include.php\n";
?>

View file

@ -6,4 +6,3 @@ set_include_path(realpath(dirname(__FILE__)) . PATH_SEPARATOR . get_include_path
require "example.php";
echo "Version - " . ((new ReflectionExtension('example'))->getVersion()) . "\n";
?>

View file

@ -64,5 +64,3 @@ Shape::nshapes(42);
print Shape::get_nshapes() ." == 42\n";
print "Goodbye\n";
?>

View file

@ -45,5 +45,3 @@ print "Getting some array values\n";
for ($i = 0; $i < 5; $i++) {
print " va[$i] = {$va->get($i)->as_string()}\n";
}
?>

View file

@ -21,5 +21,3 @@ Foo_set(3.1415926);
# manual for why. )
print "Foo = " . Foo_get() . "\n";
print_Foo();
?>

View file

@ -10,6 +10,3 @@ $s = new Sync();
echo "Got new object\n";
$s->printer();
?>

View file

@ -37,7 +37,3 @@
# free($r);
echo "Good\n";
?>

View file

@ -91,6 +91,3 @@
/* And this */
//status_set(0);
echo "Status = ".status_get()."\n";
?>

View file

@ -9,4 +9,3 @@ $spam=new Spam();
check::equal(0,$spam->blah(),"spam object method");
check::done();
?>

Some files were not shown because too many files have changed in this diff Show more