php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
create_data_file.php File Reference

Go to the source code of this file.

Variables

for($i=0; $i< 0x100;++$i) $map [chr(0)] = '\0'
 
 $map ["\n"] = '\n'
 
for( $i=ord(' ');$i< 0x7F;++ $i) for($i=ord('0'); $i<=ord('9');++$i) $map ['"'] = '\"'
 
 $map ['\\'] = '\\\\'
 
const CHUNK_SIZE = 1024
 
 $dta = file_get_contents( $argv[1] )
 
 $chunks = str_split($dta, CHUNK_SIZE)
 
 $chunks [count($chunks) - 1] = str_pad($chunks[count($chunks) - 1], CHUNK_SIZE, chr(0))
 
 foreach ( $chunks as $chunk) = $news . ' ?>'
 

Variable Documentation

◆ $chunks [1/2]

$chunks = str_split($dta, CHUNK_SIZE)

Definition at line 39 of file create_data_file.php.

◆ $chunks [2/2]

$chunks[count( $chunks) - 1] = str_pad($chunks[count($chunks) - 1], CHUNK_SIZE, chr(0))

Definition at line 40 of file create_data_file.php.

◆ $dta

$dta = file_get_contents( $argv[1] )

Definition at line 38 of file create_data_file.php.

◆ $map [1/4]

$map["\n"] = '\n'

Definition at line 17 of file create_data_file.php.

◆ $map [2/4]

for($i=ord(' '); $i< 0x7F;++$i) for ( $i=ord( '0');$i<=ord( '9');++ $i) $map['"'] = '\"'

Definition at line 28 of file create_data_file.php.

◆ $map [3/4]

$map['\\'] = '\\\\'

Definition at line 29 of file create_data_file.php.

◆ $map [4/4]

for ( $i=0;$i< 0x100;++ $i) $map[chr(0)] ( ) = '\0'

Definition at line 16 of file create_data_file.php.

◆ CHUNK_SIZE

const CHUNK_SIZE = 1024

Definition at line 36 of file create_data_file.php.

◆ foreach

foreach ( $chunks as) = $news . ' ?>'

Definition at line 43 of file create_data_file.php.