3v4l.org

run code in 300+ PHP versions simultaneously
<?php $connection = ssh2_connect('sp8.superpages.com', 22); // authenticate by login / password ssh2_auth_password($connection, 'z989604', 'Welcome1'); $stream = ssh2_exec($connection, 'sudo etc/init.d/httpd restart'); stream_set_blocking($stream, true); $stream_out = ssh2_fetch_stream($stream, SSH2_STREAM_STDIO); // print the result in your local computer echo stream_get_contents($stream_out); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3B4GN
function name:  (null)
number of ops:  30
compiled vars:  !0 = $connection, !1 = $stream, !2 = $stream_out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'ssh2_connect'
          1        SEND_VAL_EX                                              'sp8.superpages.com'
          2        SEND_VAL_EX                                              22
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                                   !0, $3
    6     5        INIT_FCALL_BY_NAME                                       'ssh2_auth_password'
          6        SEND_VAR_EX                                              !0
          7        SEND_VAL_EX                                              'z989604'
          8        SEND_VAL_EX                                              'Welcome1'
          9        DO_FCALL                                      0          
    8    10        INIT_FCALL_BY_NAME                                       'ssh2_exec'
         11        SEND_VAR_EX                                              !0
         12        SEND_VAL_EX                                              'sudo+etc%2Finit.d%2Fhttpd+restart'
         13        DO_FCALL                                      0  $6      
         14        ASSIGN                                                   !1, $6
   10    15        INIT_FCALL                                               'stream_set_blocking'
         16        SEND_VAR                                                 !1
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                                 
   12    19        INIT_FCALL_BY_NAME                                       'ssh2_fetch_stream'
         20        SEND_VAR_EX                                              !1
         21        FETCH_CONSTANT                                   ~9      'SSH2_STREAM_STDIO'
         22        SEND_VAL_EX                                              ~9
         23        DO_FCALL                                      0  $10     
         24        ASSIGN                                                   !2, $10
   16    25        INIT_FCALL                                               'stream_get_contents'
         26        SEND_VAR                                                 !2
         27        DO_ICALL                                         $12     
         28        ECHO                                                     $12
   17    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.06 ms | 1395 KiB | 17 Q