3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('LOG_FILE_PATH', '/var/log/sekurak/'); class Logger { private $logfile; public function __construct() { $this->logfile = LOG_FILE_PATH . "logger.log.tmp"; touch($this->logfile); } public function __destruct() { echo "Usuwamy ".($this->logfile)."...\n"; unlink($this->logfile); } } $logger = new Logger(); var_export(serialize($logger));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gfboF
function name:  (null)
number of ops:  14
compiled vars:  !0 = $logger
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'LOG_FILE_PATH'
          2        SEND_VAL                                                 '%2Fvar%2Flog%2Fsekurak%2F'
          3        DO_ICALL                                                 
   18     4        NEW                                              $2      'Logger'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $2
   19     7        INIT_FCALL                                               'var_export'
          8        INIT_FCALL                                               'serialize'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $5      
         11        SEND_VAR                                                 $5
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class Logger:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gfboF
function name:  __construct
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_CONSTANT                                   ~1      'LOG_FILE_PATH'
          1        CONCAT                                           ~2      ~1, 'logger.log.tmp'
          2        ASSIGN_OBJ                                               'logfile'
          3        OP_DATA                                                  ~2
   10     4        INIT_FCALL                                               'touch'
          5        FETCH_OBJ_R                                      ~3      'logfile'
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
   11     8      > RETURN                                                   null

End of function __construct

Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gfboF
function name:  __destruct
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~0      'logfile'
          1        CONCAT                                           ~1      'Usuwamy+', ~0
          2        CONCAT                                           ~2      ~1, '...%0A'
          3        ECHO                                                     ~2
   15     4        INIT_FCALL                                               'unlink'
          5        FETCH_OBJ_R                                      ~3      'logfile'
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
   16     8      > RETURN                                                   null

End of function __destruct

End of class Logger.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.51 ms | 1396 KiB | 23 Q