3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { function __construct( public string $secret, public string $normal ) { //throw new Exception('Error!'); } } class Bar { function __construct( #[\SensitiveParameter] public string $secret, public string $normal ) { //throw new Exception('Error!'); } } try { $foo = new Foo('password', 'normal'); var_dump(serialize($foo)); } catch (Exception $e) { echo $e, PHP_EOL, PHP_EOL; } try { $bar = new Bar('password', 'normal'); var_dump(serialize($bar)); } catch (Exception $e) { echo $e, PHP_EOL, PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 12
Branch analysis from position: 12
2 jumps found. (Code = 107) Position 1 = 13, Position 2 = -2
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
Found catch point at position: 28
Branch analysis from position: 28
2 jumps found. (Code = 107) Position 1 = 29, Position 2 = -2
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/StoQO
function name:  (null)
number of ops:  33
compiled vars:  !0 = $foo, !1 = $e, !2 = $bar
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   23     0  E >   NEW                                                  $3      'Foo'
          1        SEND_VAL_EX                                                  'password'
          2        SEND_VAL_EX                                                  'normal'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !0, $3
   24     5        INIT_FCALL                                                   'var_dump'
          6        INIT_FCALL                                                   'serialize'
          7        SEND_VAR                                                     !0
          8        DO_ICALL                                             $6      
          9        SEND_VAR                                                     $6
         10        DO_ICALL                                                     
         11      > JMP                                                          ->16
   25    12  E > > CATCH                                           last         'Exception'
   26    13    >   ECHO                                                         !1
         14        ECHO                                                         '%0A'
         15        ECHO                                                         '%0A'
   30    16    >   NEW                                                  $8      'Bar'
         17        SEND_VAL_EX                                                  'password'
         18        SEND_VAL_EX                                                  'normal'
         19        DO_FCALL                                          0          
         20        ASSIGN                                                       !2, $8
   31    21        INIT_FCALL                                                   'var_dump'
         22        INIT_FCALL                                                   'serialize'
         23        SEND_VAR                                                     !2
         24        DO_ICALL                                             $11     
         25        SEND_VAR                                                     $11
         26        DO_ICALL                                                     
         27      > JMP                                                          ->32
   32    28  E > > CATCH                                           last         'Exception'
   33    29    >   ECHO                                                         !1
         30        ECHO                                                         '%0A'
         31        ECHO                                                         '%0A'
   34    32    > > RETURN                                                       1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/StoQO
function name:  __construct
number of ops:  7
compiled vars:  !0 = $secret, !1 = $normal
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
    6     1        RECV                                                 !1      
    5     2        ASSIGN_OBJ                                                   'secret'
          3        OP_DATA                                                      !0
    6     4        ASSIGN_OBJ                                                   'normal'
          5        OP_DATA                                                      !1
    9     6      > RETURN                                                       null

End of function __construct

End of class Foo.

Class Bar:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/StoQO
function name:  __construct
number of ops:  7
compiled vars:  !0 = $secret, !1 = $normal
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   RECV                                                 !0      
   16     1        RECV                                                 !1      
   15     2        ASSIGN_OBJ                                                   'secret'
          3        OP_DATA                                                      !0
   16     4        ASSIGN_OBJ                                                   'normal'
          5        OP_DATA                                                      !1
   19     6      > RETURN                                                       null

End of function __construct

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.21 ms | 1609 KiB | 15 Q