mirror of
https://github.com/LeCoupa/awesome-cheatsheets.git
synced 2026-11-02 00:34:19 -08:00
Updated php.php line 20 str_replace to ver PHP 8.0
This commit is contained in:
1 parent
ec7afa056b
commit
59b6486809
1 file changed
+1
-1
+1
-1
@@ -17,7 +17,7 @@ var_dump($arr); // Print anything, with type hints for any value and sizes
|
||||
$string = 'Awesome cheatsheets';
|
||||
|
||||
str_contains($string, 'cheat'); // Find if the string contains the specified string (PHP >= 8.0)
|
||||
str_replace('Awesome', 'Bonjour', $string); // Replace all occurence
|
||||
str_replace('Awesome', 'Bonjour', $string, $count); // Replace all occurence
|
||||
strcmp($string, 'Awesome cheatsheets'); // Compare two strings
|
||||
strpos($string, 'a', 0); // Get position in the string
|
||||
str_split($string, 2); // Split the string
|
||||
|
||||
Reference in new issue
Block a user