From 9f337dd02823f845ca913beb44464f269340c7dd Mon Sep 17 00:00:00 2001 From: Rahiel Kasim Date: Mon, 1 Oct 2018 09:53:22 +0200 Subject: [php/en]: typo --- php.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'php.html.markdown') diff --git a/php.html.markdown b/php.html.markdown index d4fbaa32..6542035f 100644 --- a/php.html.markdown +++ b/php.html.markdown @@ -443,7 +443,7 @@ echo $function_name(1, 2); // => 3 // Or, use call_user_func(callable $callback [, $parameter [, ... ]]); -// You can get the all the parameters passed to a function +// You can get all the parameters passed to a function function parameters() { $numargs = func_num_args(); if ($numargs > 0) { -- cgit v1.2.3 From 00c12ddcff858b9e7bfe450bd4d4b492206a3b34 Mon Sep 17 00:00:00 2001 From: Apoorv Choubey Date: Thu, 11 Oct 2018 21:41:42 +0530 Subject: add PHP resource --- php.html.markdown | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'php.html.markdown') diff --git a/php.html.markdown b/php.html.markdown index 6542035f..3b18aa60 100644 --- a/php.html.markdown +++ b/php.html.markdown @@ -794,7 +794,7 @@ But I'm ChildClass /********************** * Magic constants -* +* */ // Get current class name. Must be used inside a class declaration. @@ -826,7 +826,7 @@ echo "Current trait is " . __TRAIT__; /********************** * Error Handling -* +* */ // Simple error handling can be done with try catch block @@ -871,6 +871,9 @@ and community input. If you're interested in up-to-date best practices, visit [PHP The Right Way](http://www.phptherightway.com/). +A tutorial covering basics of language, setting up coding environment and making +few practical projects at [Codecourse - PHP Basics](https://www.youtube.com/playlist?list=PLfdtiltiRHWHjTPiFDRdTOPtSyYfz3iLW). + If you're coming from a language with good package management, check out [Composer](http://getcomposer.org/). -- cgit v1.2.3 From ca98611c099b2108c37c603440338d1b7ba6cdfb Mon Sep 17 00:00:00 2001 From: Divay Prakash Date: Fri, 2 Nov 2018 04:21:54 +0530 Subject: Fix exception handling example --- php.html.markdown | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'php.html.markdown') diff --git a/php.html.markdown b/php.html.markdown index 3b18aa60..40c9dd01 100644 --- a/php.html.markdown +++ b/php.html.markdown @@ -837,11 +837,14 @@ try { // Handle exception } -// When using try catch blocks in a namespaced environment use the following +// When using try catch blocks in a namespaced environment it is important to +// escape to the global namespace, because Exceptions are classes, and the +// Exception class exists in the global namespace. This can be done using a +// leading backslash to catch the Exception. try { // Do something -} catch (Exception $e) { +} catch (\Exception $e) { // Handle exception } -- cgit v1.2.3