3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types = 1); class HelloWorld { public function __construct(private readonly string $secret, private readonly string $notSecret) { throw new \Exception('a'); } } class Bar extends HelloWorld { public function __construct(#[\SensitiveParameter] string $secret, string $notSecret) { parent::__construct($secret, $notSecret); } } echo serialize(new Bar('foo', 'bar')) . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KZWmp
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                                   'serialize'
          1        NEW                                                  $0      'Bar'
          2        SEND_VAL_EX                                                  'foo'
          3        SEND_VAL_EX                                                  'bar'
          4        DO_FCALL                                          0          
          5        SEND_VAR                                                     $0
          6        DO_ICALL                                             $2      
          7        CONCAT                                               ~3      $2, '%0A'
          8        ECHO                                                         ~3
   17     9      > RETURN                                                       1

Class HelloWorld:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/KZWmp
function name:  __construct
number of ops:  11
compiled vars:  !0 = $secret, !1 = $notSecret
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        ASSIGN_OBJ                                                   'secret'
          3        OP_DATA                                                      !0
          4        ASSIGN_OBJ                                                   'notSecret'
          5        OP_DATA                                                      !1
    6     6        NEW                                                  $2      'Exception'
          7        SEND_VAL_EX                                                  'a'
          8        DO_FCALL                                          0          
          9      > THROW                                             0          $2
    7    10*     > RETURN                                                       null

End of function __construct

End of class HelloWorld.

Class Bar:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KZWmp
function name:  __construct
number of ops:  7
compiled vars:  !0 = $secret, !1 = $notSecret
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   12     2        INIT_STATIC_METHOD_CALL                                      
          3        SEND_VAR_EX                                                  !0
          4        SEND_VAR_EX                                                  !1
          5        DO_FCALL                                          0          
   13     6      > RETURN                                                       null

End of function __construct

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
126.83 ms | 480 KiB | 8 Q