FREE ELECTRONIC LIBRARY - Dissertations, online materials

Pages:   || 2 | 3 |

«This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an ...»

-- [ Page 1 ] --

PHP Pandas (PHP7!)

The PHP Programming Language for Everyone.

Dayle Rees

This book is for sale at http://leanpub.com/php-pandas

This version was published on 2016-04-29

This is a Leanpub book. Leanpub empowers authors and publishers with the Lean

Publishing process. Lean Publishing is the act of publishing an in-progress ebook

using lightweight tools and many iterations to get reader feedback, pivot until you

have the right book and build traction once you do.

© 2014 - 2016 Dayle Rees Tweet This Book!

Please help Dayle Rees by spreading the word about this book on Twitter!

The suggested tweet for this book is:

I’m learning about PHP and Pandas AT THE SAME TIME. You can too! @ http://leanpub.com/php-pandas #PHPPandas @daylerees The suggested hashtag for this book is #PHPPandas.

Find out what other people are saying about the book by clicking on this link to

search for this hashtag on Twitter:

https://twitter.com/search?q=#PHPPandas Also By Dayle Rees Laravel: Code Happy Laravel: Code Happy (ES) Laravel: Code Happy (JP) Laravel: Code Bright Code Happy (ITA) Laravel: Code Bright (ES) Laravel: Code Bright (SR) Laravel: Code Bright (JP) Laravel: Code Bright (IT) Laravel: Code Bright (TR) Türkçe Laravel: Code Bright (PT-BR) Laravel: Code Bright (RU) Laravel: Code Smart PHP Pandas (ES) PHP Pandas (IT) PHP Pandas (FR) PHP Pandas (TR) Contents Acknowledgements.................................. i Errata.......................................... ii Feedback........................................ iii Translations...................................... iv

1. Introduction.................................... 1.....................................

2. Installation 3 Linux......................................... 3 Mac OSX....................................... 4 Windows....................................... 5

–  –  –

i Errata This may be my third book, and my writing will have improved since the last one, but I assure you that there will be many, many errors.

You can help support the title by sending an email with any errors you have found to me@daylerees.com1 along with the section title.

Errors will be fixed as they are discovered. Fixes will be released within future updates to the book.

1 mailto:me@daylerees.com ii Feedback Likewise, you can send any feedback you may have about the content of the book or otherwise. You can send an email to me@daylerees.com2 or tweet to @daylerees.

I will endeavour to reply to all mail that I receive.

2 mailto:me@daylerees.com iii Translations If you would like to translate PHP Pandas into your language, then please send an email to me@daylerees.com3 with your intentions. I will offer a 50/50 split of the profits from the translated copy, which will be the same price as the English copy.

Please note that the book is written in markdown format.

3 mailto:me@daylerees.com


1. Introduction Well hello there! Aren’t you just the most handsome AND/OR beautiful reader on the planet! Well done you for buying PHP Pandas, and for taking the first step towards your career as a world-famous web developer.

Who am I? Well, that’s a simple question! My name’s Dayle, and I’ll be your author for this adventure. I’ve been writing books for beginners for a few years now and have taken many other charming readers like yourself on adventures to learning new skills. We’ll make new discoveries together, and all along the journey, rest assured that I’ll be right by your side.

Why do you write like a crazy person?

Excuse me? Oh, this. Well you see, this is the only way that I know how to write. If you’re looking for a technical book full of science teacher stern-ness (Is that a word?

I hope that’s a word.) then I’m afraid you’ve come to the wrong place. I write my books for people. I like to think that we’re buddies, sitting in the pub, talking about PHP over a pint of Special Bre… Fosters.

The truth is that the beginners that I’ve written for tend to like my writing style.

They’re not looking to gain a maths degree from this book. Instead, they’re looking to learn a thing or two about PHP, and that, I can promise you!

Oh hey, you’ll also notice that we’re talking right now. You don’t get that from other authors do you? You see, I have this magic power that will make you talk to me and ask your questions.

–  –  –

That would be a trade secret. Sorry, we can’t share that just yet, but don’t you feel glad that you get to be a part of this adventure, and not just an observer?

–  –  –


Well now’s about the time where any other book would be telling you about PHP, it’s whole history, its application, its author and about a million other things. Well, we’ve already established that I’m not the most traditional author, and I’m not fond

1 2Introduction

of such chapters. You’ve bought this book to learn about PHP, so you’ve already built up a little curiosity about the language. I think this is all you’re going to need.

PHP is a programming language that powers most of the sites out there on the big, wide ol’ interwebs. It was originally written by a guy called Rasmus Lerdorf, who can often be seen smiling in pretty much any image you find of him on Google. Now, Rasmus is a great guy, and in my own way I thank him each and every day for this language that has given me a trade, but I think that’s all you need to know about him. Other PHP books would probably be telling you his favorite cereal about now, but instead, how about we jump in and start learning?

This book is for absolute beginners. This means that if you’ve never tried programming before in your life, then you’re in luck, my friend! If you’ve already tried programming, then you’ll do just fine. If you’re a PHP expert, then now’s a time for a refresh of your skills, and maybe you’ll pick up a few tips and tricks along the way.

I’ve been using my girlfriend (no dev experience), my non-technical colleagues, and random people on the street, forcing my book upon them as guinea pigs to see how it goes down with folks that have no prior knowledge of PHP. My little guinea pigs did exceedingly well, so now it’s your turn, squeak squeak!

My goal for this book is for it to become the most fun, factual, and fantastic PHP book that’s on the market. I want it to be the book that gets recommended when someone is about to become a PHP developer. I’ve worked hard to make it accessible to everyone, so if you enjoy this adventure, then please tweet about it, blog about it, buy copies for your friends and family, or just print it out and slap people in the face with it as you pass them on the street.

This book is a syntax book for PHP. It’s not going to teach you how to make websites (I’m working on the title in the series for this). Instead, it’s the first step that will build your foundation knowledge of the language so that when you come to build your first website, you’re gonna be @%£ˆ hot, baby!

If you read the book, and you feel like something is missing, that a certain chapter is confusing, or there’s anything else bothering you, then please send me an email to me@daylerees.com to let me know! I’m incredibly responsive (thanks to all my media queries… haha… programmer joke), and I want this book to be perfect for everyone.

If you read the book, and you didn’t find anything wrong, well… send me an email to tell me you enjoyed it! I’d love to hear from you.

Right then, let’s not waste any more time. You’ve got some skills to learn! Flip the page, imagine the Jurassic Park theme when they open the gates and prepare to enter the world of development!

2. Installation Before we begin working with PHP, we must first install it. You see, PHP is an application like any other. It needs to be installed on our system before it can process PHP code.

The method of installation varies greatly depending on the operating system that we are using. For that reason, I’ve provided three different guides for installing PHP.

The first section will explain how to install PHP on a Linux distribution, namely Ubuntu due to its popularity. The second section will explain how to install PHP on an Apple Mac OSX system. Finally, the third section will explain how to install PHP on the Windows operating system.

We’ll only be installing the console version of PHP. We won’t be setting up a web server just yet. We’ll get to that in a later title. The console version of PHP is all we need to get started with our learning process.

Remember, you only need to read the appropriate section for your computer. Once you have PHP installed, go ahead and skip to the next chapter of the book.

Linux The best way to install PHP on a unix-based Linux distribution is to use a package manager. The package manager available depends greatly upon the distribution of Linux that you have chosen. I’ve decided to provide instructions for installing PHP on Ubuntu, one of the most popular distributions of Linux.

Ubuntu uses the apt package manager to install its packages. To install the console version of PHP we need to install the php5-cli package. Let’s do this now. First, open a new terminal. You’ll need to type the following instruction.

1 $ sudo apt-get install php5-cli You don’t need to type the dollar sign; that’s just the terminal prompt to show you that we’re typing it into the console. Once you hit enter, apt will retrieve the PHP application package, and install it for you.

That’s it! You’re done. Well, you should be. Let’s check, shall we? Simply type:

–  –  –

This command is used to show the current version of PHP installed. You should see something similar to the following.

1 PHP 5.5.13 (cli) (built: Jun 5 2014 19:13:23) 2 Copyright (c) 1997-2014 The PHP Group 3 Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies Yours won’t be exactly the same, after all, we’re all different, aren’t we? In the example above, the PHP version is 5.5.13. Hopefully, your PHP version number should be 5.4.0 or greater.

If your version isn’t right then, you’ll have to consult the documentation for your Linux distribution to find out how to install the appropriate version.

Go ahead and skip to the next chapter, you’re done!

Mac OSX On the Macintosh operating system, PHP comes pre-installed. Go ahead, open up the Terminal application and type the following to find the version of PHP you’re using.

–  –  –

Don’t type the dollar sign; that’s the terminal prompt! You should see something similar to the following, but not exactly the same.

1 PHP 5.4.24 (cli) (built: Jan 19 2014 21:32:15) 2 Copyright (c) 1997-2013 The PHP Group 3 Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

–  –  –

brew.sh1 I don’t want to copy the instructions here, as they often change between different releases. Once you have Homebrew installed, it’s time to install a newer version of PHP. I recommend installing version 5.5. You can do this using the following command.

1 $ brew install php55 Next, you need to add the location for this version of PHP to your system PATH variable. Don’t worry, just type the following.

1 $ PATH=~/usr/local/Cellar/php55/5.5.13/bin:$PATH You may need to update the version number to match the version of PHP that Homebrew has installed on your system. Now let’s have another go at checking the version of PHP.

–  –  –

Hopefully, this time, you’ll have a version greater than PHP 5.4. Go ahead and skip to the next chapter.

Windows Installing PHP on Windows is a little more difficult, at least for me it is. I’ve tested the instructions below on my Windows 10 machine, but if you have any difficulty replicating these steps, let me know, and I’ll find someone who’s more Windowssavvy to rewrite this section.

First, head over to:

http://windows.php.net/download Here you’ll want to download the latest PHP 5.4 and above zip archive. Once the archive has been downloaded, you’ll want to extract it to a sensible location. I chose

to extract mine here:

1 C:\Users\Dayle\PHP

–  –  –

1 cmd.exe Click next, and name your shortcut “PHP”.

Finally, you’ll want to right click your shortcut and click ‘Properties’. On the ‘Shortcut’ tab, change the ‘Start In’ field to match the location where you extracted the PHP archive. Click ‘OK; when done.

Double click on your PHP shortcut and you should be greeted with a command prompt. Type…

1 php -v

..and you should be greeted with the PHP version information. Confirm that the version is greater than or equal to PHP 5.4, and then move to the next chapter.

Once again, sorry for the roughness of this subchapter. I’ve not used Windows as a development machine for some years now. If anyone has a better way of running PHP on Windows, kindly email your instructions to receive your 5 minutes of fame within this chapter!

3. Finding Answers I know. That’s a kinda fluffy title isn’t it? You’re going to have to trust me when I say that this is important stuff. This chapter is about your confidence as an up and coming developer. Learning is hard, but don’t worry; I’m going to help you through this.

Developers are robots.

Why did you decide to pursue development? No, wait! Let me guess. You saw a rockstar PHP developer swagger out of a Limousine into one of New York’s hottest night spots, order five bottles of Cristal and spend the evening chilling with Jay-Z and the ghost of Tupac.

Pages:   || 2 | 3 |

Similar works:

«Professionals for Visually Impaired Persons Training XL and Knowledge Sharing KnowProViP HANDBOOK Subject: Visual impairment and specificities at older age Official handbook for the KnowProViP course This project was co-financed by the “LEONARDO DA VINCI” action programme of the European Commission 2007 2009 -2– KnowProViP Handbook * Visual impairment at older age This handbook is published by the KnowProViP project consortium and is the official course-handbook Authors: CHENTOUF, R.,...»

«THE EDEN PLAGUE Plague Wars Series Book 0 by David VanDyke Table of Contents The Eden Plague (Sixth Edition) Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 Chapter 12 Chapter 13 Chapter 14 Chapter 15 Chapter 16 Chapter 17 Chapter 18 Chapter 19 Chapter 20 Chapter 21 Chapter 22 Chapter 23 Chapter 24 Chapter 25 Chapter 26 Chapter 27 Chapter 28 Chapter 29 Epilogue The Eden Plague Copyright (c) 2012 by David VanDyke...»

«Downing College Fresher’s Guide 2016/7 Downing MCR Fresher's Guide Downing College, Cambridge, CB2 1DQ. http://downingmcr.soc.srcf.net/ Page 1 of 35 Downing College Fresher’s Guide 2016/7 Contents Fresher’s Week Schedule 1 People 2 The MCR Committee 2.1 College Staff 2.2 Life in College 3 On Arrival at Downing 3.1 Guests 3.2 Mail 3.3 Parties 3.4 Sports, Societies and Clubs 3.5 Dining in Downing 4 Welfare 5 Finances 6 The MCR 7 The Common Room 7.1 Events 7.2 Life in Cambridge 8 What to...»

«A/68/255–S/2013/463 Nations Unies Assemblée générale Distr. générale 2 août 2013 Conseil de sécurité Français Original : anglais Assemblée générale Conseil de sécurité Soixante-huitième session Soixante-huitième année Point 74 de l’ordre du jour provisoire* Rapport du Tribunal international chargé de juger les personnes accusées de violations graves du droit international humanitaire commises sur le territoire de l’ex-Yougoslavie depuis 1991 Rapport du Tribunal pénal...»

«CLUB MANUAL Welcome to Redcliffe Outrigger Canoe Club (ROCC). We are pleased to have you as a member of Redcliffe Outrigger Canoe Club as we prepare to undertake another season of outrigger canoe paddling. Redcliffe Outrigger Canoe Club has been in existence since 2001 and is a member of the Australian Outrigger Canoe Racing Association (AOCRA). As we look forward to a new year, each member of ROCC and their families can look forward to a season of camaraderie, competition and fun. A successful...»

«the Arguments for Protection series NaturalSecurity Protected areas and hazard mitigation A research report by WWF and Equilibrium Arguments for Protection Natural Security Protected areas and hazard mitigation A research report by WWF and Equilibrium Written by Sue Stolton, Nigel Dudley and Jonathan Randall Published 2008, WWF – World Wide Fund for Nature ISBN: 978-2-88085-280-1 Cover design: HMD, UK Cover photographs: Top: Tornado building in Indonesia © WWF / Albrecht G. Schaefer Bottom:...»

«PASTORAL LETTER ON THE READING OF AMORIS LAETITIA IN LIGHT OF CHURCH TEACHING “A TRUE AND LIVING ICON” OF THE ARCHBISHOP OF PORTLAND, OREGON MOST REVEREND ALEXANDER K. SAMPLE TO THE PRIESTS, DEACONS, RELIGIOUS AND FAITHFUL OF THE ARCHDIOCESE “The couple that loves and begets life is a true, living icon. capable of revealing God the Creator and Savior.”1 With these words our Holy Father, Pope Francis, reminds us that married love is “a symbol of God’s inner life,” for the...»

«Scrambles Amongst the Alps in the Years 1860-69 By Edward Whymper Time Period: 1865 (The first edition of Scrambles Amongst the Alps was published in 1871 by John Murray, London) Background Material Scrambles Amongst the Alps is one of the best representations of writing from the golden age of mountaineering in the mid and late 1800’s. Edward Whymper, the author, became interested in mountaineering when in 1860 he was asked by a London publisher to make sketches of the famous peaks of the...»

«SUBURBAN REVISIONS A Thesis Presented to The Academic Faculty By Alyssa Shank Durden In Partial Fulfillment Of the Requirements for the Degree Master of Architecture I Georgia Institute of Technology August, 2005 SUBURBAN REVISIONS Approved by: Richard Dagenhart, Advisor College of Architecture Michael Dobbins College of Architecture Michael Gamble College of Architecture Date Approved: May 16, 2005 ii to my grandmother, Mary Ellen Shank, who inspired me to write and encouraged me to draw since...»

«Joint Center for Housing Studies Harvard University The Origins of American Housing Reform Alexander von Hoffman W98-2 August 1998 Alexander von Hoffman is a Senior Research Fellow at the Joint Center for Housing Studies.  by Alexander von Hoffman. All rights reserved. Short sections of text, not to exceed two paragraphs, may be quoted without explicit permission provided that full credit, including  notice, is given to the source. Any opinions expressed are those of the author and not...»

«Darklands: a vampire novel Published by Naked Snake Press Pawleys Island, South Carolina This is a work of fiction. Names, characters, places, and incidents either are the product of the author’s imagination or are used fictitiously. Any resemblance to actual persons, living or dead, events, or locales is entirely coincidental. All rights reserved copyright © 2010 by Donna Burgess Cover art by Alicia Burgess and Donna Burgess Cover design, interior and exterior layout copyright by Donna...»

«O-144-16 TRADE MARKS ACT 1994 IN THE MATTER OF TRADE MARK APPLICATION NO. 3016595 BY ANDREW JOHNSTON TO REGISTER THE TRADE MARK PANDEMONIUM DRUMMERS IN CLASS 41 AND OPPOSITION THERETO UNDER NO 401320 BY THE PANDEMONIUM DRUMMERS ASSOCIATION Background and pleadings 1. On 3 August 2013 (“the relevant date”), Andrew Johnston (“the applicant”) applied to register the trade mark PANDEMONIUM DRUMMERS (“the application”). Details of the application are as follows: Number: 3016595...»

<<  HOME   |    CONTACTS
2016 www.dissertation.xlibx.info - Dissertations, online materials

Materials of this site are available for review, all rights belong to their respective owners.
If you do not agree with the fact that your material is placed on this site, please, email us, we will within 1-2 business days delete him.