Explore tweets tagged as #PHPtips
PHP tip: you can run `composer audit` to check โ
for security vulnerability advisories ๐ฎ for installed packages. ๐
`composer audit` #php #ecosystem #composer #security #vulnerability #advisory #check #phptips
1
1
4
๐ฃ This JUST got merged in #PHP a few minutes ago! It is currently challenging to deal with recursion in anonymous functions. Not anymore in PHP 8.5: the "Closure::getCurrent()" method fetches the current closure you're in ๐ PR: https://t.co/F8eHMbIr7R
#phptips
4
28
158
Use the `wp_nav_menu()` function to easily display custom navigation menus in your theme. Simply add it to your template file where you want the menu to appear: This function is highly customizable, allowing you to create dynamic menus with ease! #WordPress #PHPTips
0
0
2
#PHPTips Need to sum up all the values in an array? Try using PHP's built-in array_sum function! It's a simple and efficient way to calculate the total, without the need for loops or variables. #PHP #codingtips
0
0
0
Did you know: You can clone/reuse queries in Laravel #sigma_dev
#100DaysOfLaravel
#100DaysOfPHP
#LaravelTips
#PHPTips
#100DaysOfCode day 6
1
1
5
Check if a key exists in an array with array_key_exists()๐ #php #webdevelopment #arrays #functions #arraykeyexists #phptips #phpbestpractices
0
0
0
๐ PHP Tip: Use the nullsafe operator `(?->)` to avoid null pointer exceptions! ๐คฉ i.e: `$user?->username` No more pesky isset() checks or null checks! ๐ป #PHPTips #NullSafety
0
0
0
๐ PHP Tip! ๐ป Need to execute multiple SQL queries at once? ๐ค Use the `multi_query()` method! ๐ฅ e.g: `$mysqli->multi_query("SELECT * FROM table1; SELECT * FROM table2;");` Executes multiple queries in a single call, reducing database connections! ๐ป #PHPTips #MySQLHacks
0
0
0
๐ก PHP Tip: Make your code more flexible with `union types`! ๐ฉ Use `|` to specify multiple types for a single parameter or property, allowing for more flexibility. Example: `function greet(string|int $name): string { ... }` ๐คฉ Write more robust and adaptable code! #PHPTips
0
0
0
๐ PHP Tip: Use the `<<<` heredoc syntax to define multiline strings in PHP! ๐ป i.e: `$multiLineString = <<<END This is a multiline string with multiple lines and no need for concatenation! END;` Goodbye, cumbersome concatenation! ๐ #PHPTips #CleanCode
0
0
0
๐ฅ #PHP Tip ๐ฅ Use PHP's built-in functions like `array_map`, `array_filter`, and `array_reduce` to manipulate arrays in a concise and readable way. ๐๐ #PHPTips #PHPTricks #PHPDeveloper #LaravelCommunity #WebDevelopment #WebDev #CodeTips #CodingLife #CodingTips
0
0
0
0
0
1
Is mysqli the old-school PHP player while PDO is the new kid on the block? Source: https://t.co/r0atCogVgB
#PHPTips #Coding #PHPDevelopment #CodingTips #difference #bethedifference
0
4
8
0
0
2