3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar = 'barValue'; protected $baz = 'bazValue'; private $biz = 'bizValue'; } $foo = new Foo(); $arrayFoo = (array) $foo; ob_start(); var_export($arrayFoo); $out = ob_get_clean(); $out = preg_replace('/\'\' . "\\\0\" . \'[*a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\' . "\\\0\" . /', '', $out); eval('$newArray = ' . $out . ';'); var_dump($newArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3UoXi
function name:  (null)
number of ops:  26
compiled vars:  !0 = $foo, !1 = $arrayFoo, !2 = $out, !3 = $newArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $4      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
   10     3        CAST                                          7  ~7      !0
          4        ASSIGN                                                   !1, ~7
   11     5        INIT_FCALL                                               'ob_start'
          6        DO_ICALL                                                 
   12     7        INIT_FCALL                                               'var_export'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
   13    10        INIT_FCALL                                               'ob_get_clean'
         11        DO_ICALL                                         $11     
         12        ASSIGN                                                   !2, $11
   14    13        INIT_FCALL                                               'preg_replace'
         14        SEND_VAL                                                 '%2F%27%27+.+%22%5C%5C0%5C%22+.+%27%5B%2Aa-zA-Z_%5Cx7f-%5Cxff%5D%5Ba-zA-Z0-9_%5Cx7f-%5Cxff%5D%2A%27+.+%22%5C%5C0%5C%22+.+%2F'
         15        SEND_VAL                                                 ''
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $13     
         18        ASSIGN                                                   !2, $13
   15    19        CONCAT                                           ~15     '%24newArray+%3D+', !2
         20        CONCAT                                           ~16     ~15, '%3B'
         21        INCLUDE_OR_EVAL                                          ~16, EVAL
   16    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !3
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.94 ms | 1395 KiB | 23 Q