3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isOnline($ip, $port, $timeout = 1) { return (($fp = fsockopen($ip, $port, $i, $j, $timeout)) ? fclose($fp) : false); } isOnline('127.0.0.1', 80);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Hcu76
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'isonline'
          1        SEND_VAL                                                 '127.0.0.1'
          2        SEND_VAL                                                 80
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function isonline:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Hcu76
function name:  isOnline
number of ops:  20
compiled vars:  !0 = $ip, !1 = $port, !2 = $timeout, !3 = $fp, !4 = $i, !5 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      1
    3     3        INIT_FCALL                                               'fsockopen'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_REF                                                 !4
          7        SEND_REF                                                 !5
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                         $6      
         10        ASSIGN                                           ~7      !3, $6
         11      > JMPZ                                                     ~7, ->17
         12    >   INIT_FCALL                                               'fclose'
         13        SEND_VAR                                                 !3
         14        DO_ICALL                                         $8      
         15        QM_ASSIGN                                        ~9      $8
         16      > JMP                                                      ->18
         17    >   QM_ASSIGN                                        ~9      <false>
         18    > > RETURN                                                   ~9
    4    19*     > RETURN                                                   null

End of function isonline

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.04 ms | 1399 KiB | 18 Q