From 153d665c537400328923855b2f3dc5c9abf6a22e Mon Sep 17 00:00:00 2001 From: Simonarde Lima Date: Fri, 1 Jul 2022 07:13:44 -0300 Subject: [PATCH] removing php version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit str_replace it's been around since php 4 ( https://www.php.net/manual/pt_BR/function.str-replace.php ) 😁 --- languages/php.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages/php.php b/languages/php.php index 83d8da2..62ec245 100644 --- a/languages/php.php +++ b/languages/php.php @@ -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 (PHP >= 8.0) +str_replace('Awesome', 'Bonjour', $string); // 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