- file_get_contents: documentation ( source)
- var_dump: documentation ( source)
- fclose: documentation ( source)
- fwrite: documentation ( source)
- fopen: documentation ( source)
<?php
$groups_json = false;
$handle = fopen( '/tmp/test.json', 'w' );
fwrite( $handle, '{Personal Data Export for tester@test.com:' );
fwrite( $handle, $groups_json );
fwrite( $handle, '}' );
fclose( $handle );
var_dump( file_get_contents( '/tmp/test.json' ) );