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; serialize($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MGP1A
function name:  (null)
number of ops:  7
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        INIT_FCALL                                               'serialize'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
          6      > 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/MGP1A
function name:  log
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'file_put_contents'
          1        FETCH_OBJ_R                                      ~0      'logfile'
          2        SEND_VAL                                                 ~0
          3        FETCH_OBJ_R                                      ~1      'data'
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                                 
    7     6      > 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/MGP1A
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:
162.89 ms | 1387 KiB | 17 Q