PHP Classes

File: vendor/fzaninotto/faker/test/test.php

Recommend this page to a friend!
  Classes of Renato De Oliveira Lucena  >  PHP Pokemon Script  >  vendor/fzaninotto/faker/test/test.php  >  Download  
File: vendor/fzaninotto/faker/test/test.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Pokemon Script
Provides an API to manage a database of Pokemons
Author: By
Last change:
Date: 2 years ago
Size: 1,279 bytes


Class file image Download
require __DIR__ .'/../vendor/autoload.php';
$faker = Faker\Factory::create();

'<?xml version="1.0" encoding="UTF-8"?>';
<?php for ($i=0; $i < 10; $i++): ?>
<contact firstName="<?php echo $faker->firstName ?>" lastName="<?php echo $faker->lastName ?>" email="<?php echo $faker->email ?>" >
    <phone number="<?php echo $faker->phoneNumber ?>"/>
<?php if ($faker->boolean(25)): ?>
<birth date="<?php echo $faker->dateTimeThisCentury->format('Y-m-d') ?>" place="<?php echo $faker->city ?>"/>
<?php endif; ?>
      <street><?php echo $faker->streetAddress ?></street>
      <city><?php echo $faker->city ?></city>
      <postcode><?php echo $faker->postcode ?></postcode>
      <state><?php echo $faker->state ?></state>
    <company name="<?php echo $faker->company ?>" catchPhrase="<?php echo $faker->catchPhrase ?>">
<?php if ($faker->boolean(33)): ?>
<offer><?php echo $faker->bs ?></offer>
<?php endif; ?>
if ($faker->boolean(33)): ?>
<director name="<?php echo $faker->name ?>" />
<?php endif; ?>
<?php if ($faker->boolean(15)): ?>
<?php echo $faker->text(400) ?>
<?php endif; ?>
<?php endfor; ?>

For more information send a message to info at phpclasses dot org.