Posts

Positives of PHP 8.4 Over PHP 8

  PHP 8.4 introduces several improvements and new features that enhance the performance, security, and developer experience compared to PHP 8. Below are some of the key advantages: Improved Performance JIT Compilation Enhancements : PHP 8.4 builds upon the Just-In-Time (JIT) compilation introduced in PHP 8, further optimizing it for faster execution and more efficient resource usage. This results in improved performance for complex and resource-intensive applications. Optimized Memory Usage : Memory management has been refined, helping to reduce memory consumption in PHP applications. This is particularly beneficial for large-scale projects and high-traffic websites. Enhanced Language Features New Syntax Features : PHP 8.4 introduces new syntax options that make the code more readable and maintainable. These improvements simplify the writing of cleaner and more concise code. Improved Type System : With enhancements to the type system, PHP 8.4 offers better type safety and more robust e

search entire line in visual studio and replace it from blank

 ^.*common_addItem.*$\n

What are the latest trends in coding and how do they impact the industry?

  Coding is an ever-evolving field, and staying up to date with the latest trends is essential for anyone who wants to stay ahead of the game. But with so many different trends emerging all the time, it can be hard to keep track of them all. In this blog post, we'll take a look at the newest coding trends and discuss how they are impacting the industry. Keeping Up With the Latest Coding Trends Keeping up with the latest coding trends is essential for any developer who wants to stay on top of their game. This means staying up to date with the latest frameworks, languages, and technologies out there. One of the most popular and well-known frameworks is CodeIgniter. It offers a simple and straightforward interface, making it easier for developers to create websites with minimal coding. Additionally, CodeIgniter also provides lots of built-in security features that ensure your website is secure from malicious attacks. Moreover, its advanced PHP 7.3 compatibility ensures that your code

An Overview of Laravel Version 10 and What's New in 2023

Introduction: An Overview of the Latest Version of Laravel and its Release Date The Laravel framework is one of the most popular PHP frameworks available and with the release of version 10 in February, 2023, developers now have access to a wide range of new features and improvements. This article will provide an overview of Laravel Version 10 and what's new in 2023. We will discuss the major changes that have been made to the framework, as well as some use cases for each feature. We will also look at how this version can help improve your development workflow and make it easier for you to create powerful applications. Finally, we'll discuss how Laravel Version 10 can help you stay ahead of the competition in terms of web development trends. What are the Major Changes and Improvements Brought by Version 10? Laravel Version 10 is a major update that brings significant changes and improvements to the popular PHP framework. This version includes new features such as improved routin

Calculate digonal difference in php array matirx

$arr = array(       array(11, 2, 4),     array(4, 5, 6),     array(10, 8, -12), ); echo diagonalDifference($arr); function diagonalDifference($arr) { $n= count($arr); $firstdsum= 0; $seconddsum = 0; $i = 0; for($j = 0; $j < $n; $j++){     $firstdsum+= $arr[$i++][$j];     $seconddsum += $arr[$n- $i][$j]; } return  abs($firstdsum- $seconddsum ); }

Laravel 5.7.15 Released on 28 november

New validation rule and Eloquent relationship getters are available in new laravel 5.7.15 — first, the starts_with validation rule which allows you to check that an input starts with a string. $request->validate([ 'greeting' => 'starts_with:hello', ]);  pass multiple strings, in which the rule will pass if at least one matches the input: $request->validate([ 'greeting' => 'starts_with:hello,hola', ]); the date_equals validation rule is now translatable, and you should update your resources/lang/en/validation.php file with the following: 'date_equals' => 'The :attribute must be a date equal to :date.', New relationship getters are available in this release including: BelongsToMany::getParentKeyName BelongsToMany::getRelatedKeyName HasManyThrough::getFirstKeyName HasManyThrough::getForeignKeyName HasManyThrough::getSecondLocalKeyName

CodeIgniter 4.0.0-alpha.3 released

Release highlights: Numerous bug fixes, across the framework Many missing features implemented, across the framework Code coverage is up to 72% CodeIgniter4 has been promoted to its own github organization. That is reflected in docs and comments. We have integrated a git pre-commit hook, which will apply the CI4 code sniffer rules, and attempt to fix them. We have run all the source files through it, and any "funny" code formatting is temporary until the rules are updated. We welcome Natan Felles, from Brazil, to the core CodeIgniter4 developer team. He has proven to be passionate, dedicated and thorough

generate unique random number using sql query

SELECT FLOOR(RAND() * 99999) AS random_num FROM numbers_mst  WHERE "random_num" NOT IN (SELECT my_number FROM numbers_mst) LIMIT 1 Selects random number between 0 - 1 using RAND(). Amplifies that to be a number between 0 - 99999. Only chooses those that do not already exist in table. Returns only 1 result.

Codeigniter Hmvc Modules Naming

Go to the Application/config/config.php and define Module location in $config [ 'modules_locations' ] and you are able to access the different location modules in code igniter. $config [ 'modules_locations' ] = array ( APPPATH . 'modules/' => '../modules/' , APPPATH . 'modules/frontend/open/' => '../modules/frontend/open/' , APPPATH . 'new/' => '../new/' , );

Perform airthmatic operation in select sql query when airthmatic operator stored in database

id a b operation c 1 2 3 + 5 2 2 3 + 6 3 3 2 / 1 4 4 7 * 28 5 54 2 - 27 6 3 0 / 0 Using operation in fetching the value select  case                     when operation='+' then a+b                    when operation='-' then a-b                     when operation='*' then a*b                    when operation='/' then a/b            END  from table ; Using in where  condition while checking the value with c if airthmatic operation is equal to the the value in c coloum    select * from expressions where c= case when operation='+' then a+b                                     when operation='-' then a-b  when operation='*' then a*b when operation='/' then a/b END