learnphponline1's profile picture. We hope to provide you with expert PHP knowledge

learnphponline101

@learnphponline1

We hope to provide you with expert PHP knowledge

Closures Sometimes you can use closures to have code that is dynamic but does have some behaviors you want to centralize. learn-php.online/closures/


Try Catch Code will give errors... it just happens. When this happens you want to catch the error by handling the exception learn-php.online/try-catch/


Similar_text Calculates the similarity between two strings and returns the number of matching chars in both strings. learn-php.online/similar_text/


Print_r This is print readable. With this function you can debug arrays and objects learn-php.online/print_r/


PHP - FANN - Fast Artificial Neural Network With FANN you can train a neural network with the use of PHP. The methods are connected to C code that actually execute training, that's why this is still fast. See php.net/manual/en/book… learn-php.online/php-fann-fast-…

php.net

PHP: FANN - Manual

FANN (Fast Artificial Neural Network)


String When optimizing your code the preferred method is single quotes. Many examples on the internet show double quotes but it has some performance overhead that in most cases you do not need. learn-php.online/string/


Implode Sometimes you need to get from an array to a string. To do that, to glue the values, you can use implode. learn-php.online/implode/


Sleep Sometimes you want your application to wait a bit. Maybe when you want another server to have some time to process your request or something like that. You can do this with sleep. When more precision is needed you can also use usleep. learn-php.online/sleep/


Objects An object can hold information in memory. It's a collection of values and functions. learn-php.online/objects/


Array With the array syntax you can generate a list of values. learn-php.online/array/


Count With this method you can count the amount of items in an array. learn-php.online/count/


Switch This is the same as een If / Elseif / Else but in a different syntax. Sometimes we prefer this style for readability. But please note this method is a bit slower then the if statement. See: phpbench.com learn-php.online/switch/

phpbench.com

BenchPHP

Your database in PHP


Foreach loop A loop is designed so that you are able to iterate over a list of values. This can be very helpful. For example, the google search result page is a list of values. That is also being generated by loop. learn-php.online/foreach-loop/


Double quotation marks // Output -> He drank some apple juice echo "He drank some $juice juice."; learn-php.online/double-quotati…


If / Elseif / Else You can add multiple elseif statement so that multiple options can be made. learn-php.online/if-elseif-else/


If / Else With this statement you can let the application choose a specific flow. In this example we output something on the screen with an echo statement. learn-php.online/if-else/


Loading...

Something went wrong.


Something went wrong.