3v4l.org

run code in 300+ PHP versions simultaneously
<?php $baseDN = "dc=challenge01,dc=root-me,dc=org"; $ldapServer = "challenge01.root-me.org"; $ldapServerPort = 54013; $rdn="admin"; $mdp="%00"; $dn = 'dc=challenge01,dc=root-me,dc=org'; echo "Connexion au serveur"; $conn=ldap_connect($ldapServer); // on teste : le serveur LDAP est-il trouvé ? if ($conn) echo "Le résultat de connexion est ".$conn ."<br />"; else die("connexion impossible au serveur LDAP"); if (ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, 3)) { echo "Utilisation de LDAPv3 \n"; } else { echo "Impossible d'utiliser LDAP V3\n"; exit; } if ($bindServerLDAP) echo "Le résultat de connexion est $bindServerLDAP <br />"; else die("Liaison impossible au serveur ldap ..."); echo "Recherche suivant le filtre (sn=B*) <br />"; $query = "sn=B*"; $result=ldap_search($conn, $baseDN, $query); echo "Le résultat de la recherche est $result <br />"; echo "Le nombre d'entrées retournées est ".ldap_count_entries($conn,$result)."<p />"; echo "Lecture de ces entrées ....<p />"; $info = ldap_get_entries($conn, $result); echo "Données pour ".$info["count"]." entrées:<p />"; echo "Fermeture de la connexion"; ldap_close($conn); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 34
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/dRrrS
function name:  (null)
number of ops:  69
compiled vars:  !0 = $baseDN, !1 = $ldapServer, !2 = $ldapServerPort, !3 = $rdn, !4 = $mdp, !5 = $dn, !6 = $conn, !7 = $bindServerLDAP, !8 = $query, !9 = $result, !10 = $info
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'dc%3Dchallenge01%2Cdc%3Droot-me%2Cdc%3Dorg'
    3     1        ASSIGN                                                   !1, 'challenge01.root-me.org'
    4     2        ASSIGN                                                   !2, 54013
    5     3        ASSIGN                                                   !3, 'admin'
    6     4        ASSIGN                                                   !4, '%2500'
    7     5        ASSIGN                                                   !5, 'dc%3Dchallenge01%2Cdc%3Droot-me%2Cdc%3Dorg'
    9     6        ECHO                                                     'Connexion+au+serveur'
   10     7        INIT_FCALL_BY_NAME                                       'ldap_connect'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0  $17     
         10        ASSIGN                                                   !6, $17
   13    11      > JMPZ                                                     !6, ->16
   14    12    >   CONCAT                                           ~19     'Le+r%C3%A9sultat+de+connexion+est+', !6
         13        CONCAT                                           ~20     ~19, '%3Cbr+%2F%3E'
         14        ECHO                                                     ~20
         15      > JMP                                                      ->17
   16    16    > > EXIT                                                     'connexion+impossible+au+serveur+LDAP'
   18    17    >   INIT_FCALL_BY_NAME                                       'ldap_set_option'
         18        SEND_VAR_EX                                              !6
         19        FETCH_CONSTANT                                   ~21     'LDAP_OPT_PROTOCOL_VERSION'
         20        SEND_VAL_EX                                              ~21
         21        SEND_VAL_EX                                              3
         22        DO_FCALL                                      0  $22     
         23      > JMPZ                                                     $22, ->26
   19    24    >   ECHO                                                     'Utilisation+de+LDAPv3+%0A'
         25      > JMP                                                      ->28
   21    26    >   ECHO                                                     'Impossible+d%27utiliser+LDAP+V3%0A'
   22    27      > EXIT                                                     
   25    28    > > JMPZ                                                     !7, ->34
   26    29    >   ROPE_INIT                                     3  ~24     'Le+r%C3%A9sultat+de+connexion+est+'
         30        ROPE_ADD                                      1  ~24     ~24, !7
         31        ROPE_END                                      2  ~23     ~24, '+%3Cbr+%2F%3E'
         32        ECHO                                                     ~23
         33      > JMP                                                      ->35
   28    34    > > EXIT                                                     'Liaison+impossible+au+serveur+ldap+...'
   30    35    >   ECHO                                                     'Recherche+suivant+le+filtre+%28sn%3DB%2A%29+%3Cbr+%2F%3E'
   31    36        ASSIGN                                                   !8, 'sn%3DB%2A'
   32    37        INIT_FCALL_BY_NAME                                       'ldap_search'
         38        SEND_VAR_EX                                              !6
         39        SEND_VAR_EX                                              !0
         40        SEND_VAR_EX                                              !8
         41        DO_FCALL                                      0  $27     
         42        ASSIGN                                                   !9, $27
   33    43        ROPE_INIT                                     3  ~30     'Le+r%C3%A9sultat+de+la+recherche+est+'
         44        ROPE_ADD                                      1  ~30     ~30, !9
         45        ROPE_END                                      2  ~29     ~30, '+%3Cbr+%2F%3E'
         46        ECHO                                                     ~29
   35    47        INIT_FCALL_BY_NAME                                       'ldap_count_entries'
         48        SEND_VAR_EX                                              !6
         49        SEND_VAR_EX                                              !9
         50        DO_FCALL                                      0  $32     
         51        CONCAT                                           ~33     'Le+nombre+d%27entr%C3%A9es+retourn%C3%A9es+est+', $32
         52        CONCAT                                           ~34     ~33, '%3Cp+%2F%3E'
         53        ECHO                                                     ~34
   36    54        ECHO                                                     'Lecture+de+ces+entr%C3%A9es+....%3Cp+%2F%3E'
   37    55        INIT_FCALL_BY_NAME                                       'ldap_get_entries'
         56        SEND_VAR_EX                                              !6
         57        SEND_VAR_EX                                              !9
         58        DO_FCALL                                      0  $35     
         59        ASSIGN                                                   !10, $35
   38    60        FETCH_DIM_R                                      ~37     !10, 'count'
         61        CONCAT                                           ~38     'Donn%C3%A9es+pour+', ~37
         62        CONCAT                                           ~39     ~38, '+entr%C3%A9es%3A%3Cp+%2F%3E'
         63        ECHO                                                     ~39
   41    64        ECHO                                                     'Fermeture+de+la+connexion'
   42    65        INIT_FCALL_BY_NAME                                       'ldap_close'
         66        SEND_VAR_EX                                              !6
         67        DO_FCALL                                      0          
   43    68      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.72 ms | 1390 KiB | 13 Q