Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5832e22

Browse filesBrowse files
committed
Make example work
1 parent b9b8b0b commit 5832e22
Copy full SHA for 5832e22

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎components/var_exporter.rst

Copy file name to clipboardExpand all lines: components/var_exporter.rst
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.