3v4l.org

run code in 300+ PHP versions simultaneously
<?php $results=array(); $list=array('coca','pepsi','jiojiji','huihuf'); foreach($list as $sim){ makeSearch($sim); sleep(3); } $notfoundtext="ez pas votre nom de marque sur la base de ce s"; function makeSearch($string){ global $results; $ch = curl_init(); $curlConfig = array( CURLOPT_URL => "http://bases-marques.inpi.fr/Typo3_INPI_Marques/marques_resultats_liste.html", CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => array( 'marque' => $string, 'classification' => '', 'baseFr' => 'on', 'baseCommu' => 'on', 'baseInter' => 'on', 'rechercher' => 'Rechercher', 'recherche' => 'recherche', ) ); curl_setopt_array($ch, $curlConfig); $result = curl_exec($ch); curl_close($ch); if(strpos($notfoundtext,$result)){ $results[]=$string; } } foreach($results as $result){ echo $result.'<br>'; } ?> <?php
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 11
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 11
filename:       /in/PseDZ
function name:  (null)
number of ops:  21
compiled vars:  !0 = $results, !1 = $list, !2 = $sim, !3 = $notfoundtext, !4 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, <array>
    7     2      > FE_RESET_R                                       $7      !1, ->11
          3    > > FE_FETCH_R                                               $7, !2, ->11
    8     4    >   INIT_FCALL_BY_NAME                                       'makeSearch'
          5        SEND_VAR_EX                                              !2
          6        DO_FCALL                                      0          
    9     7        INIT_FCALL                                               'sleep'
          8        SEND_VAL                                                 3
          9        DO_ICALL                                                 
    7    10      > JMP                                                      ->3
         11    >   FE_FREE                                                  $7
   12    12        ASSIGN                                                   !3, 'ez+pas+votre+nom+de+marque+sur+la+base+de+ce+s'
   38    13      > FE_RESET_R                                       $11     !0, ->18
         14    > > FE_FETCH_R                                               $11, !4, ->18
   39    15    >   CONCAT                                           ~12     !4, '%3Cbr%3E'
         16        ECHO                                                     ~12
   38    17      > JMP                                                      ->14
         18    >   FE_FREE                                                  $11
   42    19        ECHO                                                     '%0A'
   43    20      > RETURN                                                   1

Function makesearch:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 39
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
filename:       /in/PseDZ
function name:  makeSearch
number of ops:  40
compiled vars:  !0 = $string, !1 = $results, !2 = $ch, !3 = $curlConfig, !4 = $result, !5 = $notfoundtext
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        BIND_GLOBAL                                              !1, 'results'
   15     2        INIT_FCALL_BY_NAME                                       'curl_init'
          3        DO_FCALL                                      0  $6      
          4        ASSIGN                                                   !2, $6
   17     5        FETCH_CONSTANT                                   ~8      'CURLOPT_URL'
          6        INIT_ARRAY                                       ~9      'http%3A%2F%2Fbases-marques.inpi.fr%2FTypo3_INPI_Marques%2Fmarques_resultats_liste.html', ~8
   18     7        FETCH_CONSTANT                                   ~10     'CURLOPT_POST'
   17     8        ADD_ARRAY_ELEMENT                                ~9      <true>, ~10
   19     9        FETCH_CONSTANT                                   ~11     'CURLOPT_RETURNTRANSFER'
   17    10        ADD_ARRAY_ELEMENT                                ~9      <true>, ~11
   20    11        FETCH_CONSTANT                                   ~12     'CURLOPT_POSTFIELDS'
   21    12        INIT_ARRAY                                       ~13     !0, 'marque'
   22    13        ADD_ARRAY_ELEMENT                                ~13     '', 'classification'
   23    14        ADD_ARRAY_ELEMENT                                ~13     'on', 'baseFr'
   24    15        ADD_ARRAY_ELEMENT                                ~13     'on', 'baseCommu'
   25    16        ADD_ARRAY_ELEMENT                                ~13     'on', 'baseInter'
   26    17        ADD_ARRAY_ELEMENT                                ~13     'Rechercher', 'rechercher'
   27    18        ADD_ARRAY_ELEMENT                                ~13     'recherche', 'recherche'
         19        ADD_ARRAY_ELEMENT                                ~9      ~13, ~12
   16    20        ASSIGN                                                   !3, ~9
   30    21        INIT_FCALL_BY_NAME                                       'curl_setopt_array'
         22        SEND_VAR_EX                                              !2
         23        SEND_VAR_EX                                              !3
         24        DO_FCALL                                      0          
   31    25        INIT_FCALL_BY_NAME                                       'curl_exec'
         26        SEND_VAR_EX                                              !2
         27        DO_FCALL                                      0  $16     
         28        ASSIGN                                                   !4, $16
   32    29        INIT_FCALL_BY_NAME                                       'curl_close'
         30        SEND_VAR_EX                                              !2
         31        DO_FCALL                                      0          
   33    32        INIT_FCALL                                               'strpos'
         33        SEND_VAR                                                 !5
         34        SEND_VAR                                                 !4
         35        DO_ICALL                                         $19     
         36      > JMPZ                                                     $19, ->39
   34    37    >   ASSIGN_DIM                                               !1
         38        OP_DATA                                                  !0
   36    39    > > RETURN                                                   null

End of function makesearch

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.32 ms | 1400 KiB | 17 Q