3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <title>Tests linguistiques</title> </head> <body> <br> Testeur de nom <br><br> <form action="" method="post"> Proposez un nom : <input type="text" name="nom" /> <input type="submit" value="OK"> </form> <?php echo file_get_contents("https://www.google.fr"); function requete ($requete) { $doc = new DOMDocument(); $doc->loadHTMLFile("https://www.google.fr/search?q=%22" . $requete . "%22"); $nombreResultats = $doc->getElementById('resultStats')->nodeValue; $page = file_get_contents("https://www.google.fr/search?q=%22" . $requete . "%22"); if (stripos($page, "Aucun") == false) { echo "https://www.google.fr/search?q=%22" . $requete . "%22" . " : " . $nombreResultats . "<br>"; } $n = 0; while ($n <= strlen($nombreResultats)) { if ($nombreResultats[$n] == "0" || $nombreResultats[$n] == "1" || $nombreResultats[$n] == "2" || $nombreResultats[$n] == "3" || $nombreResultats[$n] == "4" || $nombreResultats[$n] == "5" || $nombreResultats[$n] == "6" || $nombreResultats[$n] == "7" || $nombreResultats[$n] == "8" || $nombreResultats[$n] == "9") { $nombreResultats2 = $nombreResultats2 . $nombreResultats[$n]; } $n = $n + 1; } if (stripos($page, "Aucun") != false) { $nombreResultats2 = "0"; echo "https://www.google.fr/search?q=%22" . $requete . "%22" . " : " . "Aucun résultat <br>"; } return intval ($nombreResultats2); } if ($_POST["nom"]) { $nom = $_POST["nom"]; $totalConcret = requete("un%20" . $nom); $testConcret = requete("je%20vois%20un%20" . $nom) + requete("je%20sens%20un%20" . $nom) + requete("je%20touche%20un%20" . $nom) + requete("je%20goute%20un%20" . $nom) + requete("j'entends%20un%20" . $nom); echo $totalConcret . "<br>"; echo $testConcret . "<br>"; if ($testConcret >= $totalConcret/500) { echo "Ceci est un nom concret !"; } else { echo "Ceci est un nom abstrait !"; } } ?> </body> </html>
Output for 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <title>Tests linguistiques</title> </head> <body> <br> Testeur de nom <br><br> <form action="" method="post"> Proposez un nom : <input type="text" name="nom" /> <input type="submit" value="OK"> </form> Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/6hkYB on line 16 Warning: file_get_contents(): open_basedir restriction in effect. File(https://www.google.fr) is not within the allowed path(s): (/tmp:/in:/etc) in /in/6hkYB on line 16 Warning: file_get_contents(https://www.google.fr): Failed to open stream: Operation not permitted in /in/6hkYB on line 16 Warning: Undefined array key "nom" in /in/6hkYB on line 44 </body> </html>
Output for 8.0.13
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <title>Tests linguistiques</title> </head> <body> <br> Testeur de nom <br><br> <form action="" method="post"> Proposez un nom : <input type="text" name="nom" /> <input type="submit" value="OK"> </form> Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/6hkYB on line 16 Warning: file_get_contents(https://www.google.fr): Failed to open stream: No such file or directory in /in/6hkYB on line 16 Warning: Undefined array key "nom" in /in/6hkYB on line 44 </body> </html>
Output for 5.4.0 - 5.4.45, 7.4.33
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <title>Tests linguistiques</title> </head> <body> <br> Testeur de nom <br><br> <form action="" method="post"> Proposez un nom : <input type="text" name="nom" /> <input type="submit" value="OK"> </form> Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/6hkYB on line 16 Warning: file_get_contents(https://www.google.fr): failed to open stream: No such file or directory in /in/6hkYB on line 16 Notice: Undefined index: nom in /in/6hkYB on line 44 </body> </html>
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.32
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <title>Tests linguistiques</title> </head> <body> <br> Testeur de nom <br><br> <form action="" method="post"> Proposez un nom : <input type="text" name="nom" /> <input type="submit" value="OK"> </form> Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/6hkYB on line 16 Warning: file_get_contents(): open_basedir restriction in effect. File(https://www.google.fr) is not within the allowed path(s): (/tmp:/in:/etc) in /in/6hkYB on line 16 Warning: file_get_contents(https://www.google.fr): failed to open stream: Operation not permitted in /in/6hkYB on line 16 Notice: Undefined index: nom in /in/6hkYB on line 44 </body> </html>
Output for 7.3.32 - 7.3.33
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <title>Tests linguistiques</title> </head> <body> <br> Testeur de nom <br><br> <form action="" method="post"> Proposez un nom : <input type="text" name="nom" /> <input type="submit" value="OK"> </form> Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/6hkYB on line 16 Warning: file_get_contents(https://www.google.fr): failed to open stream: No such file or directory in /in/6hkYB on line 16 </body> </html>

preferences:
275.48 ms | 403 KiB | 373 Q