PHP Storm With WAMP

Ref Video Steps Open Configuration File >> Settings or Ctrl + Alt + S Click PHP Click on Cli Interpreter Button (three dots) Click on + symbol on the modal window Choose the PHP path(it will automatically come if set in %PATH% environment variable) Set Debbugger extension to the same in php.ini C:\wamp64_v2\bin\php\php7.4.26\ext\php_xdebug-3.1.2-7.4-vc15-x86_64.dll Ensure Debug…

PHP Debugging with Xdebug

Debugging & Testing Debugging and testing are interdependent processes. The purpose of testing is to identify if there are any mistakes in a program’s source code. Similarly the purpose of debugging is to locate that mistake and fix it. Debugging helps the developer to determine the root cause of technical error in order to fix…

Curl with PHP

in php.ini, uncomment extension=curl Some timese you may neet to download cacert.pem which must be set curl.cainfo = "C:\wamp64\bin\php\php7.4.9\extras\ssl\cacert.pem" Test Code <?php error_reporting(-1);// report all errors $ch = curl_init(); $curlConfig = array( CURLOPT_URL => "https://www.outsource-online.net/", CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => array( 'field1' => 'some date', 'field2' => 'some other data', ) );…

Standardized Coding

You are an ace coder, time to think of standardising Coding Style Steps Commenting for Documentation (phpDocumentor/Doxygen etc), Sample Commenting Detecting and clearing mess with PHPMD – PHP Mess Detector , Git , tutorial Ensuring PHP PSR Standard PHP CS PHP_CodeSniffer for PSR 12 full usage Testing , Unit Testing with PHPunit Debugging. There are…

PHP Unit Testing(PHPUnit )

Steps Install PHPUnit with composer Global composer global require –dev phpunit/phpunit PS: Global Composer is in C:\Users\user\AppData\Roaming\Composer folder To test phpunit –version Create phpunit.xml Sample Reference <?xml version="1.0" encoding="UTF-8"?> <phpunit bootstrap = "vendor/autoload.php" backupGlobals = "false" testdox = "true" backupStaticAttributes = "false" colors = "true" convertErrorsToExceptions = "true" convertNoticesToExceptions = "true" convertWarningsToExceptions = "true" processIsolation…

Create Google Form with Script

Create Google Form with Google Script Steps Use Forms Service // Create a new form, then add a checkbox question, a multiple choice question, // a page break, then a date question and a grid of questions. var form = FormApp.create('New Form'); var item = form.addParagraphTextItem(); item.setTitle('Name') .setRequired(true); form.addTextItem() .setTitle('Phone Number') .setRequired(true); var item2 =…