3v4l.org

run code in 300+ PHP versions simultaneously
<?php $class = "ArrayObject"; // we break BC here var_dump(unserialize('O:'.strlen($class).':"'.$class.'":0:{}')); // we still allow segfault: class MySplFileObject extends SplFileObject{} $class = "MySplFileObject"; var_dump(unserialize('O:'.strlen($class).':"'.$class.'":0:{}'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BDq6g
function name:  (null)
number of ops:  25
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'ArrayObject'
    4     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'unserialize'
          3        STRLEN                                           ~2      !0
          4        CONCAT                                           ~3      'O%3A', ~2
          5        CONCAT                                           ~4      ~3, '%3A%22'
          6        CONCAT                                           ~5      ~4, !0
          7        CONCAT                                           ~6      ~5, '%22%3A0%3A%7B%7D'
          8        SEND_VAL                                                 ~6
          9        DO_ICALL                                         $7      
         10        SEND_VAR                                                 $7
         11        DO_ICALL                                                 
    7    12        ASSIGN                                                   !0, 'MySplFileObject'
    8    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'unserialize'
         15        STRLEN                                           ~10     !0
         16        CONCAT                                           ~11     'O%3A', ~10
         17        CONCAT                                           ~12     ~11, '%3A%22'
         18        CONCAT                                           ~13     ~12, !0
         19        CONCAT                                           ~14     ~13, '%22%3A0%3A%7B%7D'
         20        SEND_VAL                                                 ~14
         21        DO_ICALL                                         $15     
         22        SEND_VAR                                                 $15
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Class MySplFileObject: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
199.11 ms | 1387 KiB | 17 Q