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>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 51
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 50
Branch analysis from position: 48
1 jumps found. (Code = 42) Position 1 = 51
Branch analysis from position: 51
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 50
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 51
filename:       /in/6hkYB
function name:  (null)
number of ops:  53
compiled vars:  !0 = $nom, !1 = $totalConcret, !2 = $testConcret
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3C%21DOCTYPE+html+PUBLIC+%22-%2F%2FW3C%2F%2FDTD+XHTML+1.0+Strict%2F%2FEN%22+%22http%3A%2F%2Fwww.w3.org%2FTR%2Fxhtml1%2FDTD%2Fxhtml1-strict.dtd%22%3E%0A%3Chtml+xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22+xml%3Alang%3D%22fr%22+lang%3D%22fr%22%3E%0A%09%3Chead%3E%0A++++++++%3Ctitle%3ETests+linguistiques%3C%2Ftitle%3E%0A++++%3C%2Fhead%3E%0A%09%3Cbody%3E%0A%09%0A%09%09%3Cbr%3E+Testeur+de+nom+%3Cbr%3E%3Cbr%3E+%0A%09%09%3Cform+action%3D%22%22+method%3D%22post%22%3E%0A%09%09%09Proposez+un+nom+%3A+%3Cinput+type%3D%22text%22+name%3D%22nom%22+%2F%3E%0A+%09%09%09%3Cinput+type%3D%22submit%22+value%3D%22OK%22%3E%0A%09%09%3C%2Fform%3E%0A%0A%09%09'
   16     1        INIT_FCALL                                               'file_get_contents'
          2        SEND_VAL                                                 'https%3A%2F%2Fwww.google.fr'
          3        DO_ICALL                                         $3      
          4        ECHO                                                     $3
   44     5        FETCH_R                      global              ~4      '_POST'
          6        FETCH_DIM_R                                      ~5      ~4, 'nom'
          7      > JMPZ                                                     ~5, ->51
   45     8    >   FETCH_R                      global              ~6      '_POST'
          9        FETCH_DIM_R                                      ~7      ~6, 'nom'
         10        ASSIGN                                                   !0, ~7
   46    11        INIT_FCALL                                               'requete'
         12        CONCAT                                           ~9      'un%2520', !0
         13        SEND_VAL                                                 ~9
         14        DO_FCALL                                      0  $10     
         15        ASSIGN                                                   !1, $10
   47    16        INIT_FCALL                                               'requete'
         17        CONCAT                                           ~12     'je%2520vois%2520un%2520', !0
         18        SEND_VAL                                                 ~12
         19        DO_FCALL                                      0  $13     
         20        INIT_FCALL                                               'requete'
         21        CONCAT                                           ~14     'je%2520sens%2520un%2520', !0
         22        SEND_VAL                                                 ~14
         23        DO_FCALL                                      0  $15     
         24        ADD                                              ~16     $13, $15
         25        INIT_FCALL                                               'requete'
         26        CONCAT                                           ~17     'je%2520touche%2520un%2520', !0
         27        SEND_VAL                                                 ~17
         28        DO_FCALL                                      0  $18     
         29        ADD                                              ~19     ~16, $18
         30        INIT_FCALL                                               'requete'
         31        CONCAT                                           ~20     'je%2520goute%2520un%2520', !0
         32        SEND_VAL                                                 ~20
         33        DO_FCALL                                      0  $21     
         34        ADD                                              ~22     ~19, $21
         35        INIT_FCALL                                               'requete'
         36        CONCAT                                           ~23     'j%27entends%2520un%2520', !0
         37        SEND_VAL                                                 ~23
         38        DO_FCALL                                      0  $24     
         39        ADD                                              ~25     ~22, $24
         40        ASSIGN                                                   !2, ~25
   48    41        CONCAT                                           ~27     !1, '%3Cbr%3E'
         42        ECHO                                                     ~27
   49    43        CONCAT                                           ~28     !2, '%3Cbr%3E'
         44        ECHO                                                     ~28
   50    45        DIV                                              ~29     !1, 500
         46        IS_SMALLER_OR_EQUAL                                      ~29, !2
         47      > JMPZ                                                     ~30, ->50
   51    48    >   ECHO                                                     'Ceci+est+un+nom+concret+%21'
         49      > JMP                                                      ->51
   54    50    >   ECHO                                                     'Ceci+est+un+nom+abstrait+%21'
   59    51    >   ECHO                                                     '%0A%09%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   61    52      > RETURN                                                   1

Function requete:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 32
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 78
Branch analysis from position: 78
2 jumps found. (Code = 44) Position 1 = 81, Position 2 = 34
Branch analysis from position: 81
2 jumps found. (Code = 43) Position 1 = 87, Position 2 = 93
Branch analysis from position: 87
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 93
Branch analysis from position: 34
2 jumps found. (Code = 47) Position 1 = 37, Position 2 = 40
Branch analysis from position: 37
2 jumps found. (Code = 47) Position 1 = 41, Position 2 = 44
Branch analysis from position: 41
2 jumps found. (Code = 47) Position 1 = 45, Position 2 = 48
Branch analysis from position: 45
2 jumps found. (Code = 47) Position 1 = 49, Position 2 = 52
Branch analysis from position: 49
2 jumps found. (Code = 47) Position 1 = 53, Position 2 = 56
Branch analysis from position: 53
2 jumps found. (Code = 47) Position 1 = 57, Position 2 = 60
Branch analysis from position: 57
2 jumps found. (Code = 47) Position 1 = 61, Position 2 = 64
Branch analysis from position: 61
2 jumps found. (Code = 47) Position 1 = 65, Position 2 = 68
Branch analysis from position: 65
2 jumps found. (Code = 47) Position 1 = 69, Position 2 = 72
Branch analysis from position: 69
2 jumps found. (Code = 43) Position 1 = 73, Position 2 = 76
Branch analysis from position: 73
2 jumps found. (Code = 44) Position 1 = 81, Position 2 = 34
Branch analysis from position: 81
Branch analysis from position: 34
Branch analysis from position: 76
Branch analysis from position: 72
Branch analysis from position: 68
Branch analysis from position: 64
Branch analysis from position: 60
Branch analysis from position: 56
Branch analysis from position: 52
Branch analysis from position: 48
Branch analysis from position: 44
Branch analysis from position: 40
Branch analysis from position: 32
filename:       /in/6hkYB
function name:  requete
number of ops:  96
compiled vars:  !0 = $requete, !1 = $doc, !2 = $nombreResultats, !3 = $page, !4 = $n, !5 = $nombreResultats2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   19     1        NEW                                              $6      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $6
   20     4        INIT_METHOD_CALL                                         !1, 'loadHTMLFile'
          5        CONCAT                                           ~9      'https%3A%2F%2Fwww.google.fr%2Fsearch%3Fq%3D%2522', !0
          6        CONCAT                                           ~10     ~9, '%2522'
          7        SEND_VAL_EX                                              ~10
          8        DO_FCALL                                      0          
   21     9        INIT_METHOD_CALL                                         !1, 'getElementById'
         10        SEND_VAL_EX                                              'resultStats'
         11        DO_FCALL                                      0  $12     
         12        FETCH_OBJ_R                                      ~13     $12, 'nodeValue'
         13        ASSIGN                                                   !2, ~13
   22    14        INIT_FCALL                                               'file_get_contents'
         15        CONCAT                                           ~15     'https%3A%2F%2Fwww.google.fr%2Fsearch%3Fq%3D%2522', !0
         16        CONCAT                                           ~16     ~15, '%2522'
         17        SEND_VAL                                                 ~16
         18        DO_ICALL                                         $17     
         19        ASSIGN                                                   !3, $17
   24    20        INIT_FCALL                                               'stripos'
         21        SEND_VAR                                                 !3
         22        SEND_VAL                                                 'Aucun'
         23        DO_ICALL                                         $19     
         24        BOOL_NOT                                         ~20     $19
         25      > JMPZ                                                     ~20, ->32
   25    26    >   CONCAT                                           ~21     'https%3A%2F%2Fwww.google.fr%2Fsearch%3Fq%3D%2522', !0
         27        CONCAT                                           ~22     ~21, '%2522'
         28        CONCAT                                           ~23     ~22, '+%3A+'
         29        CONCAT                                           ~24     ~23, !2
         30        CONCAT                                           ~25     ~24, '%3Cbr%3E'
         31        ECHO                                                     ~25
   28    32    >   ASSIGN                                                   !4, 0
   29    33      > JMP                                                      ->78
   30    34    >   FETCH_DIM_R                                      ~27     !2, !4
         35        IS_EQUAL                                         ~28     ~27, '0'
         36      > JMPNZ_EX                                         ~28     ~28, ->40
         37    >   FETCH_DIM_R                                      ~29     !2, !4
         38        IS_EQUAL                                         ~30     ~29, '1'
         39        BOOL                                             ~28     ~30
         40    > > JMPNZ_EX                                         ~28     ~28, ->44
         41    >   FETCH_DIM_R                                      ~31     !2, !4
         42        IS_EQUAL                                         ~32     ~31, '2'
         43        BOOL                                             ~28     ~32
         44    > > JMPNZ_EX                                         ~28     ~28, ->48
         45    >   FETCH_DIM_R                                      ~33     !2, !4
         46        IS_EQUAL                                         ~34     ~33, '3'
         47        BOOL                                             ~28     ~34
         48    > > JMPNZ_EX                                         ~28     ~28, ->52
         49    >   FETCH_DIM_R                                      ~35     !2, !4
         50        IS_EQUAL                                         ~36     ~35, '4'
         51        BOOL                                             ~28     ~36
         52    > > JMPNZ_EX                                         ~28     ~28, ->56
         53    >   FETCH_DIM_R                                      ~37     !2, !4
         54        IS_EQUAL                                         ~38     ~37, '5'
         55        BOOL                                             ~28     ~38
         56    > > JMPNZ_EX                                         ~28     ~28, ->60
         57    >   FETCH_DIM_R                                      ~39     !2, !4
         58        IS_EQUAL                                         ~40     ~39, '6'
         59        BOOL                                             ~28     ~40
         60    > > JMPNZ_EX                                         ~28     ~28, ->64
         61    >   FETCH_DIM_R                                      ~41     !2, !4
         62        IS_EQUAL                                         ~42     ~41, '7'
         63        BOOL                                             ~28     ~42
         64    > > JMPNZ_EX                                         ~28     ~28, ->68
         65    >   FETCH_DIM_R                                      ~43     !2, !4
         66        IS_EQUAL                                         ~44     ~43, '8'
         67        BOOL                                             ~28     ~44
         68    > > JMPNZ_EX                                         ~28     ~28, ->72
         69    >   FETCH_DIM_R                                      ~45     !2, !4
         70        IS_EQUAL                                         ~46     ~45, '9'
         71        BOOL                                             ~28     ~46
         72    > > JMPZ                                                     ~28, ->76
   31    73    >   FETCH_DIM_R                                      ~47     !2, !4
         74        CONCAT                                           ~48     !5, ~47
         75        ASSIGN                                                   !5, ~48
   33    76    >   ADD                                              ~50     !4, 1
         77        ASSIGN                                                   !4, ~50
   29    78    >   STRLEN                                           ~52     !2
         79        IS_SMALLER_OR_EQUAL                                      !4, ~52
         80      > JMPNZ                                                    ~53, ->34
   36    81    >   INIT_FCALL                                               'stripos'
         82        SEND_VAR                                                 !3
         83        SEND_VAL                                                 'Aucun'
         84        DO_ICALL                                         $54     
         85        BOOL                                             ~55     $54
         86      > JMPZ                                                     ~55, ->93
   37    87    >   ASSIGN                                                   !5, '0'
   38    88        CONCAT                                           ~57     'https%3A%2F%2Fwww.google.fr%2Fsearch%3Fq%3D%2522', !0
         89        CONCAT                                           ~58     ~57, '%2522'
         90        CONCAT                                           ~59     ~58, '+%3A+'
         91        CONCAT                                           ~60     ~59, 'Aucun+r%C3%A9sultat+%3Cbr%3E'
         92        ECHO                                                     ~60
   41    93    >   CAST                                          4  ~61     !5
         94      > RETURN                                                   ~61
   42    95*     > RETURN                                                   null

End of function requete

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.64 ms | 1415 KiB | 23 Q