@@ -174,6 +174,8 @@ public function setup_enhancements()
174
174
$ enhancements [] = new Enhancement \Wrapper ($ this ->parameters ['wrapper ' ]);
175
175
if (in_array ('fast-destruct ' , $ this ->options ))
176
176
$ enhancements [] = new Enhancement \FastDestruct ();
177
+ if (in_array ('public-properties ' , $ this ->options ))
178
+ $ enhancements [] = new Enhancement \PublicProperties ();
177
179
if (in_array ('ascii-strings ' , $ this ->options ))
178
180
$ enhancements [] = new Enhancement \ASCIIStrings (false );
179
181
if (in_array ('armor-strings ' , $ this ->options ))
@@ -598,6 +600,11 @@ protected function help()
598
600
$ this ->o (' This is experimental and it might not work in some cases. ' );
599
601
$ this ->o (' Note: Since strings grow by a factor of 3 using this option, the payload can get ' );
600
602
$ this ->o (' really long. ' );
603
+ $ this ->o (' --public-properties ' );
604
+ $ this ->o (' Attempts to convert references to protected or private properties within the serialized ' );
605
+ $ this ->o (' payload to public. The resulting payload should contain no null bytes and may be a little ' );
606
+ $ this ->o (' shorter. ' );
607
+ $ this ->o (' This is experimental and it might not work in some cases. ' );
601
608
$ this ->o (' -n, --plus-numbers <types> ' );
602
609
$ this ->o (' Adds a + symbol in front of every number symbol of the given type. ' );
603
610
$ this ->o (' For instance, -n iO adds a + in front of every int and object name size: ' );
@@ -679,6 +686,7 @@ function _parse_cmdline_arg(&$i, &$argv, &$parameters, &$options)
679
686
'session-encode ' => false ,
680
687
# Enhancements
681
688
'fast-destruct ' => false ,
689
+ 'public-properties ' => false ,
682
690
'ascii-strings ' => false ,
683
691
'armor-strings ' => false ,
684
692
'plus-numbers ' => true ,
@@ -702,6 +710,7 @@ function _parse_cmdline_arg(&$i, &$argv, &$parameters, &$options)
702
710
'phar-jpeg ' => 'pj ' ,
703
711
'phar-prefix ' => 'pp ' ,
704
712
'phar-filename ' => 'pf ' ,
713
+ 'public-properties ' => 'pub ' ,
705
714
'new ' => 'N ' ,
706
715
'ascii-strings ' => 'a ' ,
707
716
'armor-strings ' => 'A ' ,
0 commit comments