3v4l.org

run code in 300+ PHP versions simultaneously
<?php $host="127.0.0.1" ; $port=9875; $timeout=30; $sk=fsockopen($host,$port,$errnum,$errstr,$timeout) ; if (!is_resource($sk)) { exit("connection fail: ".$errnum." ".$errstr) ; } else { echo "Connected"; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/USuVb
function name:  (null)
number of ops:  21
compiled vars:  !0 = $host, !1 = $port, !2 = $timeout, !3 = $sk, !4 = $errnum, !5 = $errstr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '127.0.0.1'
    3     1        ASSIGN                                                   !1, 9875
    4     2        ASSIGN                                                   !2, 30
    5     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                                         $9      
         10        ASSIGN                                                   !3, $9
    6    11        TYPE_CHECK                                  512  ~11     !3
         12        BOOL_NOT                                         ~12     ~11
         13      > JMPZ                                                     ~12, ->19
    7    14    >   CONCAT                                           ~13     'connection+fail%3A+', !4
         15        CONCAT                                           ~14     ~13, '+'
         16        CONCAT                                           ~15     ~14, !5
         17      > EXIT                                                     ~15
         18*       JMP                                                      ->20
   10    19    >   ECHO                                                     'Connected'
   12    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.42 ms | 1395 KiB | 15 Q