3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FileClass { public $command = 'return file_get_contents("info.txt");'; public function __toString() { return eval($this->command); } } $x = new FileClass(); var_dump(serialize($x));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r9jaq
function name:  (null)
number of ops:  11
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'fileclass'
   13     1        NEW                                              $1      'FileClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   14     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'serialize'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class FileClass:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r9jaq
function name:  __toString
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_OBJ_R                                      ~0      'command'
          1        INCLUDE_OR_EVAL                                  $1      ~0, EVAL
          2        VERIFY_RETURN_TYPE                                       $1
          3      > RETURN                                                   $1
   10     4*       VERIFY_RETURN_TYPE                                       
          5*     > RETURN                                                   null

End of function __tostring

End of class FileClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.37 ms | 1395 KiB | 17 Q