3v4l.org

run code in 300+ PHP versions simultaneously
<?php ////////// CONFIGURATION ///////////////// $ips_array=array("PC_1_NAME:172.19.144.10","PC_2_NAME:172.19.144.11","PC_3_NAME:172.19.144.10"); function ping($PC,$ip){ $cmd=shell_exec("ping -c 1 -w 200 $ip"); $dati_mount=explode(",",$cmd); if (eregi ("0", $dati_mount[1], $out)) {$connesso="<img src=\"off.gif\">";} if (eregi ("1", $dati_mount[1], $out)) {$connesso="<img src=\"on.gif\">";} $esito="$connesso [$ip] <b>$PC</b><br>"; return $esito; } while(list($k,$v)=each($ips_array)){ $dati_ip=explode(":",$v); $esito=ping($dati_ip[0],$dati_ip[1]); echo $esito; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 2
Branch analysis from position: 23
Branch analysis from position: 2
filename:       /in/Qn2Jt
function name:  (null)
number of ops:  24
compiled vars:  !0 = $ips_array, !1 = $dati_ip, !2 = $v, !3 = $esito, !4 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   14     1      > JMP                                                      ->15
   15     2    >   INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%3A'
          4        SEND_VAR                                                 !2
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !1, $6
   16     7        INIT_FCALL                                               'ping'
          8        FETCH_DIM_R                                      ~8      !1, 0
          9        SEND_VAL                                                 ~8
         10        FETCH_DIM_R                                      ~9      !1, 1
         11        SEND_VAL                                                 ~9
         12        DO_FCALL                                      0  $10     
         13        ASSIGN                                                   !3, $10
   17    14        ECHO                                                     !3
   14    15    >   INIT_FCALL_BY_NAME                                       'each'
         16        SEND_VAR_EX                                              !0
         17        DO_FCALL                                      0  $12     
         18        FETCH_LIST_R                                     $13     $12, 0
         19        ASSIGN                                                   !4, $13
         20        FETCH_LIST_R                                     $15     $12, 1
         21        ASSIGN                                                   !2, $15
         22      > JMPNZ                                                    $12, ->2
   18    23    > > RETURN                                                   1

Function ping:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 22
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 31
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
Branch analysis from position: 22
filename:       /in/Qn2Jt
function name:  ping
number of ops:  40
compiled vars:  !0 = $PC, !1 = $ip, !2 = $cmd, !3 = $dati_mount, !4 = $out, !5 = $connesso, !6 = $esito
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        INIT_FCALL                                               'shell_exec'
          3        NOP                                                      
          4        FAST_CONCAT                                      ~7      'ping+-c+1+-w+200+', !1
          5        SEND_VAL                                                 ~7
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !2, $8
    7     8        INIT_FCALL                                               'explode'
          9        SEND_VAL                                                 '%2C'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !3, $10
    8    13        INIT_FCALL_BY_NAME                                       'eregi'
         14        SEND_VAL_EX                                              '0'
         15        CHECK_FUNC_ARG                                           
         16        FETCH_DIM_FUNC_ARG                               $12     !3, 1
         17        SEND_FUNC_ARG                                            $12
         18        SEND_VAR_EX                                              !4
         19        DO_FCALL                                      0  $13     
         20      > JMPZ                                                     $13, ->22
         21    >   ASSIGN                                                   !5, '%3Cimg+src%3D%22off.gif%22%3E'
    9    22    >   INIT_FCALL_BY_NAME                                       'eregi'
         23        SEND_VAL_EX                                              '1'
         24        CHECK_FUNC_ARG                                           
         25        FETCH_DIM_FUNC_ARG                               $15     !3, 1
         26        SEND_FUNC_ARG                                            $15
         27        SEND_VAR_EX                                              !4
         28        DO_FCALL                                      0  $16     
         29      > JMPZ                                                     $16, ->31
         30    >   ASSIGN                                                   !5, '%3Cimg+src%3D%22on.gif%22%3E'
   10    31    >   ROPE_INIT                                     6  ~19     !5
         32        ROPE_ADD                                      1  ~19     ~19, '+%5B'
         33        ROPE_ADD                                      2  ~19     ~19, !1
         34        ROPE_ADD                                      3  ~19     ~19, '%5D+%3Cb%3E'
         35        ROPE_ADD                                      4  ~19     ~19, !0
         36        ROPE_END                                      5  ~18     ~19, '%3C%2Fb%3E%3Cbr%3E'
         37        ASSIGN                                                   !6, ~18
   11    38      > RETURN                                                   !6
   12    39*     > RETURN                                                   null

End of function ping

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.42 ms | 1403 KiB | 18 Q