PHPPHP Core Functions PHP : require_once | Core function I just want to log one pitfall here that I believe every developer must know. require_once if we have it across different folders which include…priyankmaniarMarch 19, 2023
PHPBasicsObjects PHP Objects How do we create a generic object in PHP? #1 Standard Way $obj = new stdClass(); #2 Typecaste way $obj = (object)[]; #3 An anonymous…priyankmaniarSeptember 14, 2022
Artisan The command “migrate:fresh –seed” does not exist. The command was not running on the production server. The fix was easy but in two steps: Introduce force since we are running into production…priyankmaniarFebruary 28, 2022
PHP PHP: Try/Catch Does the try-catch block continue execution after the catch? try { throw new Exception (1); } catch (Exception $exception) { echo "gotcha!"; } echo "what…priyankmaniarSeptember 2, 2021
PHP How to upgrade PHP version from 7.2 to 7.3 on a Ubuntu Server? The following are the commands I ran in order to upgrade PHP version from 7.2 to 7.3 for a laravel project. # Run commands one…priyankmaniarJuly 7, 2021
PHP Does a variable inside the loop retain its value in PHP? The following is the code to put this to test. $something = true; $array = array('a', 'b', 'c', 'd'); foreach ($array as $a) { var_dump($a);…priyankmaniarMay 31, 2021
PHP Suspicious PHP Variable / Show Hidden / Invisible Variable Text PHP I encountered a very weird thing lately. strtotime() was not working. If we accept the input from the DB (WordPress) it wasn't working however if…priyankmaniarMay 18, 2020
PHP PHP Converting &039; code to a single quote htmlspecialchars_decode($text , ENT_QUOTES);priyankmaniarFebruary 27, 2020
PHP PHPDocumentor Download the PHAR from their website. This is the easiest method to start with and works perfectly. php ~/phpDocumentor.phar -d . -t docs I found…priyankmaniarJuly 21, 2019
PHP PHP: function number_format issues and solution We have bcmath too! Don't forget about that. Note: money_format is deprecated now. Following is not really an issue but we could run into a…priyankmaniarMarch 23, 2019