diff --git a/dev/initdata/generate-commande.php b/dev/initdata/generate-commande.php
index 7ae4f936dd7..79a88abbc7b 100644
--- a/dev/initdata/generate-commande.php
+++ b/dev/initdata/generate-commande.php
@@ -165,7 +165,7 @@ for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
$com = new Commande($db);
$com->socid = 4;
- $com->date_commande = $dates[rand(1, sizeof($dates)-1)];
+ $com->date_commande = $dates[rand(1, count($dates)-1)];
$com->note = 'A comment';
$com->source = 1;
$com->fk_project = 0;
diff --git a/dev/initdata/generate-societe.php b/dev/initdata/generate-societe.php
index d3128eba28c..5052ac6bcb3 100644
--- a/dev/initdata/generate-societe.php
+++ b/dev/initdata/generate-societe.php
@@ -90,7 +90,7 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
print "Company $s\n";
$soc = new Societe($db);
$soc->nom = "Company num ".time()."$s";
- $soc->ville = $villes[rand(0,sizeof($villes)-1)];
+ $soc->ville = $villes[rand(0, count($villes)-1)];
$soc->client = rand(1,2); // Une societe sur 2 est prospect, l'autre client
$soc->fournisseur = rand(0,1); // Une societe sur 2 est fournisseur
$soc->code_client='CU'.time()."$s";
@@ -113,7 +113,7 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
$contact = new Contact($db);
$contact->socid = $soc->id;
$contact->name = "Lastname".$c;
- $contact->firstname = $prenoms[rand(0,sizeof($prenoms)-1)];
+ $contact->firstname = $prenoms[rand(0, count($prenoms)-1)];
if ( $contact->create($user) )
{
diff --git a/dev/translation/langAutoParser.class.php b/dev/translation/langAutoParser.class.php
index ec94b569a2c..927b47c1574 100644
--- a/dev/translation/langAutoParser.class.php
+++ b/dev/translation/langAutoParser.class.php
@@ -52,7 +52,7 @@ class langAutoParser {
$fileContent = null;
$refPath = $this->langDir.$this->refLang.self::DIR_SEPARATOR.$file;
$fileContent = file($refPath,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
- print "Processing file " . $file . ", with ".sizeof($fileContent)." lines
\n";
+ print "Processing file " . $file . ", with ".count($fileContent)." lines
\n";
// Define target dirs
$targetlangs=array($this->destLang);
diff --git a/scripts/invoices/rebuild_merge_pdf.php b/scripts/invoices/rebuild_merge_pdf.php
index f79e212775c..fa7e1e9e9bd 100644
--- a/scripts/invoices/rebuild_merge_pdf.php
+++ b/scripts/invoices/rebuild_merge_pdf.php
@@ -153,7 +153,7 @@ foreach ($argv as $key => $value)
}
// Check if an option and a filter has been provided
-if (empty($option) && sizeof($filter) <= 0)
+if (empty($option) && count($filter) <= 0)
{
usage();
exit;