Posts

  • Tombstone

    Tombstone is the dead code detection library for PHP In our real life most of the time we use only 20 percentage of any application frequently So using Tombstone library (GitHub link: scheb/tombstone) we will check how to remove zero times or rarely called functions As a result our codebase will get slimmer and healthier by removing unwanted functions Leaving dead code in project makes it much harder to find the bugs Using IDE’s find usage we can easily identify whether the function is called or not But if function a() called inside function b() which is called inside function…

    read more

  • PPT to PDF

    The above one line shell snippet in php script is used to convert the powerpoint file in to PDF file using libreoffice. The same command can be used for all the files which are able to open using libreoffice like doc, docx, odt, odp, etc., Shell command is enclosed in back tick symbol not single quotes. PHP by default execute command inside back tick as shell command alternatively you can use shell_exec Let’s we see each arguments and it’s description (this is an excerpt from official document) we passed to the shell command libreoffice –headless        Starts in “headless mode” which allows…

    read more

  • WooCommerce Installation Steps

    Login in to your WordPress Admin panel In left menu hover over Plugins menu. In sub-menu click Add New Once you clicked Add New sub-menu it will be redirected to Add Plugins page. In the Add Plugins page’s search field enter the keyword as woocommerce. For reference please see below image at the top right corner (which is highlighted in red stroke/border) there is search field In the grid of cards click the install button (highlighted in red stroke/border) in the WooCommerce card which is at the position 1 in the attached image Once you installed successfully click the Activate…

    read more