3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('DISPLAY_ERRORS', true); define('DISPLAY_EXCEPTIONS', true); set_time_limit(0); ini_set('memory_limit',-1); ini_set('max_execution_time',0); ini_set('ignore_user_abort','On'); ini_set('display_errors', (DISPLAY_ERRORS)?(1):(0)); ini_set('display_startup_errors', (DISPLAY_ERRORS)?(1):(0)); error_reporting((DISPLAY_ERRORS)?(1):(0)); ignore_user_abort (true); date_default_timezone_set('America/Tegucigalpa'); require_once 'SMTP4PHP.php'; //use SMTP4PHP\User; //use SMTP4PHP\eMail; //use SMTP4PHP\SMTP; class enviarEmail{ private $servidor; private $puerto; private $cuenta_correo; private $contrasena; private $nombre; private $remitente; private $emailServer = NULL; private $smtp = NULL; public function __construct($servidor, $puerto, $cuenta_correo, $contrasena, $nombre){ $this->servidor = $servidor; $this->puerto = $puerto; $this->cuenta_correo = $cuenta_correo; $this->contrasena = $contrasena; $this->nombre = $nombre; $this->remitente = $cuenta_correo; $this->servidor_init(); $this->smtp_init(); } private function servidor_init(){ $this->emailServer = new eMail(); } private function smtp_init(){ $this->smtp = new SMTP($this->servidor, $this->puerto, $this->cuenta_correo, $this->contrasena); } public function enviarLink($correo, $Link){ $this->emailServer->from = new User($this->nombre, $this->remitente); $this->emailServer->to = new User($this->nombre, $correo); $this->emailServer->subject = FROM_SUBJECT; $this->emailServer->htmlMessage = 'Se ha generado su formulario PreImpreso. Tiene '. VALIDEZ_URL .' horas a partir de ahora para descarga el documento y solo tiene vigencia para ser descargado ' . REQUEST_PER_LINK . ' veces. Link para descargar -> ' . $Link; try { $this->smtp->send($this->emailServer); /* O $smtp->send($e,$e2);*/ return true; } catch(Exception $e) { return false; } } public function errorLog(){ echo var_dump($this->smtp->SMTPlog); } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 29
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 38
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 46
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 46
Branch analysis from position: 44
Branch analysis from position: 46
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 38
Branch analysis from position: 36
Branch analysis from position: 38
filename:       /in/sDjiU
function name:  (null)
number of ops:  57
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'DISPLAY_ERRORS'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                                 
    3     4        INIT_FCALL                                               'define'
          5        SEND_VAL                                                 'DISPLAY_EXCEPTIONS'
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                                 
    5     8        INIT_FCALL                                               'set_time_limit'
          9        SEND_VAL                                                 0
         10        DO_ICALL                                                 
    6    11        INIT_FCALL                                               'ini_set'
         12        SEND_VAL                                                 'memory_limit'
         13        SEND_VAL                                                 -1
         14        DO_ICALL                                                 
    7    15        INIT_FCALL                                               'ini_set'
         16        SEND_VAL                                                 'max_execution_time'
         17        SEND_VAL                                                 0
         18        DO_ICALL                                                 
    8    19        INIT_FCALL                                               'ini_set'
         20        SEND_VAL                                                 'ignore_user_abort'
         21        SEND_VAL                                                 'On'
         22        DO_ICALL                                                 
    9    23        INIT_FCALL                                               'ini_set'
         24        SEND_VAL                                                 'display_errors'
         25        FETCH_CONSTANT                                   ~6      'DISPLAY_ERRORS'
         26      > JMPZ                                                     ~6, ->29
         27    >   QM_ASSIGN                                        ~7      1
         28      > JMP                                                      ->30
         29    >   QM_ASSIGN                                        ~7      0
         30    >   SEND_VAL                                                 ~7
         31        DO_ICALL                                                 
   10    32        INIT_FCALL                                               'ini_set'
         33        SEND_VAL                                                 'display_startup_errors'
         34        FETCH_CONSTANT                                   ~9      'DISPLAY_ERRORS'
         35      > JMPZ                                                     ~9, ->38
         36    >   QM_ASSIGN                                        ~10     1
         37      > JMP                                                      ->39
         38    >   QM_ASSIGN                                        ~10     0
         39    >   SEND_VAL                                                 ~10
         40        DO_ICALL                                                 
   11    41        INIT_FCALL                                               'error_reporting'
         42        FETCH_CONSTANT                                   ~12     'DISPLAY_ERRORS'
         43      > JMPZ                                                     ~12, ->46
         44    >   QM_ASSIGN                                        ~13     1
         45      > JMP                                                      ->47
         46    >   QM_ASSIGN                                        ~13     0
         47    >   SEND_VAL                                                 ~13
         48        DO_ICALL                                                 
   12    49        INIT_FCALL                                               'ignore_user_abort'
         50        SEND_VAL                                                 <true>
         51        DO_ICALL                                                 
   13    52        INIT_FCALL                                               'date_default_timezone_set'
         53        SEND_VAL                                                 'America%2FTegucigalpa'
         54        DO_ICALL                                                 
   15    55        INCLUDE_OR_EVAL                                          'SMTP4PHP.php', REQUIRE_ONCE
   69    56      > RETURN                                                   1

Class enviarEmail:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sDjiU
function name:  __construct
number of ops:  22
compiled vars:  !0 = $servidor, !1 = $puerto, !2 = $cuenta_correo, !3 = $contrasena, !4 = $nombre
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV                                             !4      
   33     5        ASSIGN_OBJ                                               'servidor'
          6        OP_DATA                                                  !0
   34     7        ASSIGN_OBJ                                               'puerto'
          8        OP_DATA                                                  !1
   35     9        ASSIGN_OBJ                                               'cuenta_correo'
         10        OP_DATA                                                  !2
   36    11        ASSIGN_OBJ                                               'contrasena'
         12        OP_DATA                                                  !3
   37    13        ASSIGN_OBJ                                               'nombre'
         14        OP_DATA                                                  !4
   38    15        ASSIGN_OBJ                                               'remitente'
         16        OP_DATA                                                  !2
   40    17        INIT_METHOD_CALL                                         'servidor_init'
         18        DO_FCALL                                      0          
   41    19        INIT_METHOD_CALL                                         'smtp_init'
         20        DO_FCALL                                      0          
   42    21      > RETURN                                                   null

End of function __construct

Function servidor_init:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sDjiU
function name:  servidor_init
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   45     0  E >   NEW                                              $1      'eMail'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'emailServer'
          3        OP_DATA                                                  $1
   46     4      > RETURN                                                   null

End of function servidor_init

Function smtp_init:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sDjiU
function name:  smtp_init
number of ops:  17
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   49     0  E >   NEW                                              $1      'SMTP'
          1        CHECK_FUNC_ARG                                           
          2        FETCH_OBJ_FUNC_ARG                               $2      'servidor'
          3        SEND_FUNC_ARG                                            $2
          4        CHECK_FUNC_ARG                                           
          5        FETCH_OBJ_FUNC_ARG                               $3      'puerto'
          6        SEND_FUNC_ARG                                            $3
          7        CHECK_FUNC_ARG                                           
          8        FETCH_OBJ_FUNC_ARG                               $4      'cuenta_correo'
          9        SEND_FUNC_ARG                                            $4
         10        CHECK_FUNC_ARG                                           
         11        FETCH_OBJ_FUNC_ARG                               $5      'contrasena'
         12        SEND_FUNC_ARG                                            $5
         13        DO_FCALL                                      0          
         14        ASSIGN_OBJ                                               'smtp'
         15        OP_DATA                                                  $1
   50    16      > RETURN                                                   null

End of function smtp_init

Function enviarlink:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 44
Branch analysis from position: 44
2 jumps found. (Code = 107) Position 1 = 45, Position 2 = -2
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sDjiU
function name:  enviarLink
number of ops:  47
compiled vars:  !0 = $correo, !1 = $Link, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   52     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   53     2        NEW                                              $5      'User'
          3        CHECK_FUNC_ARG                                           
          4        FETCH_OBJ_FUNC_ARG                               $6      'nombre'
          5        SEND_FUNC_ARG                                            $6
          6        CHECK_FUNC_ARG                                           
          7        FETCH_OBJ_FUNC_ARG                               $7      'remitente'
          8        SEND_FUNC_ARG                                            $7
          9        DO_FCALL                                      0          
         10        FETCH_OBJ_W                                      $3      'emailServer'
         11        ASSIGN_OBJ                                               $3, 'from'
         12        OP_DATA                                                  $5
   54    13        NEW                                              $11     'User'
         14        CHECK_FUNC_ARG                                           
         15        FETCH_OBJ_FUNC_ARG                               $12     'nombre'
         16        SEND_FUNC_ARG                                            $12
         17        SEND_VAR_EX                                              !0
         18        DO_FCALL                                      0          
         19        FETCH_OBJ_W                                      $9      'emailServer'
         20        ASSIGN_OBJ                                               $9, 'to'
         21        OP_DATA                                                  $11
   55    22        FETCH_CONSTANT                                   ~16     'FROM_SUBJECT'
         23        FETCH_OBJ_W                                      $14     'emailServer'
         24        ASSIGN_OBJ                                               $14, 'subject'
         25        OP_DATA                                                  ~16
   56    26        FETCH_CONSTANT                                   ~19     'VALIDEZ_URL'
         27        CONCAT                                           ~20     'Se+ha+generado+su+formulario+PreImpreso.+Tiene+', ~19
         28        CONCAT                                           ~21     ~20, '+horas+a+partir+de+ahora+para+descarga+el+documento+y+solo+tiene+vigencia+para+ser+descargado+'
         29        FETCH_CONSTANT                                   ~22     'REQUEST_PER_LINK'
         30        CONCAT                                           ~23     ~21, ~22
         31        CONCAT                                           ~24     ~23, '+veces.+Link+para+descargar+-%3E+'
         32        CONCAT                                           ~25     ~24, !1
         33        FETCH_OBJ_W                                      $17     'emailServer'
         34        ASSIGN_OBJ                                               $17, 'htmlMessage'
         35        OP_DATA                                                  ~25
   58    36        FETCH_OBJ_R                                      ~26     'smtp'
         37        INIT_METHOD_CALL                                         ~26, 'send'
         38        CHECK_FUNC_ARG                                           
         39        FETCH_OBJ_FUNC_ARG                               $27     'emailServer'
         40        SEND_FUNC_ARG                                            $27
         41        DO_FCALL                                      0          
   59    42      > RETURN                                                   <true>
         43*       JMP                                                      ->46
   60    44  E > > CATCH                                       last         'Exception'
   61    45    > > RETURN                                                   <false>
   63    46*     > RETURN                                                   null

End of function enviarlink

Function errorlog:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sDjiU
function name:  errorLog
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   66     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_OBJ_R                                      ~0      'smtp'
          2        FETCH_OBJ_R                                      ~1      ~0, 'SMTPlog'
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                         $2      
          5        ECHO                                                     $2
   67     6      > RETURN                                                   null

End of function errorlog

End of class enviarEmail.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.6 ms | 1417 KiB | 27 Q