1
0
mirror of https://github.com/restoreddev/phpapprentice.git synced 2025-08-04 13:57:40 +02:00

More proofreading and editing

This commit is contained in:
Andrew Davis
2018-12-29 12:33:48 -06:00
parent c1e24ab33e
commit 3fd728a71a
4 changed files with 5 additions and 3 deletions

View File

@@ -1,6 +1,8 @@
<?php
// In PHP, arrays are used to store a list of items in a single variable.
// There are two ways to create an array.
// First, you can use the array construct to pass in values separated by commas
// and it will return an array.
$taskList = array('grocery store', 'change car oil');

View File

@@ -20,7 +20,7 @@ $processor = new Processor();
$processor->charge('1234');
// A developer who wants to prevent an exception from stopping code execution
// can catch the exception and use it for logging or a return an error to a user.
// can catch the exception and use it for logging or display the error to a user.
// Just wrap the code that might throw an exception with the keyword "try" and brackets
// followed by "catch", the exception type in parentheses and more brackets.