Source of: /manual/en/migration51.integer-parameters.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/migration51.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'migration51.integer-parameters.php',
1 => 'Integer values in function parameters',
),
'up' =>
array (
0 => 'migration51.php',
1 => 'Migrating from PHP 5.0.x to PHP 5.1.x',
),
'prev' =>
array (
0 => 'migration51.reading.php',
1 => 'Reading []',
),
'next' =>
array (
0 => 'migration51.oop.php',
1 => 'Class and object changes',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="migration51.integer-parameters" class="section">
<h2 class="title">Integer values in function parameters</h2>
<p class="para">
With the advent of PHP 5.0.x, a new parameter parsing API was introduced
which is used by a large number of PHP functions. In all versions of PHP
between 5.0.x and 5.1.x, the handling of integer values was very strict and
would reject non-well formed numeric values when a PHP function expected an
integer. These checks have now been relaxed to support non-well formed
numeric strings such as " 123" and "123 ", and will no longer fail as they
did under PHP 5.0.x. However, to promote code safety and input validation,
PHP functions will now emit an <b><tt class="constant">E_NOTICE</tt></b> when such
strings are passed as integers.
</p>
</div><?php manual_footer(); ?>