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:
@@ -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');
|
||||
|
@@ -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.
|
||||
|
Reference in New Issue
Block a user