Can a PHP script unserialize a stored file created using Perl?

Can a PHP script unserialize a stored file created using Perl?

+3
source share
4 answers

No, but you can unload PHP-readable data from Perl using PHP :: Serialization . You can also choose something more standard, for example, YAML or JSON. Almost any language can understand them.

+11
source

JSON lingua-franca , JSON:: XS Perl ( C/++) , ( PHP) JSON .

+5

PHP, Turing-complete , "" " - ".

+4

, Storable, YAML ( JSON), . , YAML ( JSON):

$output_format = 'YAML';
popen( "perl -MStorable -M${output_format}::Syck=Dump -e 'print Dump( retrieve( q{$storable_file_path} ))'", "r" );
+4

Source: https://habr.com/ru/post/1703565/


All Articles