3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* // Original definition readonly class Foo { public function __construct(private string $a) {} } var_dump(bin2hex(serialize(new Foo("foo")))); // 4f3a333a22466f6f223a313a7b733a363a2200466f6f0061223b733a333a22666f6f223b7d */ // New definition, 'a' is no longer required. readonly class Foo { public function __construct() {} } var_dump(unserialize(hex2bin('4f3a333a22466f6f223a313a7b733a363a2200466f6f0061223b733a333a22666f6f223b7d')));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Xsmfu
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'unserialize'
          2        INIT_FCALL                                               'hex2bin'
          3        SEND_VAL                                                 '4f3a333a22466f6f223a313a7b733a363a2200466f6f0061223b733a333a22666f6f223b7d'
          4        DO_ICALL                                         $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                         $1      
          7        SEND_VAR                                                 $1
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Xsmfu
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E > > RETURN                                                   null

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
131.55 ms | 1000 KiB | 16 Q