3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar = 'barValue'; protected $baz = 'bazValue'; private $tab = 'tabValue'; } $F = new Foo(); $F = serialize($F); $F = str_replace('tabValue','new_tabValue',$F); $F = preg_replace_callback ( '!s:(\d+):"(.*?)";!', function($match) { return ($match[1] == strlen($match[2])) ? $match[0] : 's:' . strlen($match[2]) . ':"' . $match[2] . '";'; },$F ); $F = @unserialize($F); var_dump($F);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Llluv
function name:  (null)
number of ops:  30
compiled vars:  !0 = $F
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   10     3        INIT_FCALL                                               'serialize'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !0, $4
   11     7        INIT_FCALL                                               'str_replace'
          8        SEND_VAL                                                 'tabValue'
          9        SEND_VAL                                                 'new_tabValue'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !0, $6
   12    13        INIT_FCALL                                               'preg_replace_callback'
         14        SEND_VAL                                                 '%21s%3A%28%5Cd%2B%29%3A%22%28.%2A%3F%29%22%3B%21'
         15        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FLlluv%3A12%240'
   14    16        SEND_VAL                                                 ~8
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $9      
   12    19        ASSIGN                                                   !0, $9
   15    20        BEGIN_SILENCE                                    ~11     
         21        INIT_FCALL                                               'unserialize'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $12     
         24        END_SILENCE                                              ~11
         25        ASSIGN                                                   !0, $12
   16    26        INIT_FCALL                                               'var_dump'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FLlluv%3A12%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Llluv
function name:  {closure}
number of ops:  19
compiled vars:  !0 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        FETCH_DIM_R                                      ~1      !0, 1
          2        FETCH_DIM_R                                      ~2      !0, 2
          3        STRLEN                                           ~3      ~2
          4        IS_EQUAL                                                 ~1, ~3
          5      > JMPZ                                                     ~4, ->9
          6    >   FETCH_DIM_R                                      ~5      !0, 0
          7        QM_ASSIGN                                        ~6      ~5
          8      > JMP                                                      ->17
          9    >   FETCH_DIM_R                                      ~7      !0, 2
         10        STRLEN                                           ~8      ~7
         11        CONCAT                                           ~9      's%3A', ~8
         12        CONCAT                                           ~10     ~9, '%3A%22'
         13        FETCH_DIM_R                                      ~11     !0, 2
         14        CONCAT                                           ~12     ~10, ~11
         15        CONCAT                                           ~13     ~12, '%22%3B'
         16        QM_ASSIGN                                        ~6      ~13
         17    > > RETURN                                                   ~6
   14    18*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FLlluv%3A12%240

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.62 ms | 1405 KiB | 23 Q