Skip to content

Commit 5832e22

Browse files
committed
Make example work
1 parent b9b8b0b commit 5832e22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/var_exporter.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ PHP code, similar to PHP's :phpfunction:`var_export` function::
2828

2929
$exported = VarExporter::export($someVariable);
3030
// store the $exported data in some file or cache system for later reuse
31-
$data = file_put_contents('exported.php', $exported);
31+
$data = file_put_contents('exported.php', '<?php return '.$exported.';');
3232

3333
// later, regenerate the original variable when you need it
3434
$regeneratedVariable = require 'exported.php';

0 commit comments

Comments
 (0)