Skip to content

Instantly share code, notes, and snippets.

@vpnwall-services
Last active June 8, 2021 00:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vpnwall-services/3b801e358f5118d08a08d9d8345f9b91 to your computer and use it in GitHub Desktop.
Save vpnwall-services/3b801e358f5118d08a08d9d8345f9b91 to your computer and use it in GitHub Desktop.
[PHP Vardump to file] #php #vardump #file #output #json #encoded #serialize
<?php
$file = '/tmp/file';
$content = json_encode($data);
file_put_contents($file, $content);
$content = json_decode(file_get_contents($file), TRUE);
?>
<?php
$fp = fopen('vardump.txt', 'w');
fwrite($fp, serialize($myobj));
fclose($fp);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment