3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { public $test = ['foo' => 'bar']; }; $my = new MyClass(); $test = var_export(serialize($my), true); $evalString = "<?php return unserialize(" . $test . ");"; file_put_contents($tmpFile, $evalString); var_dump($test);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OtNTW
function name:  (null)
number of ops:  22
compiled vars:  !0 = $my, !1 = $test, !2 = $evalString, !3 = $tmpFile
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $4      'MyClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    6     3        INIT_FCALL                                               'var_export'
          4        INIT_FCALL                                               'serialize'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $7      
          7        SEND_VAR                                                 $7
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !1, $8
    8    11        CONCAT                                           ~10     '%3C%3Fphp+return+unserialize%28', !1
         12        CONCAT                                           ~11     ~10, '%29%3B'
         13        ASSIGN                                                   !2, ~11
   10    14        INIT_FCALL                                               'file_put_contents'
         15        SEND_VAR                                                 !3
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
   11    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Class MyClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.42 ms | 1395 KiB | 21 Q