Abhineet.in

unlearning the learnt

Menu
  • Home
  • About
  • CAT Preparation
Menu

Tag: PHP

How to detect English/ASCII string in PHP

Posted on November 15, 2022April 5, 2023 by Abhineet Mittal

There is no direct function for this in my knowledge. But it can be done easily like so. if ( mb_strlen( $string, ‘ASCII’ ) === mb_strlen( $string, ‘utf-8’ ) ) { return true; }

Read more

Prevent Memory Leak in WordPress

Posted on May 10, 2021April 5, 2023 by Abhineet Mittal

Recently I faced an issue of memory leak in one of my WordPress projects. I was running a function that was reading post meta and user metadata of thousands of objects. I thought reading data from MySQL is cheap in terms of processing power and memory, but it turned out it was causing my function…

Read more

How to change Post Type in WordPress

Posted on January 17, 2021April 5, 2023 by Abhineet Mittal

Use these simple methods to easily change post type of single or multiple posts while working with multiple post types in WordPress.

Read more

How to view and modify WordPress rewrite rules

Posted on June 1, 2020April 5, 2023 by Abhineet Mittal

Sometimes a page load issue in your WordPress website has more to do with some random error rather than a bug in your code. In this case, it was rewrite rules cache.

Read more
How to count words in Unicode string using PHP?

How to count words in Unicode string using PHP

Posted on January 23, 2017April 5, 2023 by Abhineet Mittal

How to count words in Unicode string using PHP? This sounds too easy. After all, PHP has so many string manipulation functions. To count words, we can simply use str_word_count and we are good to go. But there is a problem. While this function works fine for English strings, developers find this function unpredictable as sometimes…

Read more

Categories

  • Business
  • CAT Preparation
  • Coding
  • Fiction
  • Finance
  • How-To-Life
  • Javascript
  • Life
  • Life at Infosys
  • Photoshop
  • Productivity
  • Publishing
  • Social Awareness
  • Startup
  • Technology
  • Uncategorized
  • Utilities
  • Visual Studio Code
  • Web Development
  • WordPress
  • Work Culture

Recent Posts

  • The Ultimate Guide to CAT Preparation: Tips and Tricks
  • Self-Publishing vs. Traditional Publishing: Which Is Right for You?
  • 7 Effective Strategies to Overcome Procrastination and Achieve Your Goals
  • How to detect English/ASCII string in PHP
  • The state of automobile dealerships in India

Recent Comments

  • Rohan George on Intermediate, Stream & Location: Luck by Chance
  • Ashika on Intermediate, Stream & Location: Luck by Chance
  • Steve on My first job, Infosys
  • SAKTHI on Finally, its Mysore…
  • Akash dhyani Akash on Training Begins…
© 2023 Abhineet.in | Powered by Minimalist Blog WordPress Theme