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('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$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/ZtSUM
function name:  (null)
number of ops:  27
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'
         14        SEND_VAL                                                 '%21s%3A%28%5Cd%2B%29%3A%22%28.%2A%3F%29%22%3B%21e'
         15        SEND_VAL                                                 '%27s%3A%27.strlen%28%27%242%27%29.%27%3A%22%242%22%3B%27'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $8      
         18        ASSIGN                                                   !0, $8
   13    19        INIT_FCALL                                               'unserialize'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $10     
         22        ASSIGN                                                   !0, $10
   14    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.94 ms | 1395 KiB | 23 Q